Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp885158yba; Wed, 24 Apr 2019 11:10:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfGu8sPu8ceQ/DGcrCLlTLEvNh9mz7YsNLY29R7bVzn4meU1iTHEwDoqEDx0yhDMYEohXF X-Received: by 2002:a62:1a0d:: with SMTP id a13mr34768136pfa.198.1556129451770; Wed, 24 Apr 2019 11:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556129451; cv=none; d=google.com; s=arc-20160816; b=EhmgkpJspxGwpofCG73i+4BMo4x+ost2oaoGSjB4e+5efrbRH98wRKHotTXbJ8Pv7N 8ciaO29I6v7Rky0UhxAqF/as1UAxjayyhGcayQpWjEZjW6NxV86t/aSCrvPmQt7MJtYQ 1O5AiFzUhjfeIIcsKbG6qVXSmnRam6U6XpCx1EWVT8dah/m9AUOLv8792KsgKoS2ul8T S4srL7sTNwKZiLf1gF2TO+yUgH3aj3qNg7g4OXDPXZIkxOeK9lZLeEDERcKWH9yhwZUr mD8yPjUIJlYUYNaxbmq5oA9fAew3im2susl+Nie48YidQG04jcLOfNAARmgWfLoh7Gip iUnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YuK7TDC9aBQLecTtVSTXep/fDKSHGGLuGB4mMArMEyY=; b=o81QrujAt0uW8jjra0EPhrXyhPG2Jeanly798oaq/w/6HqGZonYpEPLPVeCDhIo3EU /W8Cvbm1eof875j+3gDLBlBLIIdY8/6Bhx73apKuZzQN4ynPgBhzBIHc5mpHUeRNIAas jmpDgm0CHw5WID5g8ltgiBpe5DTSS3/2Bf5ehZkpvoRcEndJIA9qyDT08FuCZdPrblRv QDbLidKt/s5b7fu+9PzzP4+NMdKavbNR322Zk9JqQvhI8E2DxrKWWzoP83tK9GPLlfF7 GRMsQlGi2EGP2IvPz64z/mbde2/ZJng/mrLvRsXYmCWtJpbx7g6BYYj8O7YLdJrtFEod O3Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kk2RDp38; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c142si21199358pfb.32.2019.04.24.11.10.36; Wed, 24 Apr 2019 11:10:51 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Kk2RDp38; 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 S2388440AbfDXRQf (ORCPT + 99 others); Wed, 24 Apr 2019 13:16:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:41160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388061AbfDXRQd (ORCPT ); Wed, 24 Apr 2019 13:16:33 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D36D421905; Wed, 24 Apr 2019 17:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556126192; bh=aYOf/nb1yE9/drMgjjkgYWA4Hh1TiuMFWP4+ZTY3wn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kk2RDp387hDAhUNedhrt+buqqRU438qLlDUeXuTRWGsr7TtII2aMqy2H+FKJmYCnR EQG3rmN80b7jHJH3NKdqCKFn3WG9cSHOoAEQV6AT0AL1dU8ejoHgMf1fkiaJJPHGqU szlN2NEwBtdIhgJl5OodEVLbmZHwTVtTbOQ9I1gc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Louis Taylor , Steve French , Nick Desaulniers , Sasha Levin Subject: [PATCH 4.4 023/168] cifs: use correct format characters Date: Wed, 24 Apr 2019 19:07:47 +0200 Message-Id: <20190424170925.011362738@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170923.452349382@linuxfoundation.org> References: <20190424170923.452349382@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 259594bea574e515a148171b5cd84ce5cbdc028a ] When compiling with -Wformat, clang emits the following warnings: fs/cifs/smb1ops.c:312:20: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] tgt_total_cnt, total_in_tgt); ^~~~~~~~~~~~ fs/cifs/cifs_dfs_ref.c:289:4: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] ref->flags, ref->server_type); ^~~~~~~~~~ fs/cifs/cifs_dfs_ref.c:289:16: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] ref->flags, ref->server_type); ^~~~~~~~~~~~~~~~ fs/cifs/cifs_dfs_ref.c:291:4: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] ref->ref_flag, ref->path_consumed); ^~~~~~~~~~~~~ fs/cifs/cifs_dfs_ref.c:291:19: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] ref->ref_flag, ref->path_consumed); ^~~~~~~~~~~~~~~~~~ The types of these arguments are unconditionally defined, so this patch updates the format character to the correct ones for ints and unsigned ints. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Louis Taylor Signed-off-by: Steve French Reviewed-by: Nick Desaulniers Signed-off-by: Sasha Levin --- fs/cifs/cifs_dfs_ref.c | 4 ++-- fs/cifs/smb1ops.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 7dc886c9a78f..1ea643faf04b 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -266,9 +266,9 @@ static void dump_referral(const struct dfs_info3_param *ref) { cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name); cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name); - cifs_dbg(FYI, "DFS: fl: %hd, srv_type: %hd\n", + cifs_dbg(FYI, "DFS: fl: %d, srv_type: %d\n", ref->flags, ref->server_type); - cifs_dbg(FYI, "DFS: ref_flags: %hd, path_consumed: %hd\n", + cifs_dbg(FYI, "DFS: ref_flags: %d, path_consumed: %d\n", ref->ref_flag, ref->path_consumed); } diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index efd72e1fae74..f7a9adab0b84 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c @@ -305,7 +305,7 @@ coalesce_t2(char *second_buf, struct smb_hdr *target_hdr) remaining = tgt_total_cnt - total_in_tgt; if (remaining < 0) { - cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%hu\n", + cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%u\n", tgt_total_cnt, total_in_tgt); return -EPROTO; } -- 2.19.1