From: Hans de Goede <hdegoede@redhat.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Thierry Reding" <thierry.reding@gmail.com>
Cc: kernel@pengutronix.de, linux-pwm@vger.kernel.org
Subject: Re: [PATCH] pwm: crc: Use consistent variable naming for driver data
Date: Thu, 30 Nov 2023 10:28:31 +0100 [thread overview]
Message-ID: <b05d041e-c734-4a94-ab46-18e5235eb208@redhat.com> (raw)
In-Reply-To: <20231130074133.969806-1-u.kleine-koenig@pengutronix.de>
Hi,
On 11/30/23 08:41, Uwe Kleine-König wrote:
> All but one local variable of type pointer to struct crystalcove_pwm are
> called "crc_pwm", the one outlier is called "pwm" which is usually
> reserved for variables of type pointer to struct pwm_device.
>
> So rename that one "pwm" to "crc_pwm" for consistency.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/pwm/pwm-crc.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pwm/pwm-crc.c b/drivers/pwm/pwm-crc.c
> index 2b0b659eee97..e09358901ab5 100644
> --- a/drivers/pwm/pwm-crc.c
> +++ b/drivers/pwm/pwm-crc.c
> @@ -160,22 +160,22 @@ static const struct pwm_ops crc_pwm_ops = {
>
> static int crystalcove_pwm_probe(struct platform_device *pdev)
> {
> - struct crystalcove_pwm *pwm;
> + struct crystalcove_pwm *crc_pwm;
> struct device *dev = pdev->dev.parent;
> struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
>
> - pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
> - if (!pwm)
> + crc_pwm = devm_kzalloc(&pdev->dev, sizeof(*crc_pwm), GFP_KERNEL);
> + if (!crc_pwm)
> return -ENOMEM;
>
> - pwm->chip.dev = &pdev->dev;
> - pwm->chip.ops = &crc_pwm_ops;
> - pwm->chip.npwm = 1;
> + crc_pwm->chip.dev = &pdev->dev;
> + crc_pwm->chip.ops = &crc_pwm_ops;
> + crc_pwm->chip.npwm = 1;
>
> /* get the PMIC regmap */
> - pwm->regmap = pmic->regmap;
> + crc_pwm->regmap = pmic->regmap;
>
> - return devm_pwmchip_add(&pdev->dev, &pwm->chip);
> + return devm_pwmchip_add(&pdev->dev, &crc_pwm->chip);
> }
>
> static struct platform_driver crystalcove_pwm_driver = {
>
> base-commit: 53a2eaaf19c4e652ac53b5b2441582a555768516
prev parent reply other threads:[~2023-11-30 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 7:41 [PATCH] pwm: crc: Use consistent variable naming for driver data Uwe Kleine-König
2023-11-30 9:28 ` Hans de Goede [this message]
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=b05d041e-c734-4a94-ab46-18e5235eb208@redhat.com \
--to=hdegoede@redhat.com \
--cc=kernel@pengutronix.de \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).