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: 903336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mips.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40VdVt2n4rz9rxx for ; Tue, 24 Apr 2018 19:36:06 +1000 (AEST) 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 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];