From patchwork Tue Apr 24 09:34:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Redfearn X-Patchwork-Id: 10359099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A00E6038F for ; Tue, 24 Apr 2018 09:36:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CEC828C05 for ; Tue, 24 Apr 2018 09:36:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30FA128D43; Tue, 24 Apr 2018 09:36:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3A9B28C05 for ; Tue, 24 Apr 2018 09:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755481AbeDXJfy (ORCPT ); Tue, 24 Apr 2018 05:35:54 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.154.210]:36303 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753057AbeDXJfx (ORCPT ); Tue, 24 Apr 2018 05:35:53 -0400 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1404.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Tue, 24 Apr 2018 09:35:28 +0000 Received: from mredfearn-linux.mipstec.com (192.168.155.41) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 24 Apr 2018 02:35:03 -0700 From: Matt Redfearn To: Long Li , Steve French CC: Matt Redfearn , , , , "Steve French" Subject: [PATCH] cifs: smbd: Fix printk format warning for iov on the stack Date: Tue, 24 Apr 2018 10:34:55 +0100 Message-ID: <1524562495-28137-1-git-send-email-matt.redfearn@mips.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [192.168.155.41] X-BESS-ID: 1524562527-382908-11233-24523-5 X-BESS-VER: 2018.5-r1804232011 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.192322 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 4863cc758216 ("cifs: smbd: Avoid allocating iov on the stack") (next-20180424) added a warning when the pdu size is not as expected, but used a %lu for the printk warning. This results in the following warning being emitted from MIPS allyesconfig builds: fs/cifs/smbdirect.c:2106:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat=] Change the format specifier to %zu for the size_t argument. Fixes: 4863cc758216 ("cifs: smbd: Avoid allocating iov on the stack") Signed-off-by: Matt Redfearn --- This is new in next-20180424. Feel free to squash this if possible before it hits master. --- fs/cifs/smbdirect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 24cea63e17f5..c62f7c95683c 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -2103,7 +2103,7 @@ int smbd_send(struct smbd_connection *info, struct smb_rqst *rqst) */ if (rqst->rq_iov[0].iov_len != 4) { - log_write(ERR, "expected the pdu length in 1st iov, but got %lu\n", rqst->rq_iov[0].iov_len); + log_write(ERR, "expected the pdu length in 1st iov, but got %zu\n", rqst->rq_iov[0].iov_len); return -EINVAL; } iov = &rqst->rq_iov[1];