Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36344964rwd; Mon, 10 Jul 2023 22:59:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFo+d7bL/umSBG4cDzz9drpQyZqq9IyPAEkdf8tbo4WqxBnUwg5bZl+xmMEXGuhadC7xKMj X-Received: by 2002:a05:6a20:96d7:b0:12e:caac:f263 with SMTP id hq23-20020a056a2096d700b0012ecaacf263mr15135313pzc.20.1689055159161; Mon, 10 Jul 2023 22:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689055159; cv=none; d=google.com; s=arc-20160816; b=JZk8DOOAdWyx7lnRTHr6j2fTJ81pvzBp7CU29WwrZTh1yM2ulk1L5rcwut8Jko5eZU byFRv634cYaGmNRFYsqhXp0aCKVMkfFweXLC4Mvgt9vqIk9tMEtB+MmaAx+7FTLdTmXd SNKn1ELDpWEtvqkYLrjuqj7leLW1N+eLraN5Gi/WWxTJ1fObVD5V6o+DoDFrAPVpGOpY usizDAcBbIjd7b2YRTTc7svgTx5eLbqvjWtBccn8xuoEXJP02Yby3vSq/I4cKOOtnOzG 7u/I0KFsDd/eWi+nOrA/mU/QrWqa3gK842scsul1UCK2uZsLv/5Uw0y83VDbKIsLEW66 +AqA== 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:dkim-signature; bh=MAGuoTaVLhD4fssZrG/3+NaVNV6pnk69EI8BsLAtVDU=; fh=grB5ASKX42McgOyooRtpRuLoGeCnKHrauMTbgdyOv4w=; b=vReBT8mmJ7G80lIrwumrMRmkEfTWAdt1TIb5VkevExlNx0ZcsIv+hw4l2dm3J9b/b3 HnYfA1tlQrcx3LV+uvyz4skkndcTkdrJbQMkJgpfWfpIDsaOPMrY4IFmJQ0iiiDsRt0S 0goJQnGIcTMcAy7EVh7njvxV87HsBViBfVHNKNlS0RLQ1IafK5MXn4YDNCRNOeqAOzV+ stwSKyNRWrAI+iTDaXXsy0SHMqGxVtmP55DNfbOzs8dFnQXs7pierlRHsWFeMmzEBH51 ip41aVUMMckfvvCYFq7YG6GKV+qMuc9Zaq51gjFgnN6kxRegZ2yE9TI2CuVUr/NCw3Fk 2lmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=yxMJ1In5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a6540c5000000b005348b4f79f1si863043pgp.345.2023.07.10.22.59.06; Mon, 10 Jul 2023 22:59:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=yxMJ1In5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbjGKFly (ORCPT + 99 others); Tue, 11 Jul 2023 01:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjGKFlx (ORCPT ); Tue, 11 Jul 2023 01:41:53 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C513D18D for ; Mon, 10 Jul 2023 22:41:51 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 434A82C01EE; Tue, 11 Jul 2023 17:41:49 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1689054109; bh=MAGuoTaVLhD4fssZrG/3+NaVNV6pnk69EI8BsLAtVDU=; h=From:To:Cc:Subject:Date:From; b=yxMJ1In5R9vdyKCD1q/fwnH8FNf7bhhRYG6m0aQ+JzsSdmOl/xQLN80FF2yJb3dWu Jpb5SuFuznPCDCWon7G8AujqJpSK3CmCZUwofxYJ/Dqxx6c2ExWVoYEkEEv+hbPUD6 c0PvYdab6Ii/LFBp+MpVHbl/xGLwK3ZSkjqOgEgxZps90h3kE5T7l0teMVGs9+AkVR fucRyRv9hzwatEHi6cBN2HRiyB+zY5FiM5XYadWIT4q7H/kI+w/crhYcB1DvvQfNay mdlXfnGmLBys9b4s/Ic4bndqN16L8+5GxwXwfH3G0u9wAW2ne7D2X82XEiVlNL7m4O VfYkXm73fo3bg== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Tue, 11 Jul 2023 17:41:49 +1200 Received: from aryans-dl.ws.atlnz.lc (aryans-dl.ws.atlnz.lc [10.33.22.26]) by pat.atlnz.lc (Postfix) with ESMTP id 241A513EC4E; Tue, 11 Jul 2023 17:41:49 +1200 (NZST) Received: by aryans-dl.ws.atlnz.lc (Postfix, from userid 1844) id 215A72011EE; Tue, 11 Jul 2023 17:41:49 +1200 (NZST) From: Aryan Srivastava To: rric@kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Chris.Packham@alliedtelesis.co.nz, Aryan Srivastava Subject: [PATCH] i2c:thunderx:Add disabled node check Date: Tue, 11 Jul 2023 17:41:46 +1200 Message-ID: <20230711054147.506437-1-aryan.srivastava@alliedtelesis.co.nz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.3 cv=MPIeZ/Rl c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=ws7JD89P4LkA:10 a=zF_DWZWtYjnfS4iBiJoA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Add check for disabled nodes. These nodes should not be probed. Can result in logging for HW which is not present. Signed-off-by: Aryan Srivastava --- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busse= s/i2c-thunderx-pcidrv.c index a77cd86fe75e..7fcdb237076a 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c @@ -158,6 +158,10 @@ static int thunder_i2c_probe_pci(struct pci_dev *pde= v, struct octeon_i2c *i2c; int ret; =20 + /* Ignore disabled nodes. */ + if (!of_device_is_available(pdev->dev.of_node)) + return 0; + i2c =3D devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL); if (!i2c) return -ENOMEM; --=20 2.41.0