Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5268276yba; Wed, 10 Apr 2019 15:28:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEjfinnJFw4zk5flUiP17ezM+YnwAAkk2LDBxzEJofuBhAKQmDkM/S22bQgAhqGU+zSMoz X-Received: by 2002:a63:f74c:: with SMTP id f12mr42628738pgk.124.1554935305487; Wed, 10 Apr 2019 15:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554935305; cv=none; d=google.com; s=arc-20160816; b=HViXbsGZQrhV2P0JkuCS9TetbomTb8dGcob2M5/aOI4WVDvyHaEpY0jSJWMlcP/G9m kRUa59U1wZNlWoUcacc5oek6UOLpKKvzSvUtXlDX6sWwof8lZQ69GoShX+DZInrISami 6vfzt2u/gS2eR06eGG/ziuaLNyPYyrXgMLCwdxA7YSW2wv+Plp4G9zENe2A8ICI2HMwK DE9CI/SbFVsV15mKZrHfLu3rvVwtvJzRRXnfjvT7gTRqh3oUZFU6Q0x2aG7+kAoGu0lt fpKcOx5U6BaKdTRjrJr5f1kIvnY1MHFEKWsOq1sCuKyjn6Gz3OgBolatT2iOvtfg6XkL kOZw== 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=LKdL31+8foJtd7bGbyGnDeB/b6OeiseHFJOeWG1JQTQ=; b=X3bJXeOkoe8R6n3AyIMNgY6Lsn10Wg8L1R2mVn7dcakpLnTOzoPAu8qUpiR+aWTE8X HE1Q8IIJ8GZ2eRItMy9Vr6IoTNp+MscJQOVhHKuEy/vhY/hezaEq2mMNlo1kIEL12cPi UMt+dMIYIOMmz9R0AT+BiNv58EBWvk31Q5zDfhcBg+YehmmcLkW9KJqhQOtjvfHYxNFS 2qWLLNHnoMd0kSdjF+5iMvOyjGimzFk3z5oqnzjnLAYWkUsXJKWB+7115rLBURj5bx/Q UeYTvZuNz5b+keSlb74WYc8cLGvnN3009nj5NRvtjrQeMT7JTGFG6hpNH35FECGduWXW yISw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LsFTxSAG; 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 bg12si32665489plb.295.2019.04.10.15.28.09; Wed, 10 Apr 2019 15:28:25 -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=@google.com header.s=20161025 header.b=LsFTxSAG; 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 S1726623AbfDJW13 (ORCPT + 99 others); Wed, 10 Apr 2019 18:27:29 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43337 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbfDJW12 (ORCPT ); Wed, 10 Apr 2019 18:27:28 -0400 Received: by mail-pg1-f196.google.com with SMTP id z9so2368636pgu.10 for ; Wed, 10 Apr 2019 15:27:28 -0700 (PDT) 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=LKdL31+8foJtd7bGbyGnDeB/b6OeiseHFJOeWG1JQTQ=; b=LsFTxSAGGNZ3texvmgL48jZe+nTKj3WfcSV93n6mr1O/oflm1TZjNr3TZ6d5Prr7VL G4eS+83abr+ducwvrO15GPRXBcaZt7y3vF4XLGDuZR3G49J+T1q/48fa5qqYycu6ka7X LqhrS/Dw7qfKeLal1f/7oHitSPg2rozucKt+vo3bpHHBVSpy0CyZAFVMtysLmwgxK/Qh 55wBglCRUjRYdJywW4j/EaYOm2VscSO+yF7od23y6kdtdfdGzTaVREeDpjtrNQNbqMtC gLIcnlb4/uTbTS/U6Qjz0X0a4ni+6o3DCdReCgYARHcmzLp+OG0YM2J/RZvOiWkD+Y1p pTmA== 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=LKdL31+8foJtd7bGbyGnDeB/b6OeiseHFJOeWG1JQTQ=; b=NvHXYZB68nrli5igDQjhNqkjjyAClseGTfCW7HsusIQd6sw8PaAu/Kn0OjvSPMbfOZ /3rivlZEaq/pfcuQMYdPUeQ6tfrN9uJcpwUEcVn5Ro1LR5blOENPn7aosaZcX4xdDuU/ 68pbv6mc5LPm6/wV6VcSeh72tMw7lU11KgOvH9eIQfuNtacbUNTyQj9z6trvVxxCd07y CAWOXB0fS00IdUXeKJEwtQtvro14HQcG9TfQK1Raho40Jited5SagaTqvweKlNkqoJ6A 88tI65odhu2D7utRYcqkZYrbEo2z6kLhjsHfA/nw0Vd8cSQjjmAm+JXFBp+dghImATt/ PCWQ== X-Gm-Message-State: APjAAAVhb+VDK71XqLCcKY2VZdipbyjhhsJMANrxcZZbesbx9YKNuoPC k4NUxrZM4v3lyxLlVmDtSAofUqG2C5WAl7WpcOA+ULYTVk0HAg== X-Received: by 2002:aa7:8096:: with SMTP id v22mr17151971pff.94.1554935247511; Wed, 10 Apr 2019 15:27:27 -0700 (PDT) MIME-Version: 1.0 References: <20190410220301.2332-1-louis@kragniz.eu> In-Reply-To: <20190410220301.2332-1-louis@kragniz.eu> From: Nick Desaulniers Date: Wed, 10 Apr 2019 15:27:16 -0700 Message-ID: Subject: Re: [PATCH] afs: use correct format characters To: Louis Taylor Cc: David Howells , linux-afs@lists.infradead.org, LKML , clang-built-linux@googlegroups.com 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, Apr 10, 2019 at 3:03 PM Louis Taylor wrote: > > When compiling with -Wformat, clang warns: > > fs/afs/flock.c:632:29: warning: format specifies type 'short' but the argument has type > 'unsigned char' [-Wformat] > _leave(" = %d [%hd]", ret, fl->fl_type); > ~~~ ^~~~~~~~~~~ > > fl_type is declared as an unsigned char unconditionally in > include/linux/fs.h, so use the correct format characters. Thanks for the patch, LGTM. I had in my notes that there's a similar warning in fs/afs/dir.c line 138 format specifies type 'unsigned short' but the argument has type 'int' can you verify if that's still the case, and if so, roll that change into this one in a v2? Otherwise, I'll post my reviewed by tag, and we can take just this one. > > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > Signed-off-by: Louis Taylor > --- > fs/afs/flock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/afs/flock.c b/fs/afs/flock.c > index 6a0174258382..be4c3f6a3178 100644 > --- a/fs/afs/flock.c > +++ b/fs/afs/flock.c > @@ -629,7 +629,7 @@ static int afs_do_getlk(struct file *file, struct file_lock *fl) > > ret = 0; > error: > - _leave(" = %d [%hd]", ret, fl->fl_type); > + _leave(" = %d [%hhu]", ret, fl->fl_type); > return ret; > } > > -- > 2.21.0 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To post to this group, send email to clang-built-linux@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20190410220301.2332-1-louis%40kragniz.eu. > For more options, visit https://groups.google.com/d/optout. -- Thanks, ~Nick Desaulniers