Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2352257img; Wed, 27 Feb 2019 15:15:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IbcEJ+7ex2niS9Hsv1+qyMa+6zn7avcKOXYi2le6WAGGr/Bqv0BVPlv0o7pZJ8dN7f6Hwt7 X-Received: by 2002:a62:f5d7:: with SMTP id b84mr4266810pfm.36.1551309357696; Wed, 27 Feb 2019 15:15:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551309357; cv=none; d=google.com; s=arc-20160816; b=TrtouEmIqZa/fcR0D0FHvndsbf4u5swfeNhNbHYYmKFHt7cbfN94GExEZ5u/ccp1BJ ap4ynSWIZTltMec24LpF1Vb+szFRjB6CHOR76Aq+5w+iGCJnCjun9PsA3pf3kUCtTt1S +l2LR1g8bbEthwOTQaUTWDQE03hRm8iTj6/Fw5NUObZUxa64xRYFqAfkNaeiGd17BS5u 6cdDmfWEpachpaTZTzTWujsSERU/1cXEqwVfL6tXHiI6u6yn5L5OK/Oji+k9PtuIYnYJ hGVHJyCHUZLkCUQz1x+THkvk25rJUtmwbMW5+9Xg1mXy0yCU/YntbvxPvBnq/aT7a1cL ag4w== 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=ieTp+KoWHfqUwaKdmwu5YzuGwMHkzBDwZFNJcECypUE=; b=sfa12TnOKKDALhvFReGQv6BI33LCyTP3Dado03/ujYcLMG32tHtkqhSYqxXV489Eq1 Sb4Qa9rOVBeexHobDMnZ3zXlDWsJwqz1dg1SiGm990cqG1nUTGQNluQY43B9xGE6w3/N 6EsTLjOtvYyr5Ag7ncPiCoKnFFjYsFVwc2geBOM1YoCryoIuGiBsOveSebs1JCY5LzcY RqRWnO7R7fRO8HGYztCUkfIylH7uIXfgrNWVrputo/OA3X941rHuKVpvI62Xb/qV7ZB0 BNeDljwn2OG0oGorWbXZyQ9GASbi3i8F0kCv6+HysEFH2BaBW/SQiNYmgBAsUsw+fj4m b7dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OkCsFlzr; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 125si17166957pfz.148.2019.02.27.15.15.41; Wed, 27 Feb 2019 15:15:57 -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=@google.com header.s=20161025 header.b=OkCsFlzr; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730534AbfB0XNx (ORCPT + 99 others); Wed, 27 Feb 2019 18:13:53 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36217 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728397AbfB0XNw (ORCPT ); Wed, 27 Feb 2019 18:13:52 -0500 Received: by mail-pf1-f196.google.com with SMTP id n22so8740047pfa.3 for ; Wed, 27 Feb 2019 15:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ieTp+KoWHfqUwaKdmwu5YzuGwMHkzBDwZFNJcECypUE=; b=OkCsFlzraH/jpAxupy2zkyYqddTwlJR2gcugk5iCZGmAuAIVDZEJGa3olwimZR7e15 kj2aEkBaOZgLV50FXETkhKSDCJ0RFRvQWpD85qHnD0k+atAYrXkAXie+hAa0c6iYqeP8 W/kF3BjsKDJL80kXJkliFp/QM16vH4PuNris8txkl6BxHu/QcppRV9nioVqjVDTlcs0h Q7RihSvERuxcxbe7evlSL2LtH8OqDpYcrtOqUGszbWkcfv6UaDfGiBK3V78P1V3uLxTj sDYlLLMKTd89kb/uRkLba4QMFbLnw14sTxte9yTqUhbFXW3GIfFgtX/d/v6xsxQEw++M 77gw== 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=ieTp+KoWHfqUwaKdmwu5YzuGwMHkzBDwZFNJcECypUE=; b=OZGMMhl06GxEwPY+pwKzCFP0paxMCSCBGuFcG7UmLIvqoHANPdq814jpucW9NL4Xxj EEIQJzt3V0aTbOM4F+zTNr+IveLYolRhZXuMiJwMZWUnUrCTzRNK4MrOnN4HMWSdvaMB Kn3K0iLVcPjUMT/e0RpSpFxWpGn6xA2xTpDCLB2rtLJPuvR8oltEZQLo4jB1nSA70DFS wybnR+YZrZzB7hUeIoVBsN0BtPhmWXw9vvb5HP2/7f2DZeaaJlVdmTYBX9D8F2u8VVN7 43wZh/xdNiMEAcQskmQUoBLZLV6YXTDVsMq57Agf70Et8ofSj6uz5Pa6Miycruhf3Oh+ v1Cg== X-Gm-Message-State: AHQUAuYiAQoHtfD2/Mj7CriMNDRUsV68+IbPuoGOfb7EBrSVlmTMA/cD nUMaONJlOCRPCxFUdxA6PlsFiNklu94x0d+oX98U6Q== X-Received: by 2002:a63:f544:: with SMTP id e4mr5422768pgk.145.1551309231419; Wed, 27 Feb 2019 15:13:51 -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: Nick Desaulniers Date: Wed, 27 Feb 2019 15:13:40 -0800 Message-ID: Subject: Re: [PATCH v2] cifs: use correct format characters To: Louis Taylor Cc: sfrench@samba.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, LKML , clang-built-linux@googlegroups.com, Jon Flatley 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 On Wed, Feb 27, 2019 at 2:26 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 Thanks for following up on the feedback. Reviewed-by: Nick Desaulniers > --- > 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, ~Nick Desaulniers