Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5616741img; Wed, 27 Mar 2019 11:47:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkldEsiNaVpOseAHvUDbqCB9BXQTS3APGCz3BLBpHf3ZmvInnz7GbcA3jQ/b5IlqNBclP6 X-Received: by 2002:a63:4616:: with SMTP id t22mr34959369pga.217.1553712467242; Wed, 27 Mar 2019 11:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553712467; cv=none; d=google.com; s=arc-20160816; b=ZgfacEBX4BCnWV3I7NcKjUVoBGILkiRt7PYZ6K8QhFlP7q7DDSipdMKCv9EnWxF7Vi DukyDZTLvKkt2qDWWiiL1ia5E4AttVy+inX1MNe/N0gn5k/9QDooDg8xaDY4XyN/raMl /8Jvr80H6OEx0ELpy2zTzqJBgLrvicVzNf3O4Dq/jd3zS9CUSHJYtUm1M0mgRfbY/WT/ iXPWzoIT4bt3oPp4+sJ3hGkI1Z2b4SkCjMdtb0i8hVd3cZP9AU9P1mGG/pPxIqNgzp7P RyS/q1Z2pgUOSHftwi2IZOQifxggE2I37KRn4XKSMQ0FYe7DWf9vXoE3rmBZ8UKDZ0eY 5HXw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c7mfGKVOzIHM3Pp8rCfk1D4l/T3L8ShT+h1etAbhEhk=; b=vtgt5YZaHvFgyKQVGSS3SeOKPtNdcggdCJ2HUgn4pHYNUlEWFHfOP1Epn3XzV8sj6/ pl7yDJAHwEKmckTXpfSlsB35uNnpFAVqK0VJSYsCNQYdi2h+YLelvinX1vjefvlmT8Vh N2TzbTj3h2hTJ4b3qaDCHiDJmRsDBdqBcqLLnhc27UpN6luddd4YrbE9rOXKM5K0AUlZ TRFFgfFk10jEVhxqw7XeIi+qwdAwDGuXcBrY1OD9ZNfTI3O1SHxinCdPI5clKjTFrjfM r0hgDI0kSNDBaeDia4C1u0TLaNNe7KUwxEmaJSQ+pHdebk/1ldSg1blqhcSYPTaMYO8b IiNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K2iTs6DA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si18167595pfd.228.2019.03.27.11.47.31; Wed, 27 Mar 2019 11:47:47 -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=K2iTs6DA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391506AbfC0Soo (ORCPT + 99 others); Wed, 27 Mar 2019 14:44:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:39034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391090AbfC0SVN (ORCPT ); Wed, 27 Mar 2019 14:21:13 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B20D2070B; Wed, 27 Mar 2019 18:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710872; bh=Wx4K19VWgKdz8f8eVQ3LSqNd+JtTaHE1dDcsz2Vg66w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K2iTs6DA89HlFnFCQiZIhFSFse6NKjJrzQIzCTY2OtXNjRNhKiELepNIDB8wVAwuU 918Ce0wRSQNsFX28owxWg8PsWGNXUCBu1VM/1IQzIiloP0O9+qIX1XDQlizh5Vm+qX z1vBL59rRAeY05cZIoeaN6ds4vToADjCs+PSOmhY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Louis Taylor , Steve French , Sasha Levin , linux-cifs@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 17/87] cifs: use correct format characters Date: Wed, 27 Mar 2019 14:19:30 -0400 Message-Id: <20190327182040.17444-17-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327182040.17444-1-sashal@kernel.org> References: <20190327182040.17444-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Louis Taylor [ 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 9156be545b0f..4660208132a2 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -271,9 +271,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