Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp627761img; Thu, 28 Feb 2019 05:24:36 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia46t8OcQLqrw3M6zB2MSRlB+IePrmEGfZOtXEN6cLpfMpIGU2xCpEAHdMwZUHLyQWXXEDn X-Received: by 2002:aa7:9099:: with SMTP id i25mr7543602pfa.102.1551360276269; Thu, 28 Feb 2019 05:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551360276; cv=none; d=google.com; s=arc-20160816; b=ORd25ufsBTFdRPMm2CZPe0GVFjM2HuDEXzqJJbvwiKJ7TvkrkPm/fr96EWbvbaiLdy Qx8CZnAqhif+a+bQiiYqhDCUR2Z92LtKBiuKJFcsPf46J82aAdqauavJLWn9eWOIkvl3 z3nGxQ3WOMGeKIX9VDs1RjR5dvuCZJDexqqZNKwj0vQcXQNa6oTGZLpW4VftjSFY1ydH 1q+SxehO7M1vyDaUHM1dZG1QLz7OldWsLpqWIn6I5LP6eU9stMoO3xUl639cAJjYPTgr +39DX86r9V0NRJzwLlHqMZ9GX8YYROrXkRqPdNay5tA4TYpKcAneUItixUDa/SBfCDoX xh7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3nL1QKfpvZEhX+2jUUustwV5JWPeb9Wf0ko7xzGXorc=; b=WsURIL6RmkU1Q1dSNW7plDU5xtMEY23H3kvOj3VcCupcM3PjyVeFXUY7IiyEjgmrSz lVTZBF/ErCHwVIcdQx8uFfg5p4IVFWuK0rtdR/sOnx6yb/0KAlp9Zq2NdufCxe/iXlOA prWvgv7Q/+cW/9aGfxadd7tjXmHrLHC55HgMPckLSYLGEZylYBADnavszAdH91I1G8mq V1cVBW+6Y3YMAuWn2m5OIrr3srLRveTgt1G2DWvgAbat0oNUiPlRKHhBe5GjNhholszH Bvo9oHny9TiAFi/QM8LxBI/icVgglXlcDyukR3Ag4wpned6+zBwCO8Y5iA45WNbTeNIO nkzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RBd5HHXV; 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 13si18543072pld.72.2019.02.28.05.24.21; Thu, 28 Feb 2019 05:24:36 -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=@kernel.org header.s=default header.b=RBd5HHXV; 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 S1732376AbfB1L7U (ORCPT + 99 others); Thu, 28 Feb 2019 06:59:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:42720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfB1L7U (ORCPT ); Thu, 28 Feb 2019 06:59:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62E6F20863; Thu, 28 Feb 2019 11:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551355159; bh=TWxtlnFpjlpdcNjrJ9rGVBB39pVm6dryZjocbC044/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RBd5HHXV4lRrPbx44UCCRBKIK2grHvDBm0D+g/+A2NASeawqYgYJ6oP9tXkj8tVp5 v/AJf1QHrIfx/dz0Xn045+r4u33OAH2Xi8z012s7jg4GJbV2TvGRtKskLkwKuTm9hU R0N9n9+R9UV9+9q2XYarqyE+0XmvROF7MjdvrOmM= Date: Thu, 28 Feb 2019 12:59:17 +0100 From: Greg KH To: Louis Taylor Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, ndesaulniers@google.com, jflat@chromium.org Subject: Re: [PATCH] wusb: use correct format characters Message-ID: <20190228115917.GA2825@kroah.com> References: <20190228115256.5446-1-louis@kragniz.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190228115256.5446-1-louis@kragniz.eu> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 11:52:56AM +0000, Louis Taylor wrote: > When compiling with -Wformat, clang warns: > > ./include/linux/usb/wusb.h:245:5: warning: format specifies type > 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') > [-Wformat] > ckhdid->data[0], ckhdid->data[1], > ^~~~~~~~~~~~~~~ > > ckhdid->data is unconditionally defined as `u8 data[16]`, so this patch > updates the format characters to the correct one for unsigned char types. > > Link: https://github.com/ClangBuiltLinux/linux/issues/378 > Signed-off-by: Louis Taylor > --- > include/linux/usb/wusb.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h > index 9e4a3213f2c2..0a3cdf10972d 100644 > --- a/include/linux/usb/wusb.h > +++ b/include/linux/usb/wusb.h > @@ -240,8 +240,8 @@ static inline size_t ckhdid_printf(char *pr_ckhdid, size_t size, > const struct wusb_ckhdid *ckhdid) > { > return scnprintf(pr_ckhdid, size, > - "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx " > - "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx", > + "%02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu " > + "%02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu", Why did you switch from hex to decimal in the output format? That feels very wrong to me. greg k-h