* [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header
@ 2023-09-01 11:34 Bartosz Golaszewski
2023-09-01 12:12 ` Andy Shevchenko
2023-09-07 7:44 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-09-01 11:34 UTC (permalink / raw)
To: Linus Walleij, Andy Shevchenko
Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
'extern' doesn't do anything for function declarations. Remove it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
include/linux/gpio/driver.h | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 8fc3ceffcbe9..c312bf3e0369 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -529,8 +529,7 @@ struct gpio_chip {
#endif /* CONFIG_OF_GPIO */
};
-extern const char *gpiochip_is_requested(struct gpio_chip *gc,
- unsigned int offset);
+const char *gpiochip_is_requested(struct gpio_chip *gc, unsigned int offset);
/**
* for_each_requested_gpio_in_range - iterates over requested GPIOs in a given range
@@ -549,9 +548,9 @@ extern const char *gpiochip_is_requested(struct gpio_chip *gc,
for_each_requested_gpio_in_range(chip, i, 0, chip->ngpio, label)
/* add/remove chips */
-extern int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
- struct lock_class_key *lock_key,
- struct lock_class_key *request_key);
+int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
+ struct lock_class_key *lock_key,
+ struct lock_class_key *request_key);
/**
* gpiochip_add_data() - register a gpio_chip
@@ -599,13 +598,13 @@ static inline int gpiochip_add(struct gpio_chip *gc)
{
return gpiochip_add_data(gc, NULL);
}
-extern void gpiochip_remove(struct gpio_chip *gc);
-extern int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc, void *data,
- struct lock_class_key *lock_key,
- struct lock_class_key *request_key);
+void gpiochip_remove(struct gpio_chip *gc);
+int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc,
+ void *data, struct lock_class_key *lock_key,
+ struct lock_class_key *request_key);
-extern struct gpio_chip *gpiochip_find(void *data,
- int (*match)(struct gpio_chip *gc, void *data));
+struct gpio_chip *gpiochip_find(void *data,
+ int (*match)(struct gpio_chip *gc, void *data));
bool gpiochip_line_is_irq(struct gpio_chip *gc, unsigned int offset);
int gpiochip_reqres_irq(struct gpio_chip *gc, unsigned int offset);
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header
2023-09-01 11:34 [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header Bartosz Golaszewski
@ 2023-09-01 12:12 ` Andy Shevchenko
2023-09-07 7:44 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-09-01 12:12 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, linux-gpio, linux-kernel, Bartosz Golaszewski
On Fri, Sep 01, 2023 at 01:34:58PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> 'extern' doesn't do anything for function declarations. Remove it.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header
2023-09-01 11:34 [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header Bartosz Golaszewski
2023-09-01 12:12 ` Andy Shevchenko
@ 2023-09-07 7:44 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2023-09-07 7:44 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andy Shevchenko, linux-gpio, linux-kernel, Bartosz Golaszewski
On Fri, Sep 1, 2023 at 1:35 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> 'extern' doesn't do anything for function declarations. Remove it.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Right I guess it should never be in headers, the one place
where is makes sense is if you're suddenly exporting something
in a C file, such as to expose it to assembly.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-07 15:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 11:34 [PATCH] gpiolib: remove unnecessary extern specifiers from the driver header Bartosz Golaszewski
2023-09-01 12:12 ` Andy Shevchenko
2023-09-07 7:44 ` Linus Walleij
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).