Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1400068rdb; Tue, 30 Jan 2024 18:33:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzO268kqSAMAlHwVYbxhCr8TrADwz/p/UVFVl20IXeKfFXtYvnUsKbDWbtzqaZkMUsfg6S X-Received: by 2002:a05:6a00:1c98:b0:6db:cfd7:fde with SMTP id y24-20020a056a001c9800b006dbcfd70fdemr508772pfw.16.1706668420085; Tue, 30 Jan 2024 18:33:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706668420; cv=pass; d=google.com; s=arc-20160816; b=ordlDYiMZzbthi0SNe9ziLlD9eZWcnkJJDklJk042uDHtRRlYPIIpg9fKov5oniGEi Lrbi0pgleL2N88502OztKCZJ34RXQ4UzcLNomlW3IwXRiq6jPMBoHwWoKma2WOR7FdTl J2f/RbJvhNnPpzv0wsBiuyymmUQQniLPERY9ro61sa37RFvrU1w3QreVyEihzdtolwAj /RT9+iLx7ei8r4pf6aIdE0sQo7jMNMy4zIUYHUfMDEJ53teMEdl95rXlLpLtB2BFsBEI Ww+tLvHcw7KLqyz8f8+gUpGF0LnjgXAA2B5eKhfLkPL+6J0loo1NcOEtWRcDDdZNfEA/ 9TIA== 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=uzsZnMumPo0Vswv4BoLCFTyt7YB/M+sSEY1Nr8UMW9g=; fh=zuDIMyAjlYuAu58/13llRC3LIXM79yVmkIcob1cEdpM=; b=D+zB2RMT3mCgnxzpVGyfNB6HupNZPh4PNsLBi22MvYFyXZjZuA2xrJTgvqad47+ERI MG/LudEGz3saJ/nXNCwnZBXD+ptc0QQitDGb5dWYvecBDc+vQl/vLAGir05cqEvfuHY4 SQI5zNgZVt/Nbt4mju/chvo+bEhTtciDJW+oZK3ss2QOwu98xCv3RuX0Mmhb50NWJizP oNHRsIDE/wDLKg90MgmBrwWYc4/X7h0hv9aq6ZuvpMB2VncUvKGzIAt/h7rjitm0tOKN vDni8xKOnUB5XW0CuTg4CBdcvmiaKqqE+zqJ9Q6AkJhCu5Av1WnHIrdjabuFJIhdqND3 cPrA==; 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-45666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45666-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; AJvYcCXwSNju4z5qLrbdQ2EKo+kiRIvqdmO9I5Cx1tpCx7vNrEOVM4fq2CfI242PLdTeFZt0rBmBCYY/FJaonPXB/jU16VvhJvcbY2q1mICXsw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m2-20020a635802000000b005ce7efd2eb5si1268754pgb.266.2024.01.30.18.33.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 18:33:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-45666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45666-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 71982B2797E for ; Wed, 31 Jan 2024 02:25:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5A632134A; Wed, 31 Jan 2024 02:20:06 +0000 (UTC) Received: from smtpbgbr2.qq.com (smtpbgbr2.qq.com [54.207.22.56]) (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 63C48210FB; Wed, 31 Jan 2024 02:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.207.22.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706667606; cv=none; b=HqKSD/e1iNKoS3irshjlyyA6GfkPXys9tnRq6OREfW1qCQhQYnjidH2eH7vP3g9h5r4zmPQBeLicw2GFcNnCE0j4SYZCUV3hE/WeiKnSnpPK5+poM9ywkXIJNd18X2TcnMslE69zexclF3RHelT3pVzwXun/TCguARuFW0yT2hM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706667606; c=relaxed/simple; bh=Ajpwnv0gwKbippqNfFMTevv6la3TWLEQs6Y9B4054dI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DILQNV52ErddbF6KbwRfXRnA+TO504LL7huk5E7Nms52a5MbTsS3cLq2S7ozMUdWTaikEcAmVC4q6uCGAN4BK8QSzyMUeHlUC1Iv4aFCrVUjugx37uVXZlHAEPDH7zQzCGj4PsE3b1n0UwZE4ooWN6FU4FTikSd8ONblM9Ii91k= 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.207.22.56 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: bizesmtp71t1706667564tuzayzwi X-QQ-Originating-IP: QNMkXqcPISn2NlShiBY6BqGXBtpTFbQCDuaw0bcBF6o= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 31 Jan 2024 10:19:22 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: q+EIYT+FhZoIfcWF+K44PK3gx7w0YKb+bngT1uWGc5zMecqNLQEwFwxc1UdT7 tUijgknzZ7XPnlPNZZp1yqLZSzaRPLgow+TVY0+4nbZN6IJzOjHZ9zv0ATAvwbNI7vI9Ea1 CkG7jIFx06ChP/VItidltlMAPbyJ1EYJQgBf1KpYXKYw4+2pcb/+bK4oudMiIhGRAtKDo2I 86UVzoltJ8sgEpv5SCg9iVG3FVU9MkSOyJKbDfcyDZArCn0gr/xY6D/VLUVbLqAxDtll6K9 XTMgEXAhnPrPQ+jjvTxEc6ttM+6rqJuwmOX2v15ky+XN45ketNBsK8Tr3eHbnyAB8FIBRvR H0ySlloZo0A2GeE8pLEK57LjUkvLRxgECg9eurv3RZ3/w84h5mym/iTw7NWT8ZgqW+vndov 0WcA2ZB9fdk= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 7977306663875139372 Date: Wed, 31 Jan 2024 10:19:22 +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: <3A58BAAB108DEC6B+ZbmuKg9jkVmHHN0Y@centos8> References: <20240130040632.3039911-1-dawei.li@shingroup.cn> <2024013039-asleep-rally-39c0@gregkh> <03B279416A25E958+ZbmjvFafk44HBl4b@centos8> <2024013030-paternal-robotics-7fdf@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: <2024013030-paternal-robotics-7fdf@gregkh> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Hi Greg, On Tue, Jan 30, 2024 at 06:07:18PM -0800, Greg KH wrote: > On Wed, Jan 31, 2024 at 09:34:52AM +0800, Dawei Li wrote: > > 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/ > > Ok, so this fixes a sparse issue, how is that needed for stable kernels? > > Please be more explicit about what you are "fixing" in the changelog > please, as-is this didn't make any sense to me. Yes, it's my fault not making it clear in commit message. Sorry for that. > > Please fix up and send a v2. Will do that. > > thanks, > > greg k-h > Thanks, Dawei