From: Jonathan Cameron <jic23@kernel.org>
To: Andrei Coardos <aboutphysycs@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-iio@vger.kernel.org, alexandre.torgue@foss.st.com,
mcoquelin.stm32@gmail.com, lars@metafoo.de,
Alexandru Ardelean <alex@shruggie.ro>
Subject: Re: [PATCH v2] iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
Date: Sat, 5 Aug 2023 19:30:52 +0100 [thread overview]
Message-ID: <20230805193052.690c87e8@jic23-huawei> (raw)
In-Reply-To: <20230802133509.29381-1-aboutphysycs@gmail.com>
On Wed, 2 Aug 2023 16:35:09 +0300
Andrei Coardos <aboutphysycs@gmail.com> wrote:
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>
> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>
> Changelog V1->V2:
>
> * https://lore.kernel.org/linux-iio/CAH3L5QpuoDYU6qvWH7_z5Yx0cW2qPMbCA8AFEYAPsiEkSzCiwQ@mail.gmail.com/T/#t
> * Adjusted the returning values of the function
>
>
> drivers/iio/trigger/stm32-lptimer-trigger.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
> index df2416e33375..ab1cc6a05f26 100644
> --- a/drivers/iio/trigger/stm32-lptimer-trigger.c
> +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
> @@ -88,11 +88,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
> priv->dev = &pdev->dev;
> priv->trg = stm32_lptim_triggers[index];
>
> - ret = stm32_lptim_setup_trig(priv);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return stm32_lptim_setup_trig(priv);
Both of us failed to notice ret isn't used any more. Anyhow, I cleaned that
up after spotting the build warning.
Jonathan
> }
>
> static const struct of_device_id stm32_lptim_trig_of_match[] = {
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-08-05 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 13:35 [PATCH v2] iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata() Andrei Coardos
2023-08-05 18:05 ` Jonathan Cameron
2023-08-05 18:30 ` Jonathan Cameron [this message]
2023-08-06 8:14 ` Andrei Coardos
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=20230805193052.690c87e8@jic23-huawei \
--to=jic23@kernel.org \
--cc=aboutphysycs@gmail.com \
--cc=alex@shruggie.ro \
--cc=alexandre.torgue@foss.st.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
/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