* [PATCH] fbcon: change fbcon_*registered_fb variables to static
@ 2022-04-23 12:56 Tom Rix
2022-04-23 13:52 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-23 12:56 UTC (permalink / raw)
To: daniel, deller, sam, tzimmermann, javierm, cssk
Cc: linux-fbdev, dri-devel, linux-kernel, Tom Rix
Sparse reports these issues
fbcon.c:106:16: warning: symbol 'fbcon_registered_fb' was not declared. Should it be static?
fbcon.c:107:5: warning: symbol 'fbcon_num_registered_fb' was not declared. Should it be static?
These variables are only used in fbcon.c. Single file use variables should
be static, so change their storage-class specifiers to static.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/video/fbdev/core/fbcon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index c4e91715ef00..225ac0fe0143 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -103,8 +103,8 @@ enum {
static struct fbcon_display fb_display[MAX_NR_CONSOLES];
-struct fb_info *fbcon_registered_fb[FB_MAX];
-int fbcon_num_registered_fb;
+static struct fb_info *fbcon_registered_fb[FB_MAX];
+static int fbcon_num_registered_fb;
#define fbcon_for_each_registered_fb(i) \
for (i = 0; WARN_CONSOLE_UNLOCKED(), i < FB_MAX; i++) \
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbcon: change fbcon_*registered_fb variables to static
2022-04-23 12:56 [PATCH] fbcon: change fbcon_*registered_fb variables to static Tom Rix
@ 2022-04-23 13:52 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2022-04-23 13:52 UTC (permalink / raw)
To: Tom Rix
Cc: daniel, deller, tzimmermann, javierm, cssk, linux-fbdev,
dri-devel, linux-kernel
On Sat, Apr 23, 2022 at 08:56:18AM -0400, Tom Rix wrote:
> Sparse reports these issues
> fbcon.c:106:16: warning: symbol 'fbcon_registered_fb' was not declared. Should it be static?
> fbcon.c:107:5: warning: symbol 'fbcon_num_registered_fb' was not declared. Should it be static?
>
> These variables are only used in fbcon.c. Single file use variables should
> be static, so change their storage-class specifiers to static.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> drivers/video/fbdev/core/fbcon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index c4e91715ef00..225ac0fe0143 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -103,8 +103,8 @@ enum {
>
> static struct fbcon_display fb_display[MAX_NR_CONSOLES];
>
> -struct fb_info *fbcon_registered_fb[FB_MAX];
> -int fbcon_num_registered_fb;
> +static struct fb_info *fbcon_registered_fb[FB_MAX];
> +static int fbcon_num_registered_fb;
>
> #define fbcon_for_each_registered_fb(i) \
> for (i = 0; WARN_CONSOLE_UNLOCKED(), i < FB_MAX; i++) \
> --
> 2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-23 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-23 12:56 [PATCH] fbcon: change fbcon_*registered_fb variables to static Tom Rix
2022-04-23 13:52 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).