Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1290941rdb; Wed, 6 Dec 2023 14:24:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGoUza+ysYtsDHBfDbY/IeG/DNLbGAphKwvRNIaxYkvX1YlBxtl3aidaIr8BDaafxUYFFVv X-Received: by 2002:a05:6a00:b89:b0:6ce:38fd:5124 with SMTP id g9-20020a056a000b8900b006ce38fd5124mr1584272pfj.60.1701901480031; Wed, 06 Dec 2023 14:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701901480; cv=none; d=google.com; s=arc-20160816; b=mAk4sz77Egg7RhLltdXMdfb4qtyA6F23f/G4y6eALKGZ2p89eyaA1OYETnpAMjZXHA 2QeTbxlBRAWYRR6X1tOkq7f8TsIAOQ/mzMi9Rbf2gaIZUP96VlTSo9JLSeHYaEMjxOiC F1ZX4iOu7SI0I/eKCbcG1HZanx6Bjha0hT6WrJs1MhQIWF+OJxR+dMVUWq9wup8NHcSq mYC+oN9WjOa2stTjfM8mEsvZwsRDAobhVdEDnyjLHlw56cmtu62zSTuj+RK3mGUJXKSs sicJn+RAbAYNW9sGxa3/YCun7lM7+gEd+nXRUCSyF2OT15J89BtTQrNeMXmQhTDJTcvT gaiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=q803zQGunLWKjKtw2i2f8gwklJevTlZe98p2Dzl6LsA=; fh=tzrH5YxCsrVYbxIKHlnNQdYE+Hi8Af4F5w/IweCINpQ=; b=nu11T+z7yCC5dy2aY3P7yaxwubMRBdOzDgy+RnApX4MdiM6wqSogtVt2UBYnVKyulG X/aTMPOeJSG430Ya+/HcQfrBBk+2EVSCSy3y478CAdoL8N3Ol94j0ZC/JaEd4kO/rw24 qp123qbTIiqImpBNzElXyhWlBaH/JKYI1m5sNvBHRClkyuU3GDUv86KZaI6HFdcMyUnn uiyhQsDM/wVeN+3j3C8ZavjE5U1XEQK/CcPEJqt+YdglnmOQmQU+kgqZHBytEg1GS9sU IMKb/+riO8gU2TPaIXif4E+BBozBOZjQr+/Phl92FH9Z+0+ezf09Xmo4FTB9p4UUWc1M ni9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=csgroup.eu Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v20-20020a056a00149400b006cdff067bacsi31374pfu.214.2023.12.06.14.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 14:24:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=csgroup.eu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 475408026A3B; Wed, 6 Dec 2023 14:24:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377591AbjLFWYH (ORCPT + 99 others); Wed, 6 Dec 2023 17:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377254AbjLFWYF (ORCPT ); Wed, 6 Dec 2023 17:24:05 -0500 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA942D46; Wed, 6 Dec 2023 14:24:10 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4SlsQ11z96z9vCD; Wed, 6 Dec 2023 23:24:09 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kE8Ud0EzoCD3; Wed, 6 Dec 2023 23:24:09 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4SlsQ114zRz9vCC; Wed, 6 Dec 2023 23:24:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 212368B774; Wed, 6 Dec 2023 23:24:09 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id e_urxSmvSke5; Wed, 6 Dec 2023 23:24:09 +0100 (CET) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.233.67]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D30B78B768; Wed, 6 Dec 2023 23:24:08 +0100 (CET) From: Christophe Leroy To: Jochen Friedrich , Andi Shyti Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-i2c@vger.kernel.org, kernel test robot Subject: [PATCH v2] i2c: cpm: Remove linux,i2c-index conversion from be32 Date: Wed, 6 Dec 2023 23:24:03 +0100 Message-ID: <460afa20784a445dff05b552ebb8c6a389d9de85.1701901105.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701901442; l=1142; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=AbB+dbMx4HU5AvTnNlYtCM6jkLY0EwXMarDUyPFbLic=; b=y/PdN+/KvCr7mrD+I6N56Yd6xNUvph00KdvH/w9ujSvwme01OU8fIwptkgvJ/N960OH3yoWyW aw+SgltocrLAHit+cRgeD7bZpD3uAlnrBYNIsCx3hVdfy9SyBTEAw6T X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 14:24:37 -0800 (PST) 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) -- 2.41.0