Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1419527rdb; Tue, 30 Jan 2024 19:32:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFr2dptsw12bFovDzmvz6/WQp4qsu5mRzZUO6V8BwREHzKn5pkfmnwhp/rBWaF1EFmZSJHh X-Received: by 2002:aca:1304:0:b0:3be:5ade:29de with SMTP id e4-20020aca1304000000b003be5ade29demr552555oii.12.1706671938744; Tue, 30 Jan 2024 19:32:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706671938; cv=pass; d=google.com; s=arc-20160816; b=0s83WU/Dey9LUeJydmZRHhGU0rsnZ7ipIu3rRjvAKhAz1hrKsQmG8bIsw3KnKbaKE2 z/3RVluYpehzFeL1aOCLiWXvZevZlulj+/Fp2vbfOQZ7QohMUG3gemarN9txeOM9DD6d Dv2vFQuq2pENvF45P5zyCDtbq1vI/xAVfEn/UCOv8DGu8NZLJ5SrNlQa7Ei4SxZNGiIK RcMHcFMHSiVym3WQHddww9uxP4zrYbcBtcDdSC9aoNCrroZbcGjfLP8vGYkt7MWaPlAa qDh087BEb6IYWWOteWfmh/yhetUBghYPPcgrHVCy2h5pcoUAeQf45SRAp2GrODJvj/16 wTBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=VwiBzvyYkF+Q5FNBgKRw6JTSPJeiqdANa0ir8mg+dLE=; fh=CTG0arYZwvcMKt4DJ+syKEGfkp7PFCfl0SCSEK8CD98=; b=wya88k/JrGa5SEBuXymszJcX+45eQwOHU5HU82AjWTo/evWIDY0+yYAeYs8skCknSi SrM+xZJlaj/2UfrxMhjU+ZNW750srp7yUyKY5XaZMlvfH8Jwwd+Xfle9IZNQzSufFV2d wNvBms9nZwtqQ7x5s5Ec6x0OUbwTVXxuOwj+5A+psYlZYVhXWVbgLEArHebpoYw+Fi6G PidSH03PAR1TQSyKjdeJDo9pAR9IwcvNFrKm2TNP71yrDEg0klEonOqS1qHGQMOMsHEF 1ykTrOSHqZckwLvvq1AllA3zJvkEPAqBsV5FZq4HpmbS2eU/nBxr5h4JqZN1k3/MRE64 rL5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-45710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn X-Forwarded-Encrypted: i=1; AJvYcCXh99mv/2XVq4s5J9Hb4qfukEeZw1Mip3P4jTRQ1+GFmvPqj6AdbUNpcZnXJ6RrF5KxEJFyRAg0mHO6oi/yI7x3wIW8dRujDv6svroSlg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s62-20020a635e41000000b005d8b8c6a98bsi6885035pgb.588.2024.01.30.19.32.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 19:32:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-45710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B71C4B24FC1 for ; Wed, 31 Jan 2024 03:31:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95CD1125CB; Wed, 31 Jan 2024 03:31:16 +0000 (UTC) Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 730751079B for ; Wed, 31 Jan 2024 03:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.204.34.129 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706671876; cv=none; b=m/w59eq0TKpTzw655GE4+DZ8AIyDrQLYxJfi+0cMW6JLTqdjXFn2/EyB2ZtffFAeIKqlyMCaOnGzbP0+rO4EFc6+SXkrUQdQHBLS0rqBWpy5iAucu9iHKFeRr+yPk0qKWMUA1ZFfgKrIXiFwKN2oHpqt5djrYNeawORgsh+gK7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706671876; c=relaxed/simple; bh=xtuRt7VbbEBx08muTVDKjJaxamV9CKSBx5yKzwLml9c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HqxTkxHrph9Cd23KHqSlQXR1VV4cNDNfw9z4Q2q+LUPZ8Z8RDK3vadXSX/IbFN9vmDmbjxvPqiZmCSYjfoYLvc7JyID7nNZ66gYxeGro/iBBiW/j20YvXXpIEper2fo4Nnyvf64CnySAZ2FnNiZrpd5UNomGtxVg14bMMn/hzpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=54.204.34.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp90t1706671833tdbrcrgm X-QQ-Originating-IP: adfhviOjvReUnc+ouFGEi8UWUjNNEf9tMmgbZXlYPGw= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 31 Jan 2024 11:30:32 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: 3M0okmaRx3iHkgqcopFdq/NfEZ6wxbPxFxT1Zs//B2rY5agn0yROoythOmEhl WOf0jGRhY+TZv5I8XJ75ArXo4z2FrgA8gU9B0QqVy5Dq0N5fWeBUnNzv6PTMvc4wZ9oaM9g 3fenvBXBSArIYergbp5Vgckw+vXWLS6Q8sH3AkzvjwJaDFWl9JfFeNs27qnoP/XKCRrQQ2Q BD1pLtNFJi2E/XjbZg7oNXyMdDFuixc5/s8CP7GL0T4BviURJRWvag/GqqS+vCktgeUZG7F YLsJDSHLSNNNdSLjr/S2/HPoU0amckINwMFLbh5Da3TRlG7DplPtV1xnIWkEZQWq5vsezHw XdzvV7/LOIuZGkV1AOtfB+SwWv7jw6bMu3pISL/E7WK4NaLtxga8nV7PV04GSa9RxM/R5/q fjy04w/VYKXcHkibc6XHGw== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 13846247626016565732 From: Dawei Li To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: fancer.lancer@gmail.com, lkp@intel.com, linux-kernel@vger.kernel.org, set_pte_at@outlook.com, Dawei Li Subject: [PATCH v2] misc: eeprom/idt_89hpesx: Convert data structures to LE explicitly Date: Wed, 31 Jan 2024 11:30:28 +0800 Message-Id: <20240131033028.3099156-1-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Kernel test robot reports following sparse warnings: >> drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [addressable] [assigned] [usertype] memaddr @@ got restricted __le16 [usertype] @@ drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse: expected unsigned short [addressable] [assigned] [usertype] memaddr drivers/misc/eeprom/idt_89hpesx.c:599:31: sparse: restricted __le16 [usertype] ..... For data structures needs cpu_to_le* conversion, their prototype need to be declared with __le* explicitly. Declare data structures to __le* explicitly to address the issue: - struct idt_eeprom_seq::memaddr - struct idt_csr_seq::csraddr - struct idt_csr_seq::data Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401261250.b07Yt30Z-lkp@intel.com/ Signed-off-by: Dawei Li Reviewed-by: Serge Semin --- v1 -> v2: - Add sparse warning info from Kernel test robot. - Remove Fixes & cc stable tag. - Add Reviewed-by from Serge. v1: https://lore.kernel.org/all/20240130040632.3039911-1-dawei.li@shingroup.cn/ drivers/misc/eeprom/idt_89hpesx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c index d807d08e2614..327afb866b21 100644 --- a/drivers/misc/eeprom/idt_89hpesx.c +++ b/drivers/misc/eeprom/idt_89hpesx.c @@ -129,7 +129,7 @@ struct idt_smb_seq { struct idt_eeprom_seq { u8 cmd; u8 eeaddr; - u16 memaddr; + __le16 memaddr; u8 data; } __packed; @@ -141,8 +141,8 @@ struct idt_eeprom_seq { */ struct idt_csr_seq { u8 cmd; - u16 csraddr; - u32 data; + __le16 csraddr; + __le32 data; } __packed; /* -- 2.27.0