Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp266150img; Wed, 27 Feb 2019 22:02:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IbGvisEKAYkpQS4fNcnOzQaYvCWiFI1F2XdqGbeEaW/8q+rwTxkux9tZ+jezp79Bt6HUkEr X-Received: by 2002:a63:cc43:: with SMTP id q3mr6880629pgi.387.1551333738870; Wed, 27 Feb 2019 22:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551333738; cv=none; d=google.com; s=arc-20160816; b=s3FO7wILlS2HSPAE+azVyrRch9Vhu76+ceaUGU86lV9SihTYxmN0n2TomFPqIYo80o f6uI2x5ygwksI0Umjf7ftpkbj3hZu8VuSCHnqsQ70aOQGUsZuyZkPRxf4QlnBjVvlbHS p4isKuMzgge1pn4AebzmhiY3ePr7WVkrHTWkJuxILzmIQoSq/j+lOVJXeaJsyulr5yQT sCJaR6VjnMCHvkWrkjCuzOi2TBNtYCPcD3FpmPbvj3TOnfu9dUF7qyM70EjP94skRzHO BaBUFvWC7bMa6vONYWjc56Zj6GIzuYCIHi24//dRnZsS+gIT2ENSL4KzVnREQ8JLmPoA /g5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7SwTKAKFXS/JY2dv0YPxKSX37TBfcurhbF9H3u11S98=; b=Gjqt/IQw3CX7vdHaX6G/mzOUw+FOqnq5KZ4myPq3GWXUkFVJ47RvhuwYNCQJPvCAR8 gzOv3QorL4IgYxd1rGv6t0fZGwfW/KQEXV9WBFX4+UfXRUjFdtHZ8sDn6Z61AlbyI8xL opU9j53y627B21ASAWlMiHMLRhlMX4K+j94VMrJwOit+YI9SI+ZI0XMWdFZ60K3rlctk UpyGnngIXcGFXifEYzv7EXcdelLlQqlkVeSPl31bc6tNwkKZmrwORZVFpWcSpYO06HyP Kk4JwI8aazhvBQY3QevL1NsrvaiMISMTW2jzGvhzr+teDN8UgCTjhSOdcjLBs0/8cfoz bnmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G+FamryI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d19si16038390pgv.522.2019.02.27.22.02.03; Wed, 27 Feb 2019 22:02:18 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=G+FamryI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730580AbfB1GBo (ORCPT + 99 others); Thu, 28 Feb 2019 01:01:44 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37264 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfB1GBo (ORCPT ); Thu, 28 Feb 2019 01:01:44 -0500 Received: by mail-pf1-f196.google.com with SMTP id s22so9193442pfh.4; Wed, 27 Feb 2019 22:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7SwTKAKFXS/JY2dv0YPxKSX37TBfcurhbF9H3u11S98=; b=G+FamryIeKgf9smikTY9LAoZIqwXoTMV9hOeDTOeLAuAQ0diFI3areFYlgOlcy7y0i YsWFgq4oppiiXf0gEDFZLCXPMUkx3a7jzaYXQ2tu9dD2v+CTCWVEkhqyztI/qNlUv4rC K9rNt1Rdbo7Tdoho3LLnEpZ8jFy3Nlw4ZkptlkGKM0mCxZxTCRU9kUfkEDlMzEuje1I8 J+wDD+C7eaiJ5Wezckem/Btm2RvQrxPwfDRJjHJQoJn1Bc6OUHBJZJyOr4Rg2YkBUpxe C1RsNVFwWnTqOMFkYr0aasIdc+RSIOmROUKb5soETKyjD79+JSemAaNQinyvtsURDZbT oTfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7SwTKAKFXS/JY2dv0YPxKSX37TBfcurhbF9H3u11S98=; b=QVStc5QFc8bCaL4TqgMWQPeRTFGGsjmVjI8IkiotQDmxpvG+AbvdwlbUW9H60DRKMP SUd7DIAg67xWvGWbGs/yaHrt4efhxq8c/nYz1Il+/tJz0Z2XegDhE8vll71Fg7Ps75vO kI2f/0nQfmcMBQAvYu4TnvQ99Qnw8yTEoscKRpwtIGjjoD+RdUfslQIDp56GEJ8sSJ2g tzCzduRPuAqP/Vn/W8c362JpQYbGIZ7AlUc+fUCBlxi+yvAgui6yBg3elB8wK/PszaVB fk9N5eu6EMDruaCxp0wImpPM6AxVaZY7XiNUznS6IykYbYweWICPnVd2WRRJI8fsQgfj +9rg== X-Gm-Message-State: AHQUAuY0GD1UJCdCHj85GX120RshjaKIDJPt8R6Rjvv2hdyPkHeFfnqF 89/byE8YcSXUTW8R6Lmpknr8baX+avxsHiW7Gjk= X-Received: by 2002:a63:1053:: with SMTP id 19mr6849396pgq.55.1551333703503; Wed, 27 Feb 2019 22:01:43 -0800 (PST) MIME-Version: 1.0 References: <20190227202202.21817-1-louis@kragniz.eu> <20190227222515.32579-1-louis@kragniz.eu> In-Reply-To: <20190227222515.32579-1-louis@kragniz.eu> From: Steve French Date: Thu, 28 Feb 2019 00:01:31 -0600 Message-ID: Subject: Re: [PATCH v2] cifs: use correct format characters To: Louis Taylor Cc: Steve French , CIFS , samba-technical , LKML , clang-built-linux@googlegroups.com, ndesaulniers@google.com, jflat@chromium.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org merged into cifs-2.6.git for-next On Wed, Feb 27, 2019 at 4:27 PM Louis Taylor wrote: > > 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 > --- > 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.20.1 > -- Thanks, Steve