From nobody Sat Oct 18 02:17:40 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73416C433FE for ; Wed, 19 Oct 2022 09:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232866AbiJSJLx (ORCPT ); Wed, 19 Oct 2022 05:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232813AbiJSJJV (ORCPT ); Wed, 19 Oct 2022 05:09:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3BA472940; Wed, 19 Oct 2022 02:00:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C768617E2; Wed, 19 Oct 2022 08:59:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62347C433C1; Wed, 19 Oct 2022 08:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169998; bh=TTsckvmflagtafRn2JFd/70xMuypHyk4u8pTivsTen4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t4IMHnwylJXpW35T21gq5yAFOz0GMf5A6z65o1lA16sR01U8SIirNYxT/8hWkuov8 f/9bQ0FKHICykahHDV6Hwuwn2nXNcP3oZGGoQOc57XiXfE7q/K0oli5595oQEothQ0 Kt7+7ZSWkec9vFxnpLn4oZCkHgcLtIMtjISbMGjk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= , Jiri Kosina , Sasha Levin Subject: [PATCH 6.0 481/862] HID: uclogic: Fix warning in uclogic_rdesc_template_apply Date: Wed, 19 Oct 2022 10:29:28 +0200 Message-Id: <20221019083311.204721778@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jos=C3=A9 Exp=C3=B3sito [ Upstream commit 609174edeb758d1e2d713e7ab4e09ea8d45aa4f7 ] Building with Sparse enabled prints this warning: warning: incorrect type in assignment (different base types) expected signed int x got restricted __le32 [usertype] Cast the return value of cpu_to_le32() to fix the warning. Fixes: 08177f4 ("HID: uclogic: merge hid-huion driver in hid-uclogic") Signed-off-by: Jos=C3=A9 Exp=C3=B3sito Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-uclogic-rdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdes= c.c index 3d68e8b0784d..81ca22398ed5 100644 --- a/drivers/hid/hid-uclogic-rdesc.c +++ b/drivers/hid/hid-uclogic-rdesc.c @@ -1113,7 +1113,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *templa= te_ptr, memcmp(p, pen_head, sizeof(pen_head)) =3D=3D 0 && p[sizeof(pen_head)] < param_num) { v =3D param_list[p[sizeof(pen_head)]]; - put_unaligned(cpu_to_le32(v), (s32 *)p); + put_unaligned((__force u32)cpu_to_le32(v), (s32 *)p); p +=3D sizeof(pen_head) + 1; } else if (memcmp(p, btn_head, sizeof(btn_head)) =3D=3D 0 && p[sizeof(btn_head)] < param_num) { --=20 2.35.1