Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5980898yba; Thu, 11 Apr 2019 09:32:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqiXLl5JzJJGPem+M9ykyIXYr7aH/cg0bUFPkypdkUQU2R6KNI3zpvqGVRdkVBD/99EyA2 X-Received: by 2002:a63:4101:: with SMTP id o1mr45730050pga.17.1555000369388; Thu, 11 Apr 2019 09:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555000369; cv=none; d=google.com; s=arc-20160816; b=ffWHeiIG7oEEpUXCmOZ++1nDpK7tuavABj3b3W33ebEmu3ID1HIX4/gTA5Fvbb3OyF ultUo4oz1y+VZF7VQfK4SOxTlCKb9SKbthl9X+phNCKDstvvw2X9ZRtTvatGzjVlaqv9 vlL8AfhAjUiXEL/w5BzU1v/yEk9JjkkbSgcVkPyS+xvI+ADVJkcUUr4mDyISNK9VIO4B CAdsEaVmf0122BJw3KvHGDRP2Q+4VuWOLrYKvl7HyevMaO7NypRYTK40mz1Q1HLXn6gB nea0sWkMcH7Dz1kuLdembrsMpIbaUDzlCeMvAFXBWxioX61TcGrg1NZU8uozIBcEn74T MPAA== 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=PCcoTX4LA8KS8bEnxZSQEThX2XzJhm+CUEnju1IZcJE=; b=jac6UlPekHIVVkVsohL9hOcvmU/104HFpPNNdmucQgngJyeQ+rs+mNjoHCIhdp93Nu H5sd2HKfYk4xQNk5TARsQjHeigVRiJpCAXxpREUyLd4TC6pd/MZyMHrV3KatH53FumWa IlfPjuZU86TAqFhgR9sXzvjr2Ce0aEilSVHW3FSzJavT68gEr6yCZ2zuNNYTa0I4hQ6H xIZmcPXY4HxDF1UczE8mBEQIbMaqyNZFQCegdwrqhCfIsjot/ejXAXTr5vRAx3GS6208 fquCsSR/MAW5t4wbOwoCGv5ziuR5AGfsf6uz47XEZ+ftRSAeX/9mD/hJZ+/FF8U9CNDk WY3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dSxDuqKX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s20si24493651pgs.509.2019.04.11.09.32.32; Thu, 11 Apr 2019 09:32: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=@linux-foundation.org header.s=google header.b=dSxDuqKX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726676AbfDKQbx (ORCPT + 99 others); Thu, 11 Apr 2019 12:31:53 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40494 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfDKQbx (ORCPT ); Thu, 11 Apr 2019 12:31:53 -0400 Received: by mail-lf1-f65.google.com with SMTP id a28so5201128lfo.7 for ; Thu, 11 Apr 2019 09:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PCcoTX4LA8KS8bEnxZSQEThX2XzJhm+CUEnju1IZcJE=; b=dSxDuqKXO11vfHoLgMscdpgmSzxdUelG1gZPVBcGPVJIcPHTuKyAIDUFmyTPOAm5hM 6rlxfnGo8omW/oCDwQ5ywL/Mj58VMIWixN5Z5EdOzEWYHVOtKLawg3KksgUSsoMxzKsZ LQpjGm3cbEu/osYjKoehbnG1lPUPqziMhw1XY= 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=PCcoTX4LA8KS8bEnxZSQEThX2XzJhm+CUEnju1IZcJE=; b=AM42JrXwwh0HZt1AfQWpjnvzgXyhDtMxi/FmkSOcg+UNB3W7tW291+cDGOdCs8Oduf rgzYdJQBKNs2SIKiB0tifyzYp1+OQLJdUvJEyNM8GXEcr408IDtX6iRW6rwaWcgDYRQA h3Cn+ijnUzaRmnh3taFbuaNabZa7Qdry4LvqVI672s1kBYGVWVraRg96NjpZhysQPGQV 2xJ9auqGYaXNjQSQ0ybAhToVUIGwQQ37UJc8TLUeJcktB6I5iKb3KXEdgblICmVtZ+Ew yN2GAXBlxCDhcNIigER69Z03N2pSorHJJLfKwUYoLzup/Adx9Xn8AHA7uiYd43gtzXUB hzZg== X-Gm-Message-State: APjAAAWfkjOaTIvDA79Yh8gxF/0kkCHi7LJFyKBslQfuLiy/STO6Ew0u Ip/vHUXgr+x0IutIUO0zGS5Do6f4NI8= X-Received: by 2002:ac2:59ce:: with SMTP id x14mr9676038lfn.69.1555000311025; Thu, 11 Apr 2019 09:31:51 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id a17sm668719lfj.24.2019.04.11.09.31.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 09:31:50 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id j11so5218222lfm.0 for ; Thu, 11 Apr 2019 09:31:50 -0700 (PDT) X-Received: by 2002:ac2:44c3:: with SMTP id d3mr26089713lfm.14.1555000309362; Thu, 11 Apr 2019 09:31:49 -0700 (PDT) MIME-Version: 1.0 References: <20190410220301.2332-1-louis@kragniz.eu> In-Reply-To: From: Linus Torvalds Date: Thu, 11 Apr 2019 09:31:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] afs: use correct format characters To: Joe Perches Cc: Louis Taylor , David Howells , linux-afs@lists.infradead.org, Linux List Kernel Mailing , 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 4:01 PM Joe Perches wrote: > > I really think this clang message should be ignored. Agreed. > It's really unnecessary as every vararg argument smaller > than int size is already promoted to int. Exactly. It's a pointless warning, making for more complex code, and making people remember esoteric printf format details that have no reason for existing. The "h" and "hh" things should never be used. The only reason for them being used if if you have an "int", but you want to print it out as a "char" (and honestly, that is a really bad reason, you'd be better off just using a proper cast to make the code more obvious). So if what you have a "char" (or unsigned char) you should always just print it out as an "int", knowing that the compiler already did the proper type conversion. Linus