* [PATCH v2] staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function
@ 2023-01-17 15:28 Brent Pappas
2023-01-18 8:38 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Brent Pappas @ 2023-01-17 15:28 UTC (permalink / raw)
To: rmfrfs
Cc: johan, elder, gregkh, greybus-dev, linux-staging, linux-kernel,
Brent Pappas
Replace the macro irq_data_to_gpio_chip with a static inline function to comply
with Linux coding style standards.
Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
---
Changelog:
V1 -> V2: Change return type of function from void * to struct gpio_chip *.
Remove the inline keyword from the function definition.
drivers/staging/greybus/gpio.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
index 8a7cf1d0e968..833162ceb385 100644
--- a/drivers/staging/greybus/gpio.c
+++ b/drivers/staging/greybus/gpio.c
@@ -43,7 +43,11 @@ struct gb_gpio_controller {
};
#define gpio_chip_to_gb_gpio_controller(chip) \
container_of(chip, struct gb_gpio_controller, chip)
-#define irq_data_to_gpio_chip(d) (d->domain->host_data)
+
+static struct gpio_chip *irq_data_to_gpio_chip(struct irq_data *d)
+{
+ return d->domain->host_data;
+}
static int gb_gpio_line_count_operation(struct gb_gpio_controller *ggc)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function
2023-01-17 15:28 [PATCH v2] staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function Brent Pappas
@ 2023-01-18 8:38 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2023-01-18 8:38 UTC (permalink / raw)
To: Brent Pappas
Cc: rmfrfs, johan, elder, gregkh, greybus-dev, linux-staging,
linux-kernel
On Tue, Jan 17, 2023 at 10:28:57AM -0500, Brent Pappas wrote:
> Replace the macro irq_data_to_gpio_chip with a static inline function to comply
> with Linux coding style standards.
>
> Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
Thanks!
Reviewed-by: Dan Carpenter <error27@gmail.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-18 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 15:28 [PATCH v2] staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function Brent Pappas
2023-01-18 8:38 ` Dan Carpenter
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).