Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3450232imb; Tue, 5 Mar 2019 09:35:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyjmUZtwgVV5rlVSD6GVmOzrFPedQEgibT93LvmspCgSnffO8xyZw4eax1/gBFf8yc3g3pg X-Received: by 2002:a17:902:7293:: with SMTP id d19mr2256628pll.29.1551807319838; Tue, 05 Mar 2019 09:35:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551807319; cv=none; d=google.com; s=arc-20160816; b=pejkuO+ip6Z+m5CFJXJ9D92Z0SOF3ij28oaeKXCr1c2MMuXtXR+KKBhSMCw4PA9ryE z+pExpoqBe5llFsMnX+RzhvXsLvza0CZO87sA9vj/IWHdu7hbxyeCQNIFIKTiLjw6ZC2 rQTuZuWSc4u9RTYKrigVmzkT3K+K08zvY0HxYu45w057U0KzbCpizEgW3joQgu6o1cFE Bkdtx+rKCgxQB95D1I777FFSPonnK9qvy9NnkffCCqWAq03ka6dMcxVhjV/jHlLc9wOA UCGOtIqnelZnam6K6rLSa3aw1O/H/pRRdrZxdi0qD+qTWt2+IU6xKUoQ0FdFed+QfKu2 +3rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-language :content-transfer-encoding:in-reply-to:mime-version:date:message-id :from:references:cc:subject; bh=MCZ0h3Dl4Itk7TaoRfhKP2LMB7SzjR3p0ecyJZTmrfk=; b=I2OsV3YFQvXcl1pWegFP5V4PK/4qOhaTNo5QYb6gKGQ5yQVkur1QLJlMv2pYRT2gM0 d+d+63Hsb3Jn0hZcYfp8O64CvVfHTgXuAk1Eik+/Ae5ZHXpzb90ER8w7QVk8G8PiOSah GrrQU7S1D54crkQLFO4nJ7K0o/j729b2giAVdF/8mOXWL2WSs4ZQkZMdH8TDDnvKayqY CWPwFH9M/rhdb9Gb9UmtMQnlyDkSMBp7cHtcxjHxFRMscj7iPrSoBL2m0kLv3bgyWdEW HkQbb7mcEv9nWbqbra2neUxQoX4EFFaw28d52UVUr/Urma0reZnGmQ0MxPOpnMyp8ipL k2WQ== 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 z193si8299810pgd.167.2019.03.05.09.35.04; Tue, 05 Mar 2019 09:35:19 -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 S1726716AbfCEQ3f (ORCPT + 99 others); Tue, 5 Mar 2019 11:29:35 -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 S1726100AbfCEQ3f (ORCPT ); Tue, 5 Mar 2019 11:29:35 -0500 Subject: Re: [PATCH] wusb: use correct format characters 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: Date: Tue, 5 Mar 2019 17:21:42 +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 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Test 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],