Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jishnu Prakash" <jishnu.prakash@oss.qualcomm.com>
Cc: lee@kernel.org, robh@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, mfd@lists.linux.dev
Subject: Re: [PATCH 3/6] regulator: qcom-pm8008: Add PM8010 mode support
Date: Fri, 18 Sep 2026 16:52:58 +0000	[thread overview]
Message-ID: <20260918165258.9FC791F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918-pm8010_i2c_support-v1-3-de33d78fad9d@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] redundant use of to_i2c_client() when accessing of_node
--

commit f34c6623337a92a1f38e24ae60d1ae6ced8eed2d
Author: Dhruvin Rajpura <drajpura@qti.qualcomm.com>

regulator: qcom-pm8008: Add PM8010 mode support

Implement set_mode/get_mode support for PM8010 LDOs using the mode
control and status registers to allow clients to vote for LDO modes.
Mode voting is not supported in the PM8008 LDOs.

> diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c
> index b484c0f73eeac..9758809a6322d 100644
> --- a/drivers/regulator/qcom-pm8008-regulator.c
> +++ b/drivers/regulator/qcom-pm8008-regulator.c

[ ... ]

> @@ -169,6 +237,9 @@ static int pm8008_regulator_probe(struct platform_device *pdev)
>  	if (!regmap)
>  		return -EINVAL;
>  
> +	is_pm8010 = of_device_is_compatible(to_i2c_client(dev->parent)->dev.of_node,
> +					    "qcom,pm8010-i2c");
> +

[Severity: Low]
Is there a reason to use to_i2c_client() when accessing of_node in
pm8008_regulator_probe()?

Since to_i2c_client() is defined as container_of(d, struct i2c_client, dev),
accessing the dev member of the resulting structure evaluates back to the
exact original pointer (dev->parent).

The expression to_i2c_client(dev->parent)->dev.of_node is functionally
identical to simply using dev->parent->of_node, making the macro usage
entirely redundant.

>  	for (i = 0; i < match_data->num_regulators; i++) {
>  		data = &match_data->regulator_data[i];

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260918-pm8010_i2c_support-v1-0-de33d78fad9d@oss.qualcomm.com?part=3

  reply	other threads:[~2026-09-18 16:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 16:42 [PATCH 0/6] mfd: qcom-pm8008: Add support for PM8010 over I2C Jishnu Prakash
2026-09-18 16:42 ` [PATCH 1/6] dt-bindings: mfd: pm8008: Add qcom,pm8010-i2c compatible Jishnu Prakash
2026-09-18 16:49   ` sashiko-bot
2026-09-28 19:48   ` Rob Herring (Arm)
2026-09-18 16:42 ` [PATCH 2/6] regulator: pm8008: Add PM8010 support Jishnu Prakash
2026-09-18 16:50   ` sashiko-bot
2026-09-18 16:42 ` [PATCH 3/6] regulator: qcom-pm8008: Add PM8010 mode support Jishnu Prakash
2026-09-18 16:52   ` sashiko-bot [this message]
2026-09-23 10:17     ` Jishnu Prakash
2026-09-18 16:42 ` [PATCH 4/6] mfd: qcom-pm8008: Add PM8010 support Jishnu Prakash
2026-09-18 16:51   ` sashiko-bot
2026-09-23 10:17     ` Jishnu Prakash
2026-09-21 13:33   ` Konrad Dybcio
2026-09-23 10:18     ` Jishnu Prakash
2026-10-01  8:29       ` Konrad Dybcio
2026-09-18 16:42 ` [PATCH 5/6] dt-bindings: mfd: pm8008: Make interrupts optional Jishnu Prakash
2026-09-18 16:50   ` sashiko-bot
2026-09-28 19:49   ` Rob Herring (Arm)
2026-09-18 16:42 ` [PATCH 6/6] mfd: qcom-pm8008: Tolerate missing interrupt Jishnu Prakash
2026-09-18 16:57   ` sashiko-bot
2026-09-21 10:42     ` Lee Jones
2026-09-23 10:17       ` Jishnu Prakash
2026-09-23 10:17     ` Jishnu Prakash
2026-09-19 13:01 ` [PATCH 0/6] mfd: qcom-pm8008: Add support for PM8010 over I2C Oleg Keri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260918165258.9FC791F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox