Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1390453rdb; Tue, 30 Jan 2024 18:07:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhFP17cUIeAggoMVdP/Iq1uw+zrWzMQVNLuCuca3kY9EvAAuMsnjXThCJL1Bwu1P1QiJ22 X-Received: by 2002:a05:6a20:ba90:b0:19e:3343:43c4 with SMTP id fb16-20020a056a20ba9000b0019e334343c4mr221493pzb.36.1706666855238; Tue, 30 Jan 2024 18:07:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706666855; cv=pass; d=google.com; s=arc-20160816; b=aETpSUIqHQEVeZqyVGVjQHTMAwc+KGKgNQq8Pm4ATi2S6zN079oy6evHKXit+Awahn cIdcV4x6xuxZr2ugi1/Kkb2PAMvvVve5HVkcXpggoYb1z7VpzK3g7thW521CUsFD/hsW ULpLo5qkMbuSuhukIESDWHQZsNEslxmIn8aLsnZFKFo37r/65oQ7fGzXSEviba1pZ9MA IB39Eo52iI1FuNMsyjWax67I/Ct4Vu+PZn4Brx67ikVV9CUvgRDklpXcnTuPUmYeZKAC 0zOoVHDXRy+63Jan2B4hTZfazXtMxUQ5R6YUKnlisgLZ5Bk6o2FGjrOV6PndeHbXn111 BwFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IMD1rccxsLLM3ByWr08xRkV9mISsIL8jUX1Z/aCK5YQ=; fh=1h27KbNBcS4YbGAzwApBsEeP6m/lFDnCoOiwuNyyF68=; b=Fe819VVOFnJ5x1SxXAxKYBjNCn8PUBa/krs9J1QpphJ3QYDHF1qG3qyUktI15nn5oj BAbwVa1jhPCWSz1rn6zyz1fMByKSqw1v5dcS0R2GNB9TTJAtinB+3YgAKMH6xy9ckhMj rCy/K8JwYKQrKcBCb/6xEHyI5xZhsusI5sH5u84jAj30MYzPCzlvA9PHUt+/aKCrOe7r Yi08pCk5cp9mpwkSrRaZkPWIJ9F0Lk/Hu2h3Op14UGsJlyUfUtrrt7ocikIKWhOTL04z q/XpW7Eh1XnLHYPXOdOfTzU5FZ+jssyeyDuuGwEL/6ZnL/LaPRl69uvBjkoI+zpDUHOv 1xiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mGirAuWh; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=1; AJvYcCVrDf3zI50dJKcwmxA2FKuAyS0BLZIMjnZTtE9ov+hNjHBMhH/wghvb3jXLVDfL+BYfOOhTZWOE0leGDkUrj/5EcVeaR7He3fvB0iL2yA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b4-20020a056a000a8400b006db9c4a5258si8701117pfl.304.2024.01.30.18.07.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 18:07:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45621-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mGirAuWh; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45621-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 68856B23337 for ; Wed, 31 Jan 2024 02:07:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DC4A5258; Wed, 31 Jan 2024 02:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mGirAuWh" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 566FA4C98; Wed, 31 Jan 2024 02:07:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706666840; cv=none; b=totEpOyow/qowSurvM/A34/Fnynek0EQulSTU+5ZSotpzwR/nyIdjPJul0XCdiMDoUqN8Yza8WwQbWEQrAKsqVNSMc03/9RvIhARpO0L5h/2M8hoLocWvIPwLwH4vNK4WacnZagm61Yv7nvjBn+zy7cNDxfeizQUanNPEg73JwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706666840; c=relaxed/simple; bh=a84fhSd5NWwuU528F2aAkVgPYAT/j+h1xrXm8mMAM4M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aUD9X0RoJI/UVXHOsoBoNpzbfAa9dtzFfUt1Xf7f2nLA8c6FaNF+4fUDLoe3USpqM4V47R3j6XrfCYxqRw8UWmbjIbNU/jm174wUFC+8hS+mvTOxR0Rhqw3sNCOoNv6SrWXYJASBIzpAlGJMhK0RJ589uUBwHCbHePuvbxn7M0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mGirAuWh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 924B3C433C7; Wed, 31 Jan 2024 02:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706666839; bh=a84fhSd5NWwuU528F2aAkVgPYAT/j+h1xrXm8mMAM4M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mGirAuWh9b+91QHJz+wOG3Zbxa5ebhd2TM34ES7jIXe/6+U6Hq4o1IyANwKO9d/si 9JZR6ys4q5eQJ1wsm+jxlBHK24UXgjkHC8uyBuf3ERx0jYznsUZsSMU8seMSJH/R3d S70YJONkgHJX+CHh+s2He9fBS52P12a3r+F44oHE= Date: Tue, 30 Jan 2024 18:07:18 -0800 From: Greg KH To: Dawei Li 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: <2024013030-paternal-robotics-7fdf@gregkh> References: <20240130040632.3039911-1-dawei.li@shingroup.cn> <2024013039-asleep-rally-39c0@gregkh> <03B279416A25E958+ZbmjvFafk44HBl4b@centos8> 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: <03B279416A25E958+ZbmjvFafk44HBl4b@centos8> 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. Please fix up and send a v2. thanks, greg k-h