From patchwork Thu Feb 28 11:52:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Taylor X-Patchwork-Id: 10832837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A064139A for ; Thu, 28 Feb 2019 11:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 097C22D782 for ; Thu, 28 Feb 2019 11:54:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F06B12DD89; Thu, 28 Feb 2019 11:54:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF75A2DD57 for ; Thu, 28 Feb 2019 11:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732217AbfB1Lx6 (ORCPT ); Thu, 28 Feb 2019 06:53:58 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44858 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbfB1Lx5 (ORCPT ); Thu, 28 Feb 2019 06:53:57 -0500 Received: by mail-wr1-f66.google.com with SMTP id w2so21598574wrt.11 for ; Thu, 28 Feb 2019 03:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kragniz.eu; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AyalN3R/+9m+MXW0m/d0m/0kqSvBITbtYdefnAtWs7M=; b=bybIht08JwklLU2I9b16lH7f2/meUfBi+YfdQPUNT0bGM+QcEeqVlIjX9aIyEK4Rkr OIVE8QNAYuxzJbb0DQg7RopmaLmGoP4OXm9i6nPxMj/W9Rp8PdTZJi7sm4wBt3L1mOSK E7x2RKsCJn0p35pym/zntGnEAUCQprRQOuxpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AyalN3R/+9m+MXW0m/d0m/0kqSvBITbtYdefnAtWs7M=; b=InyTivbXkzG8zA0qciO3wHl7NUKD82PEpMWmu9EhPR9KnTdxhg1rmiES6MJMx8uR9K Ns7VnbCPt9uZfRDVhYU8n7lFhip8+mSB+7U590np4d3YE8PrNNeHeRv0z0i9vGheFwP/ S3245O4t2bSrKZmVv66LF1D1u1u9bg8ak8plWoVurZMGzGeupKE9E9bzKAe6yplRfzKp 3bZS8meadrIcU17ItMj3KpisE/KwVatjLLc5HL5OOnmMmdnzcnpTE3q0fx8KM7YPpJde J+DXcrdGFg5OkwbirBRrYtnsrZZoiw3MHNyMcTGLmhpLmM/Wm5lUYBFEMf4xJPuXH3nU jUnQ== X-Gm-Message-State: APjAAAWUhbyeJaNF4n+QKX7uQ+v0g3FVmedYjQVBnOacY+M0A2iHtJbe OYmCPtmCwwyv+t0n0VssaJCQCg== X-Google-Smtp-Source: APXvYqwX78r5z9Yb0AhJA4PBL8pn2v6JuL7SyCpFlzwR4Z4DYAxuyIIbLDLNpRoE6uxvAGCZPrSxxw== X-Received: by 2002:adf:fa47:: with SMTP id y7mr6034469wrr.301.1551354835870; Thu, 28 Feb 2019 03:53:55 -0800 (PST) Received: from localhost.localdomain ([5.148.119.11]) by smtp.gmail.com with ESMTPSA id x24sm6149491wmi.5.2019.02.28.03.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 03:53:55 -0800 (PST) From: Louis Taylor To: 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, Louis Taylor Subject: [PATCH] wusb: use correct format characters Date: Thu, 28 Feb 2019 11:52:56 +0000 Message-Id: <20190228115256.5446-1-louis@kragniz.eu> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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],