Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2680691rdb; Fri, 8 Dec 2023 16:11:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxYdg2o+h+DSITFE9wDVUmnwWPSPZFnpiqDpNXB/HN2OOWYFaqd/PpG2fPIr1GKYxtR/Oi X-Received: by 2002:a05:6359:5d1f:b0:170:2bb4:c893 with SMTP id ps31-20020a0563595d1f00b001702bb4c893mr729906rwb.54.1702080673822; Fri, 08 Dec 2023 16:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702080673; cv=none; d=google.com; s=arc-20160816; b=PMGwHN8uu6/I1ArgIAddL4DTbiNUp3KYGPRhPoyUq1gW1jRWXMb0Kfq3iIps1t5BRO ylzHFieu4gbJHvQUKOYp3FHwGmepYNBK5Ps7gacRsNEIY/Z9b8QNzP3ggcnBpVOmkGDn QWwr4HevrQhdpiDnuGNfLXTnsWfaM3A5+CqAkvdg51ohUCqJZIWl3JTBMPBqtSRQXLNF 8AVPtcUYI27/GrF7pFuMjY+aAaymiQdezC/9qpP0pCqyrD998MBvmSk21yTNPKkOw5WE 2I1spWDXYKL5xJ7IyZmArPF7l5hiyoUdmCCz/uF4pVPypOQnlzmN0eNPGHrbn/VwMYDb RPuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+mfWtxh7fiLqCs2Vc/1u4GUbLUc9Wzki3DsG+m4ODQo=; fh=Y8TvjBh4t4MlI8e7+tzk4KMPauQIQ9g4mjaVLG9xqYw=; b=Xq4+czjIPmZIKfROLF44oAOY3XNAXgRLPUPg7Av4N9T04KqofGJNl5HBAupmjuIICa OLC0v8l2oG08Pw6xU7cJbiThYZI6IIUjgJmg6XH6KBM6xnMVrz52CpP4aayGbNycxFxQ MZZvZqo5AOTBOL4blbX8YoqW75Mjmy+rlHqhjHkki9zFTf3MBDubsp6vHTm4xVV0zJyt pHESd7/nhwogaNaSZrGkH5tKQmgj/SOV79e0VGGydWJatR76zm+b+MTUcGciyImryZcZ wtQK5MEQe1jCfNID7BHiRhIaaLfT1q5h6VPNRo0Yoob7ysopLqGV2a3Ge3+a0L8LMirE NjgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qyp1eqJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s16-20020a056a00195000b006ce96e33eb8si2252742pfk.112.2023.12.08.16.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 16:11:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qyp1eqJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0CD098098186; Fri, 8 Dec 2023 16:10:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjLIAKG (ORCPT + 99 others); Fri, 8 Dec 2023 19:10:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjLIAKF (ORCPT ); Fri, 8 Dec 2023 19:10:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ABB210FC for ; Fri, 8 Dec 2023 16:10:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C54C5C433C8; Sat, 9 Dec 2023 00:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702080611; bh=XwpafKSxSIaU9fO0Z1UPvQPkXRe7CXV3jWPAij1MXpw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qyp1eqJcUWRaLF+8m75gLOK//4mNJy/GuZHSvYCaXRgJz9esiNNrjvs+umzyX9dqU LxkG5R2NuGxY8iNhia+dC8pzM8O1iMzrpx79tD0UxIQSmmauB9VjAKNAQV7XQTgZX1 mhvs54RCEGnSFYldR2F6PZij6IlDsx9fLXFaajWViQ2rSpv0VzOo6ZKH0Wg4WDQ2RN w+Fy8HE4TwXztb2YZLZnfteLXRI37sDiuiNCGp0m6XIttof0K2RaYcfj5ycn2QGGkY px1E/jOzxzhSMKWu22gsrHkYucocPl1lm1KsQ7utaP8cMCKEoZD7JCtESAvYEZx8DI LhxTREBtKbX3g== Date: Sat, 9 Dec 2023 01:10:04 +0100 From: Andi Shyti To: Christophe Leroy Cc: Jochen Friedrich , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-i2c@vger.kernel.org, kernel test robot Subject: Re: [PATCH v2] i2c: cpm: Remove linux,i2c-index conversion from be32 Message-ID: <20231209001004.n6dcdjwf2dqjctap@zenone.zhora.eu> References: <460afa20784a445dff05b552ebb8c6a389d9de85.1701901105.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <460afa20784a445dff05b552ebb8c6a389d9de85.1701901105.git.christophe.leroy@csgroup.eu> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 16:10:40 -0800 (PST) Hi Christophe, On Wed, Dec 06, 2023 at 11:24:03PM +0100, Christophe Leroy wrote: > sparse reports an error on some data that gets converted from be32. > > That's because that data is typed u32 instead of __be32. > > The type is correct, the be32_to_cpu() conversion is not. > > Remove the conversion. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202312042210.QL4DA8Av-lkp@intel.com/ > Signed-off-by: Christophe Leroy > --- > v2: Use u32 directly, remove be32_to_cpu(). > --- > drivers/i2c/busses/i2c-cpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c > index 9a664abf734d..771d60bc8d71 100644 > --- a/drivers/i2c/busses/i2c-cpm.c > +++ b/drivers/i2c/busses/i2c-cpm.c > @@ -658,7 +658,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev) > /* register new adapter to i2c module... */ > > data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len); > - cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1; > + cpm->adap.nr = (data && len == 4) ? *data : -1; thanks! Reviewed-by: Andi Shyti Andi