From patchwork Thu Sep 22 09:42:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101759 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2498947qgf; Thu, 22 Sep 2016 02:43:41 -0700 (PDT) X-Received: by 10.66.164.39 with SMTP id yn7mr1695231pab.163.1474537420112; Thu, 22 Sep 2016 02:43:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si1343494paf.144.2016.09.22.02.43.39; Thu, 22 Sep 2016 02:43:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756057AbcIVJn2 (ORCPT + 27 others); Thu, 22 Sep 2016 05:43:28 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:53938 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755862AbcIVJnY (ORCPT ); Thu, 22 Sep 2016 05:43:24 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MErUc-1bkFNN3pAQ-00G2CY; Thu, 22 Sep 2016 11:42:56 +0200 From: Arnd Bergmann To: Jonathan Cameron Cc: Arnd Bergmann , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Gregor Boirie , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] io:pressure: zpa2326: remove redundant "DEBUG" ifdef Date: Thu, 22 Sep 2016 11:42:30 +0200 Message-Id: <20160922094253.2202232-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:C12GQa2Q8nXiRgeponAI9WcicYvDaAC0qBvjsXGAZsI+mzy/vdA RERAuloTKorMRXZfQ+vxC0psA+ErxrLU/7Md1CAVphtHctglVqsz/8dWjE9x2TJ3GeBlze/ LWk5q3Xt79dkaV2Rc/ZfllBHc/88o8rHNcF2X81Ug1w9vV1aJ2svTRNcVjoeROBDPzO1un3 gBG+BMH2wgcdg4jiXPYVA== X-UI-Out-Filterresults: notjunk:1; V01:K0:LkXr9v8JqGs=:5DW9IXVbDkkxMq5F6BVvn4 6VkbFMfK3/1Y5ONQlvH/U/RwSq50qyGErb/wmrMFzVFPzjObSedta6uDhxKmOviqOHzytg7CW Uc9anT5igCFSWVDAZFX8s2nN+jhdEvEi8EBa8U1Wrf4GwsTGAVR50F80UMuf05Zk5TxDgY9vq ilc6bB4813zC4KdYUfY6WVDqE5KT3f51GTmvTBGTxWM5HH/YgoDx7uE71ew2GzG4b5kyA7epo ZqOkF3YQ/SmR8m7VuWrRNUhcsUsLadRqTFpjQ0arzbdoO9umqithIK0q2RY7nnYbVYOh4zI6v BGDvIj6aq71PFIyGAxDGH5CqTZoiiNRxfJuhfnTXGfe/4XeDV/4Fw2HndtvauJW87EQ+J9/Ws K6dCd7NN71KLWCm88LLfCvHVByutY/20321ifH33ZUO02N0rYbxWuvQpUuDQRa2hqeX21GJ1s 8dvO1qXGyjXrC4EOTWUbhtXg9sDVyvpOZtmn1Yd4AwPAIsSdxW/Y9KwqruMy/l5lYyp8JGQcR 5X3HxRFZOpBpddWxqtF6fSxa9xiTTLK7Slhf15TZAG/CtZQkS6ofitEyEPOab7cwEvL6A/tua tFn9wFdOsZ44Q3tmpI0mV6McQG5o5MhL5RwhG7ZRcDV/LPN9ugu5h5Cul++cAkMWcbiHTMdk9 JILaAl4htE7ZlnmVEoJFYypfNWWMJyoBq4TtrOSSjubZvkBshFmMUXOvYE2xaJGrXE2w= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The -Wempty-body gcc warning triggers in the newly added zpa2326 driver: drivers/iio/pressure/zpa2326.c: In function 'zpa2326_dequeue_pressure': drivers/iio/pressure/zpa2326.c:578:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] The use of an empty statement behind 'if (...)' is harmless here, but it shows that the dev_dbg() macro is not used correctly: when the "DEBUG" macro is not set, dev_dbg() already defaults to a no-operation, though one that lets the compiler know that the arguments are used, and lets it check the format string. Fixing this also simplifies the driver. Fixes: 03b262f2bbf4 ("iio:pressure: initial zpa2326 barometer support") Signed-off-by: Arnd Bergmann --- drivers/iio/pressure/zpa2326.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.9.0 diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c index 19d2eb46fda6..c720c3ac0b9b 100644 --- a/drivers/iio/pressure/zpa2326.c +++ b/drivers/iio/pressure/zpa2326.c @@ -147,12 +147,8 @@ struct zpa2326_private { #define zpa2326_warn(_idev, _format, _arg...) \ dev_warn(_idev->dev.parent, _format, ##_arg) -#ifdef DEBUG #define zpa2326_dbg(_idev, _format, _arg...) \ dev_dbg(_idev->dev.parent, _format, ##_arg) -#else -#define zpa2326_dbg(_idev, _format, _arg...) -#endif bool zpa2326_isreg_writeable(struct device *dev, unsigned int reg) {