diff mbox series

[2/2] watchdog: pm8916_wdt: fix missing include

Message ID 20190906203054.26725-2-jorge.ramirez-ortiz@linaro.org
State New
Headers show
Series [1/2] watchdog: pm8916_wdt: fix pretimeout registration flow | expand

Commit Message

Jorge Ramirez-Ortiz Sept. 6, 2019, 8:30 p.m. UTC
As per Documentation/process/submit-checklist.rst, when using  a
facility #include the file that defines/declares  that facility.

Don't depend on other header files pulling in ones that you use.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

---
 drivers/watchdog/pm8916_wdt.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.23.0

Comments

Guenter Roeck Sept. 8, 2019, 10:54 p.m. UTC | #1
On 9/6/19 1:30 PM, Jorge Ramirez-Ortiz wrote:
> As per Documentation/process/submit-checklist.rst, when using  a

> facility #include the file that defines/declares  that facility.

> 

> Don't depend on other header files pulling in ones that you use.

> 


Correct, but then also don't include header files you don't use.
In this case, the include of linux/bitops.h is no longer necessary
if linux/bits.h is included since the driver doesn't really use bit
operations, only bit masks.

Guenter

> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

> ---

>   drivers/watchdog/pm8916_wdt.c | 1 +

>   1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c

> index cb5304c26ac3..b8d9df0f96f7 100644

> --- a/drivers/watchdog/pm8916_wdt.c

> +++ b/drivers/watchdog/pm8916_wdt.c

> @@ -1,5 +1,6 @@

>   // SPDX-License-Identifier: GPL-2.0

>   #include <linux/bitops.h>

> +#include <linux/bits.h>

>   #include <linux/interrupt.h>

>   #include <linux/kernel.h>

>   #include <linux/module.h>

>
diff mbox series

Patch

diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c
index cb5304c26ac3..b8d9df0f96f7 100644
--- a/drivers/watchdog/pm8916_wdt.c
+++ b/drivers/watchdog/pm8916_wdt.c
@@ -1,5 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
+#include <linux/bits.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>