Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2661228imb; Mon, 4 Mar 2019 10:42:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwkPhbCN04BkepBfNllmlTLIgH9BAidCz900hZgSCLdBYjblhCeGA22AJxGuD3A256jUggI X-Received: by 2002:a63:cc15:: with SMTP id x21mr20179857pgf.380.1551724933018; Mon, 04 Mar 2019 10:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551724933; cv=none; d=google.com; s=arc-20160816; b=jSgPN+syCL57Sy76TZtToVGqJlUNgW+icY4hMYmgye1mnD3wmhNbnPelFGJYkWFBlb ZiaxBkWShK7Ltru+sWZhazM2xczw+jQuEddEGLeVUFAvqwUTvuay972JqyVZ1jVVx1/v SIPmCUqDbIMSa9GJfQMrNdn4uvGl/3p3pY1ZZRQtpP4gLn08tRQFJkJTqYMq+38LuOGr KRViI5u0BXRoD7ZgBA8e1tHs1X5Vh/XVuaCsw1UyftapLZN6EXNkLjuXBLx49kRZan64 CyFc5PVwb/cQgRrwGafFPi9I/V+tx0kWFGbSMS4hfdvLIMg1aSGIG9KDXuPz6bxCgo6I 1SYQ== 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=fzZS7vUmOuArgCTdS12aw5KUZU0PZ2f1ZbiejdHArOg=; b=fPxEfBJ/GMsJ1Xpyuz+rMIw3kwHIvggGi0yO1I62nBQDzhsePw0JZmr57sxGkYlTDt FUwe0lf0jJTu7j/pNxgJGKVx7gicKFFH+5TUKzaf9xZ06ZVtph1IcHre/FdZBITldBnN Pgug3PH4ullg+9IteX+heXa6initEUsbKCIwV3SgxX520kzNXm72Cp1fYM2elBFX2M7R J65CarF9B4pFebf6E8d+/lIUQORuAOsP3BoffZC8aX27LrJZZeWevOTELxLrmoU2kCX/ veZWrtcxm1RvKWNQ1o5rL0G9xXnzo/bmIXLltG93RzT3VdgyyS7ZeYD7p3/DpT2tPqZn LSJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="MNlIS/nM"; 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 i184si5662300pge.505.2019.03.04.10.41.57; Mon, 04 Mar 2019 10:42:13 -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="MNlIS/nM"; 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 S1727710AbfCDSQx (ORCPT + 99 others); Mon, 4 Mar 2019 13:16:53 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38114 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726787AbfCDSQx (ORCPT ); Mon, 4 Mar 2019 13:16:53 -0500 Received: by mail-pf1-f193.google.com with SMTP id n125so3592030pfn.5 for ; Mon, 04 Mar 2019 10:16: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=fzZS7vUmOuArgCTdS12aw5KUZU0PZ2f1ZbiejdHArOg=; b=MNlIS/nMvRb1P/mCJMAVJsQwrrsJ7l8I1FODCzthHhGTFHkwInlIguWvbDWybjkK7y XNBwVOrcF6gj0SNzfW6zD2cm1ZRhtD2D/XDhjCe8yO4W5LbmuA8UQ8G0BtMWgxWSMg0c dngyP764+Zab2R2pDr5p8Yjl7Oa/5X5lLhUyd5tqjd+da0JLCio1YYEdkinGWo3qzEPc kvC/NRA2+TuV3jO+jffq4oh3zaL55q5+vKk2SJNJOQqyiiW0xuQwjSxzUKDVPxG1Fz1y AWArH8W7zIV4SaYy4h2Q2FfMvw1UxTNNgEXvyMZxNzpcyuW053afAVS0XaBMQb4PBfFX w9Bw== 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=fzZS7vUmOuArgCTdS12aw5KUZU0PZ2f1ZbiejdHArOg=; b=iyyYQQ69om+YhHcsvNHIMHmbYMb5Tip+7fHYiTMTAExb7Vctqbv4XYDP3NFZCPY7zC dlFjGyE9yNKI/BYtZnIV37uSH5ZIFuOKc1NRb832Tg0/X8+jytI6WpzwLKDx1NOd4JlR 09VgC/e+NzTtggz9fWck1XifylrVbYuOMZB+AX2SIIphUhfj0TwkFaB01Mm9pfD3Fas2 vmUNEBLmYqK6oz2dthCwT17NILfA1Q68urDtVLm4BXWjUjyyOHsnpuOxsnzuPxv0jadr f0vxaJchunpFPfu5hhI5Esa+Dp6LftJu+AFcjYALbMm2poZ7gtD1BMZXYLUD0cbAVZ0w nPwQ== X-Gm-Message-State: APjAAAWNgvl1P3iWJRyGv50p9CvsnGYXBIOi9joDSGZO2PNZMmbMZ9bM 4cDAx9Pe19zA/rsn+jS3ymZrevTL9orocKHL7L9glw== X-Received: by 2002:a62:2b88:: with SMTP id r130mr21131821pfr.93.1551723412306; Mon, 04 Mar 2019 10:16:52 -0800 (PST) MIME-Version: 1.0 References: <20190302141836.24638-1-louis@kragniz.eu> In-Reply-To: <20190302141836.24638-1-louis@kragniz.eu> From: Nick Desaulniers Date: Mon, 4 Mar 2019 10:16:41 -0800 Message-ID: Subject: Re: [PATCH] i2c: sis630: correct format strings To: Louis Taylor Cc: jdelvare@suse.com, linux-i2c@vger.kernel.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 Sat, Mar 2, 2019 at 6:19 AM Louis Taylor wrote: > > When compiling with -Wformat, clang warns: > > drivers/i2c/busses/i2c-sis630.c:482:4: warning: format specifies type > 'unsigned short' but the argument has type 'int' [-Wformat] > smbus_base + SMB_STS, > ^~~~~~~~~~~~~~~~~~~~ > > drivers/i2c/busses/i2c-sis630.c:483:4: warning: format specifies type > 'unsigned short' but the argument has type 'int' [-Wformat] > smbus_base + SMB_STS + SIS630_SMB_IOREGION - 1); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/i2c/busses/i2c-sis630.c:531:37: warning: format specifies type > 'unsigned short' but the argument has type 'int' [-Wformat] > "SMBus SIS630 adapter at %04hx", smbus_base + SMB_STS); > ~~~~~ ^~~~~~~~~~~~~~~~~~~~ > > This patch fixes the format strings to use the format type for int. > > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > Signed-off-by: Louis Taylor > --- > drivers/i2c/busses/i2c-sis630.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c > index 1e6805b5cef2..a57aa4fe51a4 100644 > --- a/drivers/i2c/busses/i2c-sis630.c > +++ b/drivers/i2c/busses/i2c-sis630.c > @@ -478,7 +478,7 @@ static int sis630_setup(struct pci_dev *sis630_dev) > if (!request_region(smbus_base + SMB_STS, SIS630_SMB_IOREGION, > sis630_driver.name)) { > dev_err(&sis630_dev->dev, > - "I/O Region 0x%04hx-0x%04hx for SMBus already in use.\n", > + "I/O Region 0x%04x-0x%04x for SMBus already in use.\n", > smbus_base + SMB_STS, Even additions with 0x00 imply integer promotions (my least favorite part of C). Thanks for the cleanup. Reviewed-by: Nick Desaulniers -- Thanks, ~Nick Desaulniers