From patchwork Wed Jan 31 03:30:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 194476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1649271dyb; Tue, 30 Jan 2024 19:32:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKTwSY7pKAeGztjT7bET5He3jnvbe/4apm8eDFMbW3/NTIsE5y/cp2qKJNfwrzGqc8f3uR X-Received: by 2002:a9d:7f03:0:b0:6e0:d6e9:debe with SMTP id j3-20020a9d7f03000000b006e0d6e9debemr320599otq.32.1706671945983; Tue, 30 Jan 2024 19:32:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706671945; cv=pass; d=google.com; s=arc-20160816; b=gg34n7m2LYPW7W+Nwa45Apda56YXiz2KHcY/FvspvlLusyE4ExiXWJm6FCiVv5Re+I eUntg/5HaIEXnncPfu3xwHjvXHx4BsME0w/1FvWmD98abQx1ICJrjDkOqnjUlokoZrlF LKIwXAZWpqf6tooyakFHz/8zYgUAujdYgODRSJIlVFS34BMO69MU6tyW07Mh/gmOLZs2 /llIKrdo9Q/jyGtOhvhzlgiWmwRNYckujTXqO86dhJCEzts5Rj4YnNX4BEKwCj5ORfk9 kfILIOulYjDPsfJ7GjSQEHbvHnmF3ecjzBYfM/Wr4pbAVIA8ok86rvEcGAbSzW0QMBcP 4+lg== 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=ESwRX5jBgWq6hDI5j5MEc7JE75aSqBYheSRTJy3KjRs=; b=sNNS6rmuczAAkVuYAw8GLeMZ970f2tals9HJQVa+zsBL8QJ1oVCNkEUCIPwOA/fLAd WwGoClmlEDvt8oU9IvUMzJe0COYgahscUap5/LRccSTMHWvfnKlDCdSNLheWxIeLwCTW Ka+/nxk9BdH8MArjG/bOc5X4tps4yqv/wu8MzJ6uxyF2Bd27OhsfOAeGoLMDq/AvvTSS hdvPdRbw+m7Xtm48uowL0oIhfxbhkILR0kqXuOLfqkpmFV79ggV5TVnqgAQ3uPqKrQxq HRpX7P4uOUVtJb6KfwD0l9wEyGHsMsFeSYzufhxbJ5iDTxUsju/QsSiEG7yUUhLCX2aW IzvA==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45710-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn X-Forwarded-Encrypted: i=1; AJvYcCVYyJJG+m0chVYRBACD/0jHP/H4LFwlsD+KeL4h7AincZLN0eocZrZueAq9rnLRycRDNiTTgWDZig5X/ptjHzg2UZ2Xuw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b16-20020a6567d0000000b005cef66f28a3si8750972pgs.494.2024.01.30.19.32.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 19:32:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45710-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45710-ouuuleilei=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 7479AB25323 for ; Wed, 31 Jan 2024 03:31:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AC3017570; Wed, 31 Jan 2024 03:31:17 +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 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789486904512811055 X-GMAIL-MSGID: 1789575242257277389 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 Acked-by: Arnd Bergmann --- 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; /*