Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3448945imb; Tue, 5 Mar 2019 09:33:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyrMQAK+y/zKxD3a2cGGZUSPCAqCfCTWUEfxFClna7GfwHZ6/+CHRL+AdjVN2GlVcEQBdJB X-Received: by 2002:a63:5318:: with SMTP id h24mr2392987pgb.76.1551807217267; Tue, 05 Mar 2019 09:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551807217; cv=none; d=google.com; s=arc-20160816; b=gl/cq+dEuEDxJoBU1EYGOdL18frM3BWZiHmxqX/WxbUHd+cgMLeIRrIm/F6Ps9Cksg +4HhhzIwGIS1Uo/76xsXWFWcb+LU1XBwgHq2N4ThRpxHDPt7hSlNSOFBVtOe1mtJNZva l74ERauPCZ4lSh2OBJOWkXcEhlDfrpOl81UG49A7RS9AQ/jI2xE+efMaS+//ZdNcVf/H NOsgVN1Id4ub9YNOV9RpHkTh72FlQNVQRZ00To993QwmFYILiOmAkMrcltxVV/SEqC88 RaZvz0PE1kD6mitpmheijfoNMcsDF0A6yc6MxJ9jijLgzB08kFqZnx0/nrEhoCDLWsrB GuUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:date:message-id :from:references:cc:to:subject; bh=5aNX22PzvSPrpguHm7h+eancmQia2yJRS6pMVfT9sAE=; b=lxGzJHIn02abq/AHc2JLQsseS6rnscGM4UDBmag1kCfLHa4wIisIgSfBzGu0mF6PVa cAbG+ohJa2u5yNQdm5V5eBBNlDILhDnU61yUR303ymyQFee+iyYSVLI2nGB4okbeJ9zD NXGYxVHCv7LpqgtcBtaRaw1Mw2WsOzlzlDH8hbE2TCFwtrOKC5HlTdWf8HDlvSUrRZkq B3jWEtkql8LVjXwSCMiXOS14Tkdks+ARcNhlt4/hfVgezqO2DddZfb9KPhQSWAqzRXBn 0VeGC9oS898HT0JvkbLPe7+jaoilRMqDPuo+klACPGBRwWrXeqgqBvXPeV1oMjLlEset fl7A== ARC-Authentication-Results: i=1; mx.google.com; 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 j3si8203471pfa.194.2019.03.05.09.33.21; Tue, 05 Mar 2019 09:33:37 -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; 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 S1726661AbfCEQ2n (ORCPT + 99 others); Tue, 5 Mar 2019 11:28:43 -0500 Received: from HSI-KBW-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52]:39597 "EHLO mail.linutronix.de" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726161AbfCEQ2m (ORCPT ); Tue, 5 Mar 2019 11:28:42 -0500 X-Greylist: delayed 416 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Mar 2019 11:28:41 EST Subject: Re: [PATCH] wusb: use correct format characters To: Louis Taylor , gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, ndesaulniers@google.com, jflat@chromium.org References: <20190228115256.5446-1-louis@kragniz.eu> From: Test Message-ID: <85b6ab1a-d131-70cb-da64-a68a817e795e@linutronix.de> Date: Tue, 5 Mar 2019 17:28:39 +0100 MIME-Version: 1.0 In-Reply-To: <20190228115256.5446-1-louis@kragniz.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: ORIGINATING; auth=pass smtp.auth=bornkessel@linutronix.de smtp.mailfrom=bornkessel@linutronix.de Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hallo Am 28.02.19 um 12:52 schrieb Louis Taylor: > 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", > ckhdid->data[0], ckhdid->data[1], > ckhdid->data[2], ckhdid->data[3], > ckhdid->data[4], ckhdid->data[5],