Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2743057pxj; Mon, 10 May 2021 09:43:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze4edqOA8mIoKaqtmTajr97pa0TVfhF2Ym3vky+c7s4NlqH5b0F8cEj1mOXuMi5ljSY338 X-Received: by 2002:a92:de0c:: with SMTP id x12mr22749783ilm.275.1620665039239; Mon, 10 May 2021 09:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620665039; cv=none; d=google.com; s=arc-20160816; b=Hv4nrIzFSKUz9UrILKGga3TiiJEjAncJP2SjqNa1oeTqLMbwOTNZr/otG4BIUQuGP0 Af7BIjztHeRKiczvrTNEdIBJcfx/8D3DNr5GMeqRLMTbNUf4rkR7Z1wWPC7/HzRV1l58 GSWb6SFZ/2IGL1kzUzxNQTk1i9oFPWlF26flXoMAhehzzaVMA8XHmx/LyMiOyaI4THjH PHLvcyIIA/+f0EodYcTLtG3uToawiPo5P9aOtzdwbppP0Mdg259ryCy+TLQbQ4qu73Kn IDM19oe8bAxj9rg0G6PdEQ2CQ8B4mFu35sqnVTQjatn2LjeuaiF5+P0tPf56oapEwSK3 l0vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=h2q7qdxHnKqt6dgZTeWCwO5i8hLjW2ju0Z3AVSENA+o=; b=DHhOjaITdmDKDFa3QxZV4W2MO9yRh+3jZpekIBhtSsyZjQrwFEVdfAUcALHbYGY/ir H9t7ejp/ZQj29HJfRaiSf8fwBOAeu2W1xewg4KhTRXUemvo/vQ8vael9iyZ9vlTy2Boa zPQ2cdZvQgA4DtxxiUFsV6v0GqdcxGIFcAr1nmwbOJMsyHvvtDGMt+eBng+oGtuGlAug Q/K2nAyPsKlCW1gjsFd8pY2HNYdn3HIR7VuRgvTXrwBXDLYGxZtbvcJ5uqVnmV3X3EcN OMMU+L/Tr7UASWmH6RoNnjA6YoXi2hwP9cEULe5BCP8SAvrl4v+9o1NyFb03wLYuN1Fb xxqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si11512258jat.63.2021.05.10.09.43.46; Mon, 10 May 2021 09:43:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbhEJQnK (ORCPT + 99 others); Mon, 10 May 2021 12:43:10 -0400 Received: from smtprelay0059.hostedemail.com ([216.40.44.59]:38696 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231420AbhEJQnI (ORCPT ); Mon, 10 May 2021 12:43:08 -0400 Received: from omf06.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id E9E821802C663; Mon, 10 May 2021 16:42:01 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA id 9B2CC2448BB; Mon, 10 May 2021 16:42:00 +0000 (UTC) Message-ID: <6a589bf720c5420e09bcc3c40b812bf6822d3a3d.camel@perches.com> Subject: Re: [PATCH v2] HID: ft260: fix format type warning in ft260_word_show() From: Joe Perches To: Michael Zaidman , lkp@intel.com Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, jikos@kernel.org, dan.carpenter@oracle.com, linux-input@vger.kernel.org Date: Mon, 10 May 2021 09:41:57 -0700 In-Reply-To: <20210510163029.2217-1-michael.zaidman@gmail.com> References: <202105060637.LeEC6ztp-lkp@intel.com> <20210510163029.2217-1-michael.zaidman@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.36 X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 9B2CC2448BB X-Stat-Signature: nobrzecesxe1hi9xcwhq3o4h4ii3cyoz X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX195MrQQ61JwLRz6OiWqCCjFadzCwlRMTxM= X-HE-Tag: 1620664920-830955 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-05-10 at 19:30 +0300, Michael Zaidman wrote: > Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver") > > Fix warning reported by static analysis when built with W=1 for arm64 by > clang version 13.0.0 > > > > drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but > ???the argument has type 'int' [-Wformat] [] > diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c [] > @@ -791,7 +791,7 @@ static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len, > ? if (ret != len && ret >= 0) > ? return -EIO; > ? > > - return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field)); > + return scnprintf(buf, PAGE_SIZE, "%d\n", le16_to_cpu(*field)); > ?} This is likely a clang defect and not an actual problem. If you are going to convert one of these, convert both.