From patchwork Thu Feb 28 12:24:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Taylor X-Patchwork-Id: 10832955 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 AA1801390 for ; Thu, 28 Feb 2019 12:28:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AA002EC05 for ; Thu, 28 Feb 2019 12:28:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E8B92EC21; Thu, 28 Feb 2019 12:28:36 +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 3B30D2EC05 for ; Thu, 28 Feb 2019 12:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732458AbfB1M2X (ORCPT ); Thu, 28 Feb 2019 07:28:23 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33214 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732317AbfB1M2V (ORCPT ); Thu, 28 Feb 2019 07:28:21 -0500 Received: by mail-wr1-f68.google.com with SMTP id i12so21792782wrw.0 for ; Thu, 28 Feb 2019 04:28:20 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=AHorr1ZlR75Xo7d2v5K+mRGtoatjeXhGXf2KD/PH1JI=; b=Bwa//9ZK5E5XJwlJ2GyBNfeEBpqaE34kTNiW8whqHng71syFwOyNjugihptAv3Ozd/ da4dSQ6UcQZrq06y/Lx6zv9hb6Jf1h739saBI6dgZGXksx5DfdKkaRzbWIhqEHk+9MSk vZbqTLOT12Ydio45RNc0twYd1Xpv0ISRxVeeU= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AHorr1ZlR75Xo7d2v5K+mRGtoatjeXhGXf2KD/PH1JI=; b=q5yP2IqLW9sFswGwFYuWWiydVaVQArZr/CJ3M2bb6kLpC5i8NIPYaGQ/BSNpSzL5+f 3H3qlyVhyxyomJmhQ6ohwaffiZtlyjDjErV5gisDUpxipk1MOlwZa4MAXdnG2dbZC3i8 /u1uYMIxjAqetzRmP1qswiscvIKU5APHsl5VWClAPygIFsOJV73He1JmK2QL34D9AYmp ARYkBORT7wPSIxE4sTYqQYpHBzjNMll3Tkdxu4OHiQpoMspbCFL9Q+Ai+Nm3cHsxmEFR Yz+JvX3NE24sriWAn5LEquqhR7EuBAj9l5JnoxAJZV2PCfkD2a1rT09+Ji8DjZk8jXoP msYg== X-Gm-Message-State: APjAAAXqfRY8vN1BxvZ6gHSDvdUVj7m3oSI3jUN7RTgDAyG6mBlOB4CJ erLyy7AImpVRu0pFvE3x6wxCMQ== X-Google-Smtp-Source: APXvYqwVXSZDY6lyGkLn91tFGjc8BvmJb6mfhRimc7tZwyWHXVHf+12N7WBt69RdlqRB+TYH5mDFGA== X-Received: by 2002:a5d:5681:: with SMTP id f1mr6206056wrv.95.1551356899270; Thu, 28 Feb 2019 04:28:19 -0800 (PST) Received: from localhost.localdomain ([5.148.119.11]) by smtp.gmail.com with ESMTPSA id a2sm12673753wrr.60.2019.02.28.04.28.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 04:28:18 -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 v2] wusb: use correct format characters Date: Thu, 28 Feb 2019 12:24:17 +0000 Message-Id: <20190228122417.9318-1-louis@kragniz.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190228115256.5446-1-louis@kragniz.eu> References: <20190228115256.5446-1-louis@kragniz.eu> 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 Reviewed-by: Nick Desaulniers --- 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..625366d3499e 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", + "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx " + "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", ckhdid->data[0], ckhdid->data[1], ckhdid->data[2], ckhdid->data[3], ckhdid->data[4], ckhdid->data[5],