Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1116488lqj; Mon, 3 Jun 2024 10:31:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEm8oVPT9TB286DqP/Hb/G0/xHIMQUpDmzfsodJLqrefLJF8CiowRiKg2Zaw8bb00FGhy0uM3wMqBHc+UXNW/yQDBnVjpZJxgDPkYz8g== X-Google-Smtp-Source: AGHT+IH9uEiSJzjxQTVw2W4dcToqD7Gc6XzvWuzeElMhk+Vml8qS4fJ80aUw8cNtJYhQEuzIBo7h X-Received: by 2002:a05:6870:4141:b0:250:79e2:b94a with SMTP id 586e51a60fabf-2508bc2c42cmr10734095fac.51.1717435919139; Mon, 03 Jun 2024 10:31:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717435919; cv=pass; d=google.com; s=arc-20160816; b=gQpHE5gnnpHuLDJTeQfO0sfWriUwNS248kQq/ONAPb18Qrb/v0PhU8RIe8WfTNuUW7 1vCy7t/1cffJWjBN2xxw5Av+uwuKTGDDvv91bj099AkNJO+ORut2AKUeHII5cmxrB5wV lZft0hP5UM9wAnxkc1R754v8VbFcTA8CzNiAPQ9oJ8Jq32ty5QHfC/L5XnrvM1+lgngK TyUGQdemkyuSn7ygInRdEb81COsMCejF/wraNIdZZOk7Bk/TtRQZ8gApyT1EZQvAOibZ U5a/Ux8KwVuNdiYcTcDt1aep+8wAcrpVlVXK5nDjL5nfgrfdhjGcOFDvdMrPWGjg1q6n JQGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=kRDCV0dmaLYdBq6EzHV1AR1oRsGqL12bPgTrR83mOKw=; fh=7tiSKXM8jE8Lj/rB9BwELAbpow4EcUFXQP4ejRyEHMg=; b=wm94Rpzsj7lKW0Qd6j2ndaRmbd5oGvfnKeS9g8ThhrCecRRCNeE4f1VqVDJdLCKtQT MDM2iQozSXApkomJwpOexr/VNOWzWbwj43KzTIejpQjYPIKc3ujX5jffpqwOOll0MHcD 4+XZC+UFI+8W2Wrmp6vCpw5X66ESHG94puDUtE20J6IqKEmIgBB0W0gvRUdOPr7OxEgv eAiOE0m4WvUOQUpCefilJt2wMly4k9kjKQ/PWPwqO5W5qwQ4AG8A8n1UkYTwzqBAoCaR FQFuLHbVTDy08AUPiJ1/7gHxB6jHc/fWC7lZE8115dnh7T6FY53S+65udfEhDDA+HYXy 59Gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=E7yRObjS; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-199514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a1e0cc1a2514c-80aecb85dddsi1146722241.49.2024.06.03.10.31.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 10:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=E7yRObjS; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-199514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199514-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CC6341C220B3 for ; Mon, 3 Jun 2024 17:31:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6BE8137769; Mon, 3 Jun 2024 17:31:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="E7yRObjS" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 20AA2262B6 for ; Mon, 3 Jun 2024 17:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717435912; cv=none; b=o8o9oCEmhGdmyIfJN+/DTiLA2ivGmtUBHC6UHrwpLexS+H+y9wr5wnYWASFb+kj0GR+Hbuw4IdF9Bl/el6vOTE6LV6Z1XQc67dGbfb1QokrQ8vU9aglOqxMoLUWOOTdgls25cpym+nOf27+7KViHo64vGdizRDHD6kxir9vOZ/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717435912; c=relaxed/simple; bh=vGhYcr0+gYUyTAifot4Vhtgw/itqf24EiBKozbQQf5U=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=fWuQj8P4oH3yjRmzQ3AMag7LP684PD8jgnx97WhIzeNaN6uP8S4IWRrHPHKgANNSchxMsI1+8jDlVCqulYFTDfdqG1SH2GE1zZiQsc3z96UiH7DvT0J05p3udKPBAHoXv8JSebfDnH2ne7g2NYfBtX+6U+KXhFW3oW7YTHCUhec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=E7yRObjS; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 453HVi9m015573; Mon, 3 Jun 2024 12:31:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717435904; bh=kRDCV0dmaLYdBq6EzHV1AR1oRsGqL12bPgTrR83mOKw=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=E7yRObjS9cDNDlsg/5DzYhrwXdTiMUUVDQcnGUMEvJ1gRob5MblfrbijV7QTKyiFZ NwxfGDxTsPKvFNxAUeocE38LuLOl5NxtApsanMRJVmmjEMQ2ubita9it6sFIE2/gE/ qfVpiaGHc+y4u7dG99dZBXIKiFIi8rsVEw/dLbhY= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 453HViSo116201 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Jun 2024 12:31:44 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 3 Jun 2024 12:31:44 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 3 Jun 2024 12:31:44 -0500 Received: from [172.24.227.94] (uda0132425.dhcp.ti.com [172.24.227.94]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 453HVf7i051902; Mon, 3 Jun 2024 12:31:42 -0500 Message-ID: <117f2292-b2a1-470f-8d88-80f325f3341b@ti.com> Date: Mon, 3 Jun 2024 23:01:40 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 To: Shree Ramamoorthy , , CC: , , , , References: <20240603170524.643010-1-s-ramamoorthy@ti.com> <20240603170524.643010-2-s-ramamoorthy@ti.com> From: Vignesh Raghavendra Content-Language: en-US In-Reply-To: <20240603170524.643010-2-s-ramamoorthy@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 03/06/24 22:35, Shree Ramamoorthy wrote: > Swap nr_types assignment for TPS6594/3 and TPS65224. > Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board. > > Log: > [ 13.974024] Call trace: > [ 13.974025] _regulator_put.part.0+0x40/0x48 > [ 13.974028] regulator_register+0x2b0/0xa00 > [ 13.974031] devm_regulator_register+0x58/0xa0 > [ 13.974035] tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator] > ... > [ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 > > Signed-off-by: Shree Ramamoorthy > --- Please add a appropriate Fixes: tag > drivers/regulator/tps6594-regulator.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c > index 4a859f4c0f83..b66608ab2546 100644 > --- a/drivers/regulator/tps6594-regulator.c > +++ b/drivers/regulator/tps6594-regulator.c > @@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) > } else if (tps->chip_id == TPS65224) { > nr_buck = ARRAY_SIZE(tps65224_buck_regs); > nr_ldo = ARRAY_SIZE(tps65224_ldo_regs); > - nr_types = REGS_INT_NB; > + nr_types = TPS65224_REGS_INT_NB; > } else { > nr_buck = ARRAY_SIZE(buck_regs); > nr_ldo = ARRAY_SIZE(tps6594_ldo_regs); > - nr_types = TPS65224_REGS_INT_NB; > + nr_types = REGS_INT_NB; > } > > reg_irq_nb = nr_types * (nr_buck + nr_ldo); > -- -- Regards Vignesh