diff mbox series

[v2] fbcon: mark fbcon_registered_fb static

Message ID 20230804113237.51653-1-minhuadotchen@gmail.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series [v2] fbcon: mark fbcon_registered_fb static | expand

Commit Message

Min-Hua Chen Aug. 4, 2023, 11:32 a.m. UTC
Mark fbcon_registered_fb, and fbcon_num_registered_fb static
to fix the following sparse warnings:

drivers/video/fbdev/core/fbcon.c:105:16: sparse: warning: symbol 'fbcon_registered_fb' was not declared. Should it be static?
drivers/video/fbdev/core/fbcon.c:106:5: sparse: warning: symbol 'fbcon_num_registered_fb' was not declared. Should it be static?

No functional change intended.

Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>

---

change since v1:
1. registered_fb and num_registered_fb are still used in drivers/staging/olpc_dcon,
so do keep them as-is.
2. change the subject to fbcon: mark fbcon_registered_fb static
---
 drivers/video/fbdev/core/fbcon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Helge Deller Aug. 15, 2023, 9:34 p.m. UTC | #1
On 8/4/23 13:32, Min-Hua Chen wrote:
> Mark fbcon_registered_fb, and fbcon_num_registered_fb static
> to fix the following sparse warnings:
>
> drivers/video/fbdev/core/fbcon.c:105:16: sparse: warning: symbol 'fbcon_registered_fb' was not declared. Should it be static?
> drivers/video/fbdev/core/fbcon.c:106:5: sparse: warning: symbol 'fbcon_num_registered_fb' was not declared. Should it be static?
>
> No functional change intended.
>
> Cc: Helge Deller <deller@gmx.de>
> Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>

applied to the for-next-6.6 branch.

Thanks,
Helge


>
> ---
>
> change since v1:
> 1. registered_fb and num_registered_fb are still used in drivers/staging/olpc_dcon,
> so do keep them as-is.
> 2. change the subject to fbcon: mark fbcon_registered_fb static
> ---
>   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 887fad44e7ec..976900d6893c 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -102,8 +102,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++)		\
Helge Deller Aug. 15, 2023, 9:36 p.m. UTC | #2
On 8/15/23 23:34, Helge Deller wrote:
> On 8/4/23 13:32, Min-Hua Chen wrote:
>> Mark fbcon_registered_fb, and fbcon_num_registered_fb static
>> to fix the following sparse warnings:
>>
>> drivers/video/fbdev/core/fbcon.c:105:16: sparse: warning: symbol 'fbcon_registered_fb' was not declared. Should it be static?
>> drivers/video/fbdev/core/fbcon.c:106:5: sparse: warning: symbol 'fbcon_num_registered_fb' was not declared. Should it be static?
>>
>> No functional change intended.
>>
>> Cc: Helge Deller <deller@gmx.de>
>> Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
>
> applied to the for-next-6.6 branch.

Just dropped it again, since it was already applied by Daniel to the drm-misc tree ...

Helge

>
> Thanks,
> Helge
>
>
>>
>> ---
>>
>> change since v1:
>> 1. registered_fb and num_registered_fb are still used in drivers/staging/olpc_dcon,
>> so do keep them as-is.
>> 2. change the subject to fbcon: mark fbcon_registered_fb static
>> ---
>>   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 887fad44e7ec..976900d6893c 100644
>> --- a/drivers/video/fbdev/core/fbcon.c
>> +++ b/drivers/video/fbdev/core/fbcon.c
>> @@ -102,8 +102,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++)        \
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 887fad44e7ec..976900d6893c 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -102,8 +102,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++)		\