Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drivers: watchdog: Remove duplicate include of kernel.h
@ 2021-03-23  1:43 Wan Jiabing
  2021-03-23  2:14 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Wan Jiabing @ 2021-03-23  1:43 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, linux-watchdog, linux-kernel
  Cc: kael_w, Wan Jiabing

linux/kernel.h has been included at line 17, so remove the 
duplicate one at line 22.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/watchdog/dw_wdt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 32d0e1781e63..b1642e2d9175 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -19,7 +19,6 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/interrupt.h>
-- 
2.25.1


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

* Re: [PATCH] drivers: watchdog: Remove duplicate include of kernel.h
  2021-03-23  1:43 [PATCH] drivers: watchdog: Remove duplicate include of kernel.h Wan Jiabing
@ 2021-03-23  2:14 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-03-23  2:14 UTC (permalink / raw)
  To: Wan Jiabing, Wim Van Sebroeck, linux-watchdog, linux-kernel; +Cc: kael_w

On 3/22/21 6:43 PM, Wan Jiabing wrote:
> linux/kernel.h has been included at line 17, so remove the 
> duplicate one at line 22.
> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>  drivers/watchdog/dw_wdt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index 32d0e1781e63..b1642e2d9175 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -19,7 +19,6 @@
>  #include <linux/delay.h>
>  #include <linux/err.h>
>  #include <linux/io.h>
> -#include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <linux/interrupt.h>
> 

The reason for the duplicate include is the non-alphabetic order of include
files. I find that worse than the duplicate include. If it is too much effort
to reorder include files to be in alphabetic order, please at least don't
make it worse and remove the other include.

Guenter

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  1:43 [PATCH] drivers: watchdog: Remove duplicate include of kernel.h Wan Jiabing
2021-03-23  2:14 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git