Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5654334img; Wed, 27 Mar 2019 12:31:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0ehS04kykVInVkgzyHM0G0Q/gt3twPg/5yVkj2FCbFgw1ZK0kAEF8WA3uP8fyiyyOqwZe X-Received: by 2002:a65:4342:: with SMTP id k2mr36677865pgq.445.1553715109468; Wed, 27 Mar 2019 12:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553715109; cv=none; d=google.com; s=arc-20160816; b=l+RCpuwTzS6h4EdJl/RKF8ejm4c+DMtYkEq0SeWy5HeRQSiRMuLLn4tqkJNIhBsjvi 6zW3aHP5cvR3O+xSMGfgV/6e5dT+eEO98KNNE9Z3QnDxCF2iRvfVVxk4oBDKKlrd5ZxT F6xDRnYwEFjKUv+q1djAH4pUEi4jrA2A2AGGadDkxcsik8zhcwFQQOm+tEPXnBrtGDNa MxbjfHGTJ4RSIoyaNv71nbvAHn1s11tOJxFGen06dgb85sw2OqP3hlWD9g3GoYKlPVi2 jVHpEuiP/iNrNDEBE2wWtYQaK6jmkJ1Uio07zvZSMZFQrW0jKwCPFFHKoL0STSVHS94k SMjQ== 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=3c5oREULjuqFZe5mfvsp/3Tb00zsf3lyWzO9QpipwQs=; b=gyNv9LgazZeKa8hjt8kn0vEkT4nmChGrbquZ29JpywcUfXEPRrxtyPub1qpDbGe3Nr WfZEJMkVDzDR34VFSh9+5iReuBtBGX93VKxL7xofl4A3X0RtqENJ6FoZDfhHVJsgNdCK XMA4IqffsyH15tyonoP2XrIH0Jvkk92d20Akc5NG6CUqOIJIlrTarNbiUv7If9d0f4Bl BXu3VWb9Y9cazPdo+GkJiekFwimfmJnwumyjrz5/DOYwDuwAj7MYzzcH1K0UQWxuT9sr T74KEAgjxXTRDNp5VAvISd5CbVmZM3paKzPdQ+RG+xMwm4rOhOIQ9BhJOHOP2XKIVJVb xfng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yIch61e0; 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 b2si13351169pgt.494.2019.03.27.12.31.34; Wed, 27 Mar 2019 12:31:49 -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=yIch61e0; 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 S2387845AbfC0Taz (ORCPT + 99 others); Wed, 27 Mar 2019 15:30:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:43636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732242AbfC0SDZ (ORCPT ); Wed, 27 Mar 2019 14:03:25 -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 9D318217D9; Wed, 27 Mar 2019 18:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709804; bh=7NkU1CghCvuFaeWijapwxYOaHxJpU693Nv+fSrgOEPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yIch61e0xyWhgOFthXCspb+DM/bkF56QXCWBBqoXJpAyd1yYBqdAe2PkNN4gip5lL qzSt1yfduGYyFIv9iXb4ziccweW5ELey9HNM2e7wG/XXs7AvLPmGxExlDiSEZnC9uf 95xC6s59PWZKCz453NOodlVQgQEc2RuNB+F3oi3k= 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 5.0 046/262] cifs: use correct format characters Date: Wed, 27 Mar 2019 13:58:21 -0400 Message-Id: <20190327180158.10245-46-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-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 d9b99abe1243..5d83c924cc47 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -285,9 +285,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 32a6c020478f..20a88776f04d 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c @@ -308,7 +308,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