From patchwork Fri Aug 26 08:56:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 1101262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7Q8vp0F027578 for ; Fri, 26 Aug 2011 08:57:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753989Ab1HZI44 (ORCPT ); Fri, 26 Aug 2011 04:56:56 -0400 Received: from wondertoys-mx.wondertoys.net ([206.117.179.246]:59546 "EHLO labridge.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750941Ab1HZI4y (ORCPT ); Fri, 26 Aug 2011 04:56:54 -0400 Received: from [173.60.85.8] (account joe@perches.com HELO joe-laptop.perches.com) by labridge.com (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 18066095; Fri, 26 Aug 2011 01:56:53 -0700 From: Joe Perches To: "Luis R. Rodriguez" Cc: "John W. Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ath: Make ath_dbg void not int Date: Fri, 26 Aug 2011 01:56:38 -0700 Message-Id: <3f6f6f785962c600b12bc6362d0932f13a5cbff9.1314347556.git.joe@perches.com> X-Mailer: git-send-email 1.7.6.405.gc1be0 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 26 Aug 2011 08:57:52 +0000 (UTC) The return value is never used so make it void. Reduces object size a tiny bit. $ size drivers/net/wireless/ath/built-in.o* text data bss dec hex filename 1164175 16235 212032 1392442 153f3a drivers/net/wireless/ath/built-in.o.new 1164819 16235 212032 1393086 1541be drivers/net/wireless/ath/built-in.o.old Signed-off-by: Joe Perches --- drivers/net/wireless/ath/ath.h | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 17c4b56..a3f8505 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -178,8 +178,9 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry); void ath_hw_cycle_counters_update(struct ath_common *common); int32_t ath_hw_get_listen_time(struct ath_common *common); -extern __attribute__ ((format (printf, 3, 4))) int -ath_printk(const char *level, struct ath_common *common, const char *fmt, ...); +extern __attribute__((format (printf, 3, 4))) +int ath_printk(const char *level, struct ath_common *common, + const char *fmt, ...); #define ath_emerg(common, fmt, ...) \ ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__) @@ -246,27 +247,21 @@ enum ATH_DEBUG { #ifdef CONFIG_ATH_DEBUG -#define ath_dbg(common, dbg_mask, fmt, ...) \ -({ \ - int rtn; \ - if ((common)->debug_mask & dbg_mask) \ - rtn = ath_printk(KERN_DEBUG, common, fmt, \ - ##__VA_ARGS__); \ - else \ - rtn = 0; \ - \ - rtn; \ -}) +#define ath_dbg(common, dbg_mask, fmt, ...) \ +do { \ + if ((common)->debug_mask & dbg_mask) \ + ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ +} while (0) + #define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) #define ATH_DBG_WARN_ON_ONCE(foo) WARN_ON_ONCE(foo) #else -static inline __attribute__ ((format (printf, 3, 4))) int -ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, - const char *fmt, ...) +static inline __attribute__((format (printf, 3, 4))) +void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, + const char *fmt, ...) { - return 0; } #define ATH_DBG_WARN(foo, arg...) do {} while (0) #define ATH_DBG_WARN_ON_ONCE(foo) ({ \