From: Greg KH <gregkh@linuxfoundation.org>
To: Nam Cao <namcaov@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: add necessary #include in sm750_accel.h, sm750_cursor.h
Date: Tue, 29 Mar 2022 16:51:34 +0200 [thread overview]
Message-ID: <YkMc9p4nd/4+2fkf@kroah.com> (raw)
In-Reply-To: <20220318165046.33745-1-namcaov@gmail.com>
On Fri, Mar 18, 2022 at 05:50:46PM +0100, Nam Cao wrote:
> In sm750_cursor.h, struct lynx_cursor is used without including the
> header file where this struct is defined. Similar thing is seen in
> sm750_accel.h.
>
> The module can still be compiled because there is "#include "sm750.h""
> before every "#include "sm750_accel.h"" and "#include "sm750_cursor.h"".
> However, the order of #include should not affect the ability to compile.
>
> Add "#include "sm750.h"" to sm750_accel.h and sm750_cursor.h.
>
> Signed-off-by: Nam Cao <namcaov@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_accel.h | 2 ++
> drivers/staging/sm750fb/sm750_cursor.h | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
> index 2c79cb730a0a..fe6ff196272c 100644
> --- a/drivers/staging/sm750fb/sm750_accel.h
> +++ b/drivers/staging/sm750fb/sm750_accel.h
> @@ -2,6 +2,8 @@
> #ifndef ACCEL_H__
> #define ACCEL_H__
>
> +#include "sm750.h"
> +
> #define HW_ROP2_COPY 0xc
> #define HW_ROP2_XOR 0x6
>
> diff --git a/drivers/staging/sm750fb/sm750_cursor.h b/drivers/staging/sm750fb/sm750_cursor.h
> index b59643dd61ed..f023b691ac0b 100644
> --- a/drivers/staging/sm750fb/sm750_cursor.h
> +++ b/drivers/staging/sm750fb/sm750_cursor.h
> @@ -2,6 +2,8 @@
> #ifndef LYNX_CURSOR_H__
> #define LYNX_CURSOR_H__
>
> +#include "sm750.h"
> +
> /* hw_cursor_xxx works for voyager,718 and 750 */
> void sm750_hw_cursor_enable(struct lynx_cursor *cursor);
> void sm750_hw_cursor_disable(struct lynx_cursor *cursor);
> --
> 2.25.1
>
>
I think the current code is fine, given that this is not actually
"fixing" anything. If you wish to unwind all of the #include mess in
this driver, that would be fine, but I doubt it really is worth it. You
really should not need more than 1 .h file for a single module, this one
is split up way too much.
thanks,
greg k-h
prev parent reply other threads:[~2022-03-29 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 16:50 [PATCH] staging: sm750fb: add necessary #include in sm750_accel.h, sm750_cursor.h Nam Cao
2022-03-29 14:51 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkMc9p4nd/4+2fkf@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=namcaov@gmail.com \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox