2019-05-26 07:17:23

by Hariprasad Kelam

[permalink] [raw]
Subject: [PATCH] drivers: staging: speakup: serialio: fix warning linux/serial.h is included more than once

fix below warning reported by includecheck

./drivers/staging/speakup/serialio.h: linux/serial.h is included more
than once.

Signed-off-by: Hariprasad Kelam <[email protected]>
---
drivers/staging/speakup/serialio.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/speakup/serialio.h b/drivers/staging/speakup/serialio.h
index aa691e4..6f8f86f 100644
--- a/drivers/staging/speakup/serialio.h
+++ b/drivers/staging/speakup/serialio.h
@@ -4,9 +4,6 @@

#include <linux/serial.h> /* for rs_table, serial constants */
#include <linux/serial_reg.h> /* for more serial constants */
-#ifndef __sparc__
-#include <linux/serial.h>
-#endif
#include <linux/serial_core.h>

#include "spk_priv.h"
--
2.7.4


2019-05-27 20:40:01

by Samuel Thibault

[permalink] [raw]
Subject: Re: [PATCH] drivers: staging: speakup: serialio: fix warning linux/serial.h is included more than once

Hariprasad Kelam, le dim. 26 mai 2019 12:43:22 +0530, a ecrit:
> fix below warning reported by includecheck
>
> ./drivers/staging/speakup/serialio.h: linux/serial.h is included more
> than once.
>
> Signed-off-by: Hariprasad Kelam <[email protected]>

That was indeed the result of f79b0d9c223ca09cefffc72304a7bcbc401a1c6f
("staging: speakup: Fixed warning <linux/serial.h> instead of
<asm/serial.h>") which didn't take care of the inclusion above.
I believe <linux/serial.h> only is fine, the important part is in
drivers/staging/speakup/serialio.c which really needs to include
asm/serial.h to get SERIAL_PORT_DFNS

Reviewed-by: Samuel Thibault <[email protected]>

> ---
> drivers/staging/speakup/serialio.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/speakup/serialio.h b/drivers/staging/speakup/serialio.h
> index aa691e4..6f8f86f 100644
> --- a/drivers/staging/speakup/serialio.h
> +++ b/drivers/staging/speakup/serialio.h
> @@ -4,9 +4,6 @@
>
> #include <linux/serial.h> /* for rs_table, serial constants */
> #include <linux/serial_reg.h> /* for more serial constants */
> -#ifndef __sparc__
> -#include <linux/serial.h>
> -#endif
> #include <linux/serial_core.h>
>
> #include "spk_priv.h"
> --
> 2.7.4
>

--
Samuel
> No manual is ever necessary.
May I politely interject here: BULLSHIT. That's the biggest Apple lie of all!
(Discussion in comp.os.linux.misc on the intuitiveness of interfaces.)