From patchwork Wed Mar 19 00:59:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 3856951 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 28E359F3FF for ; Wed, 19 Mar 2014 18:01:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48FD420120 for ; Wed, 19 Mar 2014 18:01:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BFBF2021A for ; Wed, 19 Mar 2014 18:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758750AbaCSA7v (ORCPT ); Tue, 18 Mar 2014 20:59:51 -0400 Received: from smtprelay0067.hostedemail.com ([216.40.44.67]:36390 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758746AbaCSA7u (ORCPT ); Tue, 18 Mar 2014 20:59:50 -0400 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 26CAF6AC6D; Wed, 19 Mar 2014 00:59:49 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 30, 2, 0, , d41d8cd98f00b204, joe@perches.com, :::::::, RULES_HIT:41:355:379:541:800:960:973:988:989:1042:1260:1261:1277:1311:1313:1314:1345:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2194:2199:2393:2559:2562:2729:2828:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:4225:4321:4605:5007:6119:7652:7809:7882:7903:9121:9149:10004:10400:10848:11026:11473:11657:11658:11914:12043:12296:12438:12517:12519:12555:13069:13311:13357:13523:13524, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: map22_72b37f069ae55 X-Filterd-Recvd-Size: 2628 Received: from [192.168.1.151] (pool-96-251-49-11.lsanca.fios.verizon.net [96.251.49.11]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Wed, 19 Mar 2014 00:59:48 +0000 (UTC) Message-ID: <1395190787.8649.5.camel@joe-AO722> Subject: [PATCH] rsi: Add pr_fmt,__printf, fix format & arg mismatch From: Joe Perches To: Fariya Fatima Cc: "John W. Linville" , linux-wireless , netdev Date: Tue, 18 Mar 2014 17:59:47 -0700 X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Emit a prefix for the rsi_dbg messages. Fix the format and argument mismatch and add __printf(2, 3) to try to avoid more. Signed-off-by: Joe Perches --- drivers/net/wireless/rsi/rsi_91x_main.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mgmt.c | 3 ++- drivers/net/wireless/rsi/rsi_main.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c index 7367be4..8810862 100644 --- a/drivers/net/wireless/rsi/rsi_91x_main.c +++ b/drivers/net/wireless/rsi/rsi_91x_main.c @@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include "rsi_mgmt.h" diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index f09c72e..ef37d4b 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -393,7 +393,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common, msg_len -= pad_bytes; if ((msg_len <= 0) || (!msg)) { - rsi_dbg(MGMT_RX_ZONE, "Invalid rx msg of len = %d\n", + rsi_dbg(MGMT_RX_ZONE, + "%s: Invalid rx msg of len = %d\n", __func__, msg_len); return -EINVAL; } diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h index e97e6ad..2cb73e7 100644 --- a/drivers/net/wireless/rsi/rsi_main.h +++ b/drivers/net/wireless/rsi/rsi_main.h @@ -40,7 +40,7 @@ #define FSM_MAC_INIT_DONE 6 extern u32 rsi_zone_enabled; -extern void rsi_dbg(u32 zone, const char *fmt, ...); +extern __printf(2, 3) void rsi_dbg(u32 zone, const char *fmt, ...); #define RSI_MAX_VIFS 1 #define NUM_EDCA_QUEUES 4