From patchwork Wed Oct 19 08:29:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214658wrs; Wed, 19 Oct 2022 02:13:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7PkJqC5BEteotVBXzjjxZumc6+IQIgGRHiq0iuLJ+x6OD8FPcxj4Th0MgD/ufD/T4dxj3U X-Received: by 2002:a17:907:2c59:b0:78d:8e03:134 with SMTP id hf25-20020a1709072c5900b0078d8e030134mr5728258ejc.310.1666170806703; Wed, 19 Oct 2022 02:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170806; cv=none; d=google.com; s=arc-20160816; b=fJn1NZjL+PO1UNz3nD4+Ojm/u31Ha2hFlTCy5MQRTyVKuSJ3I+uJEm3MmywPLi0AIj 1i+/vvOYC0U1EQoDff/1cZtW5fDzoN5qCzeVlnzU0jB83PBqaAbPTb+O2mIu8RK32v5w Ab/wsKL8kij4tv5x9tANi1j1nvKscUN7bSza4dX9dadxWYo+qAZJrkMp4shkDRX39deU J6ghAMFXuHSzBqVr3If654Y1t/zLwfQ6jtko9hITCMRrPuq9poQlFt09zJYAkS+reKbi oyoHIDvNDGMosodTAWPh1pKn1CeDFQbjM60L1tzJMuWqEK3AFKs7iw70RktiZ92Y9xr/ rA/w== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=kkLzfVHFAGpMTs+caxTPkzUQP1bVuZK5bK6VPQuWbwA=; b=kp5HN+D+/5VzpXSlztXvTEqm0TieHa6Bp3c/7i0Pf3tAfmcwFFf05BYJqdPYneUQBk +SuyHOJq+zoNXXm8Noj1HpbfMeu1cNLf+YDmutHeHfWCd2UncKNVvwREYwCZOmeOqvIQ vhhhOZwFk5UR4lp7IvOWkeJvw/ISWXTb5fyX4IVpypQIZIVX1LJtW52c+14C43FU/E4Q RWD5YcFrN2SlGcbDif9DbEUA6HC4uKDBpvAmbXVxkorluQ5pi303LkJUnTit17K7bvu0 SIYHVa7sYfUu0bOIHsJS6AdmwkLwkDtJ/JzuJcsDqblVgzW7d2Pe2HLxJ38ayipcd38J kuqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t4IMHnwy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz10-20020a0564021d4a00b00457fb8f2a64si15818592edb.563.2022.10.19.02.13.00; Wed, 19 Oct 2022 02:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t4IMHnwy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbiJSJLx (ORCPT + 99 others); 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?b?Sm9zw6kgRXhww7NzaXRv?= , 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 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106719727518973?= X-GMAIL-MSGID: =?utf-8?q?1747106719727518973?= From: José Expósito [ 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é Expósito 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-rdesc.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 *template_ptr, memcmp(p, pen_head, sizeof(pen_head)) == 0 && p[sizeof(pen_head)] < param_num) { v = 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 += sizeof(pen_head) + 1; } else if (memcmp(p, btn_head, sizeof(btn_head)) == 0 && p[sizeof(btn_head)] < param_num) {