Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1379346rdb; Tue, 30 Jan 2024 17:36:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEYl0Alfz+dZWkSVsntV55zCM83JVhRoDVWHZ1oE6QxIfymHRfg0Ks6eyv/rrFE3JYRJ1U X-Received: by 2002:a05:620a:3728:b0:784:c44:9717 with SMTP id de40-20020a05620a372800b007840c449717mr361378qkb.3.1706664967201; Tue, 30 Jan 2024 17:36:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706664967; cv=pass; d=google.com; s=arc-20160816; b=aNPvGyrCG8ZC/wFDdOowhUItVx0jxzjjnT4qrLL/wmgUpey4z4B6M51B1B8cHJY26J mNl7+Uoq4pd1MXAkeBdsIdR2XBCvphWIHSNfoQzrEObdX/j7Fezk9ljS6Q6t9VvyS67Q yPpQLDxKlCoouF2S6lpn+nlChXjAVlNBlePA+RDArPq8qVFsW4xpEwUmOyfaBTST2O8+ 2p/jOC0+4WnuRYley4ccSUpFo0Vr1RLP2At5ZpTFE0v04wwUyHJQB/UjNSvI79kbot7M cQ8EFKPJKLsjdnz4WkXc7GXYRH+8xq1GoECxmk1hpkM++fNlFFRXjOpj3sM1RoAGF/Pw /9nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=LJJR0IHqx3petFbnt81HpNBqJAUJYNPUpA6UsX2erqM=; fh=3PklQN4MpsWr9gc80T1TvPD8Ky2JeG2XAFJ7L8g/qFE=; b=1LLPy2c1yIW1hf/Sip47B4MpT7+mm/bxTqoK24w9uw7ozV09OSCtt6CI7m9MNsgYJD LRJQGsi3hgwb+ZwmHnHg9z58Dje0fwphvUHe6zdHJ9dss6GaDBp3FOv+BddnLRfo7wMA BYGUAayDybnFv15gi2Y5XT/UGRxsPGpAt9GKehDy35oPs4GmZ2w0l/P0yAekt+0dfSBP VIP3LLVruKjx3X23FqAoGw6D7BO3q0B7oKKN0aYNk8eGmScacTu0fVUO/y7QXqu/ewsz lL+ASW5k07qC6GxCuFD/lzHF1KBH21mKx0tJGCG7FgcumFTs9YO56Ke7IwRAyo+03eZR tdMw==; 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-45598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45598-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; AJvYcCXZb7CJ52CpCRuKtKhZ9PafZcuKR/SffLyRgMcv6YEWbq0J02v4Urh++keO375QQvsgHNIxjrD9LWZ/u9X6VOAwo4sS8vzAf9jz/36kSw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m6-20020a05620a24c600b00783f5da4feesi7500006qkn.311.2024.01.30.17.36.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 17:36:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::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-45598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45598-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EE3ED1C259C7 for ; Wed, 31 Jan 2024 01:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E1135677; Wed, 31 Jan 2024 01:35:36 +0000 (UTC) Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) (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 CE0685224; Wed, 31 Jan 2024 01:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.92.39.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706664936; cv=none; b=G86lw/Wi2WMEXiw7VfeQOTupQmG+KIloUAkOJGMdJcJJORahpFyITcyBFxn7biLgRuU9GlrO16FUyGLKlks2Se0zaI4XwNSnbmKwMVqxNHzu4iK/0Wb7qr6YhoEl9EO8VEC97Cb+y2PEjjzq0yhN6VQ2IkEgHONDge2I5UBlg7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706664936; c=relaxed/simple; bh=JABR628JhKfDEauT8EwSw8z5YLEql3Ddf6/Lsazad+U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FiGpeLyUNnLYY7UE3LgU4mrBCGC8yfNdXEtlHY2srsjEc6MVCEqq3rBuBNvDuhAKiriHxBx+xrhlq7Kp+mIfCYt+kBN6+TIjERe5CpLAwHDcnCCgK/e7xgnE96ppSvtxFIbJW1FNt1LATLLN8HHQ2cIIN6gdWctGP0FG/HqmoDE= 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.92.39.34 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: bizesmtp79t1706664893t5ec4qpb X-QQ-Originating-IP: KLWLno1z+YBwajOmzBSk8syMSjZewzrtPUskMRnxhGk= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 31 Jan 2024 09:34:52 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: xwvWJGGFd7Nhngy97HaDG0YFqzS8IYQiaIhfPpcCmo6nrTjJeTHE7WYcUmrxy h7NIHa6HDO5KrWMR1TzSGuBh4eJC2AlxMDIvxcYwn+S1TNw/ecLu4p5KWiRfY75o0rosD8a /Rf8ksG5TTxTKPVxVXBiCJPg5o8OR+OJYS2EnXuDy3KBL8cfc7RRF60HgyL3tDm4/h1GExo TbLUvniXWAkItLmL1CSWRROttiS4Ay2WYiTrABCR9+77f7MSYLvCd0aUzg380F9QASDYLQ+ DbLnNE7T4VR66ALkmPL7MZ/AqMLpPKldSX9jBVdNHr8zT1amTqg9MlmnwTAQVoR+cnFXS2z lkk4mgEP24PFmDwJ2ZbGTuV2kFNbDRRIjnGlM9fxw/Xllp/cZwe92zujTz52NwHsgh4n9BG X-QQ-GoodBg: 2 X-BIZMAIL-ID: 5899189523940205269 Date: Wed, 31 Jan 2024 09:34:52 +0800 From: Dawei Li To: Greg KH Cc: arnd@arndb.de, fancer.lancer@gmail.com, lkp@intel.com, linux-kernel@vger.kernel.org, set_pte_at@outlook.com, stable@vger.kernel.org Subject: Re: [PATCH] misc: eeprom/idt_89hpesx: Convert data structures to LE explicitly Message-ID: <03B279416A25E958+ZbmjvFafk44HBl4b@centos8> References: <20240130040632.3039911-1-dawei.li@shingroup.cn> <2024013039-asleep-rally-39c0@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024013039-asleep-rally-39c0@gregkh> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Hi Greg, Thanks for reviewing. On Tue, Jan 30, 2024 at 06:04:17AM -0800, Greg KH wrote: > On Tue, Jan 30, 2024 at 12:06:32PM +0800, Dawei Li wrote: > > For data structures needs cpu_to_le* conversion, its prototype needs to > > be declared with __le* explicitly. > > > > Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") > > Reported-by: kernel test robot > > Closes: https://lore.kernel.org/oe-kbuild-all/202401261250.b07Yt30Z-lkp@intel.com/ > > Signed-off-by: Dawei Li > > Cc: > > --- > > 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; > > > > /* > > Declaring them this way is nice, but this doesn't actually "fix" > anything at all as no code is actually changed. > > So how is ths a bugfix? How does this patch do anything? > > confused, Sorry for the confuson. This commit is to address the issue reported by kernel test rebot[1]. Partially quoted from it: sparse warnings: (new ones prefixed by >>) >> 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: got restricted __le16 [usertype] drivers/misc/eeprom/idt_89hpesx.c:671: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:671:31: sparse: expected unsigned short [addressable] [assigned] [usertype] memaddr drivers/misc/eeprom/idt_89hpesx.c:671:31: sparse: got restricted __le16 [usertype] >> drivers/misc/eeprom/idt_89hpesx.c:769:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [addressable] [assigned] [usertype] csraddr @@ got restricted __le16 [usertype] @@ drivers/misc/eeprom/idt_89hpesx.c:769:24: sparse: expected unsigned short [addressable] [assigned] [usertype] csraddr drivers/misc/eeprom/idt_89hpesx.c:769:24: sparse: got restricted __le16 [usertype] >> drivers/misc/eeprom/idt_89hpesx.c:770:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [addressable] [assigned] [usertype] data @@ got restricted __le32 [usertype] @@ drivers/misc/eeprom/idt_89hpesx.c:770:21: sparse: expected unsigned int [addressable] [assigned] [usertype] data drivers/misc/eeprom/idt_89hpesx.c:770:21: sparse: got restricted __le32 [usertype] drivers/misc/eeprom/idt_89hpesx.c:834:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [addressable] [assigned] [usertype] csraddr @@ got restricted __le16 [usertype] @@ drivers/misc/eeprom/idt_89hpesx.c:834:24: sparse: expected unsigned short [addressable] [assigned] [usertype] csraddr drivers/misc/eeprom/idt_89hpesx.c:834:24: sparse: got restricted __le16 [usertype] >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 >> drivers/misc/eeprom/idt_89hpesx.c:859:17: sparse: sparse: cast to restricted __le32 [1] https://lore.kernel.org/oe-kbuild-all/202401261250.b07Yt30Z-lkp@intel.com/ Thanks, Dawei > > greg k-h >