Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2268351rdb; Fri, 8 Dec 2023 03:27:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQYvZeYhEMfvU1FPMbqH5QPaTH68UHGMr41FPf8I/8nv12gZQiT9YSzwqzRVTs6q+8cFdC X-Received: by 2002:a05:6e02:92a:b0:35d:59a2:6469 with SMTP id o10-20020a056e02092a00b0035d59a26469mr3980695ilt.60.1702034872575; Fri, 08 Dec 2023 03:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702034872; cv=none; d=google.com; s=arc-20160816; b=wnm34r9Vvw3WSjSC9zWJtuFgXKL/pOA9GhvleBDUik/XSrdyG+KKyDNQocU8l0jtOa pgjE3BF2glPJ5qt+Er2Sfjb6yvjj4+XcO+Ncgnefn56qh2+UXU9RJPvPu2FnRidnV4qK gAvxKPnPXBbpKjFUckKRnGLtsRq3TgHabw/TY0I04xRbsXEcHS5LjUVHUPXlYfF1+mGt WwJ5Nt5rBQFMUYSl9+3czAZiAgD71GNktbiSYHEx42iRmain2SLE+hooRXTpJT0iB/Ah ILe6jHLBm86RHOY9V/2/17cbdyumJ4NJ0odbcrPd4xrL5luFzUrRqksBwa9AWcMfNCUx H6Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature:dkim-filter; bh=s9yrExIa366dn3S+pFGBrRwPq6geDOwSJ/tc3OqUeD8=; fh=glEPaf8/OdPaXi4aLQkYGDsc7+pi6Lb94419PSHAVcU=; b=nkD+/lqMM3inrfkK4mj+VPwfVCXKH2bDfqM+UZtrdlMzzG6fjWBDc9yJrl6XEuoXux u/9rjQ9+5vOF30TQpnowpp3vrm8AcYy7gKfY+r62WCtZzpTTg0++6NSgmZURhNkklnl1 +f39GXR7FMIHx7Ae26YJu82oV1k/HPX+vb1khhSp4spEutW9B8edGQnukpGX4WhMb4kU /+dIG7HLFS/QWRk67zwqWj6P2pJFScPMvvA4G7qrF4FoPKSeruHJGQ8hNEVmN3xPhV6h 2buNb6FTOiDMiUgv6NX9oSQ6cgSHikf41iTVoYAiyMVpabG5U95uXuFNZ56IljY/jTId LX8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@scram.de header.s=mail2021 header.b=OgcexWGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=scram.de Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id bf15-20020a656d0f000000b005c699b49da1si1429413pgb.873.2023.12.08.03.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 03:27:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@scram.de header.s=mail2021 header.b=OgcexWGU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=scram.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AEA9F8116784; Fri, 8 Dec 2023 03:27:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232504AbjLHL1d (ORCPT + 99 others); Fri, 8 Dec 2023 06:27:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230457AbjLHL1c (ORCPT ); Fri, 8 Dec 2023 06:27:32 -0500 X-Greylist: delayed 916 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 08 Dec 2023 03:27:34 PST Received: from esg.nwe.de (esg.nwe.de [195.226.126.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E74210CA for ; Fri, 8 Dec 2023 03:27:34 -0800 (PST) X-ASG-Debug-ID: 1702033934-1ed71d5dc8174fa10001-xx1T2L Received: from mail.scram.de ([213.206.175.31]) by esg.nwe.de with ESMTP id FtJNBH7NCVyVmvNv (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 08 Dec 2023 12:12:14 +0100 (CET) X-Barracuda-Envelope-From: jochen@scram.de X-Barracuda-Effective-Source-IP: UNKNOWN[213.206.175.31] X-Barracuda-Apparent-Source-IP: 213.206.175.31 Received: (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender) by mail.scram.de (Postfix) with ESMTPSA id F1F218A7031; Fri, 8 Dec 2023 12:12:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.scram.de F1F218A7031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scram.de; s=mail2021; t=1702033934; bh=s9yrExIa366dn3S+pFGBrRwPq6geDOwSJ/tc3OqUeD8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OgcexWGUSpSg89Uyju9wzf1zesFDFmj3KHKrqKaOzOH4JVPRVn1mj1zH471YFcm8a q0tu5GgkxvUm0dACo27WH6zWOD+KeHMI3Lp0XpkutPCKt1sCLpLmilXR5TNBwv6L0M uUthIG4o4C6QUmbwZn6jNgGvBuL682o804l6WyDc= Message-ID: <950ac94b-f488-4879-973e-4014f224c62f@scram.de> Date: Fri, 8 Dec 2023 12:12:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] i2c: cpm: Remove linux,i2c-index conversion from be32 To: Christophe Leroy , Andi Shyti X-ASG-Orig-Subj: Re: [PATCH v2] i2c: cpm: Remove linux,i2c-index conversion from be32 Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-i2c@vger.kernel.org, kernel test robot References: <460afa20784a445dff05b552ebb8c6a389d9de85.1701901105.git.christophe.leroy@csgroup.eu> From: Jochen Friedrich In-Reply-To: <460afa20784a445dff05b552ebb8c6a389d9de85.1701901105.git.christophe.leroy@csgroup.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: UNKNOWN[213.206.175.31] X-Barracuda-Start-Time: 1702033934 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://195.226.126.84:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at nwe.de X-Barracuda-Scan-Msg-Size: 1290 X-Barracuda-BRTS-Status: 0 X-Barracuda-Spam-Score: 0.40 X-Barracuda-Spam-Status: No, SCORE=0.40 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests=BSF_SC0_SA085b X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.117807 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.40 BSF_SC0_SA085b Custom Rule SA085b X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Fri, 08 Dec 2023 03:27:49 -0800 (PST) Acked-By: Jochen Friedrich Am 06.12.2023 um 23:24 schrieb Christophe Leroy: > 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; > result = i2c_add_numbered_adapter(&cpm->adap); > > if (result < 0)