From: Andrei Coardos <aboutphysycs@gmail.com>
To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-gpio@vger.kernel.org
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, andy@kernel.org,
brgl@bgdev.pl, linus.walleij@linaro.org,
Andrei Coardos <aboutphysycs@gmail.com>,
Alexandru Ardelean <alex@shruggie.ro>
Subject: [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata()
Date: Tue, 1 Aug 2023 10:44:30 +0300 [thread overview]
Message-ID: <20230801074430.5179-1-aboutphysycs@gmail.com> (raw)
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>
---
drivers/gpio/gpio-sifive.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index c6a8d2374e31..0010f607a9ef 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -259,7 +259,6 @@ static int sifive_gpio_probe(struct platform_device *pdev)
girq->child_to_parent_hwirq = sifive_gpio_child_to_parent_hwirq;
girq->handler = handle_bad_irq;
girq->default_type = IRQ_TYPE_NONE;
- platform_set_drvdata(pdev, priv);
return gpiochip_add_data(&chip->gc, chip);
}
--
2.34.1
next reply other threads:[~2023-08-01 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 7:44 Andrei Coardos [this message]
2023-08-01 19:10 ` [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata() Andy Shevchenko
2023-08-03 13:47 ` Bartosz Golaszewski
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=20230801074430.5179-1-aboutphysycs@gmail.com \
--to=aboutphysycs@gmail.com \
--cc=alex@shruggie.ro \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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;
as well as URLs for NNTP newsgroup(s).