public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: lee@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	mazziesaccount@gmail.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev
Subject: Re: [RFC PATCH 2/2] mfd: rohm-bd71828: Add power off functionality
Date: Mon, 25 Mar 2024 21:21:27 +0100	[thread overview]
Message-ID: <20240325212127.7583c845@aktux> (raw)
In-Reply-To: <b5cc609a-b3c5-4994-bcd5-e25a43d33cff@linaro.org>

On Mon, 25 Mar 2024 13:13:13 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 24/03/2024 21:12, Andreas Kemnade wrote:
> >  	struct regmap_irq_chip_data *irq_data;
> > @@ -542,7 +560,18 @@ static int bd71828_i2c_probe(struct i2c_client *i2c)
> >  	ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_AUTO, mfd, cells,
> >  				   NULL, 0, regmap_irq_get_domain(irq_data));
> >  	if (ret)
> > -		dev_err_probe(&i2c->dev, ret, "Failed to create subdevices\n");
> > +		return	dev_err_probe(&i2c->dev, ret, "Failed to create subdevices\n");
> > +
> > +	if (of_device_is_system_power_controller(i2c->dev.of_node)) {
> > +		if (!pm_power_off) {
> > +			bd71828_dev = i2c;
> > +			pm_power_off = bd71828_power_off;
> > +			ret = devm_add_action_or_reset(&i2c->dev,
> > +						       bd71828_remove_poweroff,
> > +						       NULL);
> > +		} else
> > +			dev_warn(&i2c->dev, "Poweroff callback already assigned\n");  
> 
> Missing {}
> 
> Please run scripts/checkpatch.pl and fix reported warnings. Some
> warnings can be ignored, but the code here looks like it needs a fix.
> Feel free to get in touch if the warning is not clear.
> 
No, it does not complain about the {}. I was a bit unsure whether it is
required or not, but I was sure that checkpatch.pl does catch such things.
Yes, documentation clearly says that braces are required in those cases.

Regards,
Andreas

  reply	other threads:[~2024-03-25 20:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 20:12 [RFC PATCH 0/2] mfd: rohm-bd71828: Add power off Andreas Kemnade
2024-03-24 20:12 ` [RFC PATCH 1/2] dt-bindings: mfd: Add ROHM BD71828 system-power-controller property Andreas Kemnade
2024-03-25 12:13   ` Krzysztof Kozlowski
2024-03-24 20:12 ` [RFC PATCH 2/2] mfd: rohm-bd71828: Add power off functionality Andreas Kemnade
2024-03-25 11:31   ` Matti Vaittinen
2024-03-25 12:16     ` Andreas Kemnade
2024-03-25 12:44       ` Matti Vaittinen
2024-03-25 13:28         ` Andreas Kemnade
2024-03-25 14:10         ` Lee Jones
2024-03-25 16:51           ` Lee Jones
2024-03-25 20:14             ` Andreas Kemnade
2024-03-25 12:13   ` Krzysztof Kozlowski
2024-03-25 20:21     ` Andreas Kemnade [this message]
2024-03-26  6:32       ` Krzysztof Kozlowski

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=20240325212127.7583c845@aktux \
    --to=andreas@kemnade.info \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    --cc=robh+dt@kernel.org \
    /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