mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] gpiolib: cleanup for duplicated including
@ 2023-12-18  7:16 Wang Jinchao
  2023-12-18  8:54 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Jinchao @ 2023-12-18  7:16 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko, linux-gpio,
	linux-kernel
  Cc: stone.xulei, wangjinchao

Remove second `#include <linux/err.h>`.
Remove `#include <asm/errno.h>`.
As they are guaranteed by the global `err.h`.

Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
---
V2:
    Revise the comment per Andy's suggestion.
V1: https://lore.kernel.org/all/202312151645+0800-wangjinchao@xfusion.com/

 include/linux/gpio/driver.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 0aed62f0c633..df6857e579a1 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -701,7 +701,6 @@ int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
 #else
 
 #include <asm/bug.h>
-#include <asm/errno.h>
 
 static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
 					      struct irq_domain *domain)
@@ -789,8 +788,6 @@ int gpio_device_get_base(struct gpio_device *gdev);
 
 #else /* CONFIG_GPIOLIB */
 
-#include <linux/err.h>
-
 #include <asm/bug.h>
 
 static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
-- 
2.40.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] gpiolib: cleanup for duplicated including
  2023-12-18  7:16 [PATCH v2] gpiolib: cleanup for duplicated including Wang Jinchao
@ 2023-12-18  8:54 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2023-12-18  8:54 UTC (permalink / raw)
  To: Wang Jinchao
  Cc: Linus Walleij, Andy Shevchenko, linux-gpio, linux-kernel, stone.xulei

On Mon, Dec 18, 2023 at 8:16 AM Wang Jinchao <wangjinchao@xfusion.com> wrote:
>
> Remove second `#include <linux/err.h>`.
> Remove `#include <asm/errno.h>`.
> As they are guaranteed by the global `err.h`.
>
> Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
> ---
> V2:
>     Revise the comment per Andy's suggestion.
> V1: https://lore.kernel.org/all/202312151645+0800-wangjinchao@xfusion.com/
>
>  include/linux/gpio/driver.h | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index 0aed62f0c633..df6857e579a1 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -701,7 +701,6 @@ int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
>  #else
>
>  #include <asm/bug.h>
> -#include <asm/errno.h>
>
>  static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
>                                               struct irq_domain *domain)
> @@ -789,8 +788,6 @@ int gpio_device_get_base(struct gpio_device *gdev);
>
>  #else /* CONFIG_GPIOLIB */
>
> -#include <linux/err.h>
> -
>  #include <asm/bug.h>
>
>  static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
> --
> 2.40.0
>

Applied, thanks!

Bart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-18  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18  7:16 [PATCH v2] gpiolib: cleanup for duplicated including Wang Jinchao
2023-12-18  8:54 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®