Message ID | 20220725075400.68478-1-javierm@redhat.com |
---|---|
State | New |
Headers | show |
Series | fbdev: Make registered_fb[] private to fbmem.c | expand |
Hi Am 25.07.22 um 09:54 schrieb Javier Martinez Canillas: > From: Daniel Vetter <daniel.vetter@ffwll.ch> > > No driver access this anymore, except for the olpc dcon fbdev driver but > that has been marked as broken anyways by commit de0952f267ff ("staging: > olpc_dcon: mark driver as broken"). > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Best regards Thomas > --- > > drivers/video/fbdev/core/fbmem.c | 6 +++--- > include/linux/fb.h | 6 ------ > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c > index 6ae1c5fa19f9..1e70d8c67653 100644 > --- a/drivers/video/fbdev/core/fbmem.c > +++ b/drivers/video/fbdev/core/fbmem.c > @@ -51,10 +51,10 @@ > static DEFINE_MUTEX(registration_lock); > > struct fb_info *registered_fb[FB_MAX] __read_mostly; > -EXPORT_SYMBOL(registered_fb); > - > int num_registered_fb __read_mostly; > -EXPORT_SYMBOL(num_registered_fb); > +#define for_each_registered_fb(i) \ > + for (i = 0; i < FB_MAX; i++) \ > + if (!registered_fb[i]) {} else > > bool fb_center_logo __read_mostly; > > diff --git a/include/linux/fb.h b/include/linux/fb.h > index 453c3b2b6b8e..0aff76bcbb00 100644 > --- a/include/linux/fb.h > +++ b/include/linux/fb.h > @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, > extern int fb_get_options(const char *name, char **option); > extern int fb_new_modelist(struct fb_info *info); > > -extern struct fb_info *registered_fb[FB_MAX]; > -extern int num_registered_fb; > extern bool fb_center_logo; > extern int fb_logo_count; > extern struct class *fb_class; > > -#define for_each_registered_fb(i) \ > - for (i = 0; i < FB_MAX; i++) \ > - if (!registered_fb[i]) {} else > - > static inline void lock_fb_info(struct fb_info *info) > { > mutex_lock(&info->lock);
On 7/25/22 09:55, Thomas Zimmermann wrote: > Hi > > Am 25.07.22 um 09:54 schrieb Javier Martinez Canillas: >> From: Daniel Vetter <daniel.vetter@ffwll.ch> >> >> No driver access this anymore, except for the olpc dcon fbdev driver but >> that has been marked as broken anyways by commit de0952f267ff ("staging: >> olpc_dcon: mark driver as broken"). >> >> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> >> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> > > Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Helge Deller <deller@gmx.de> Helge > > Best regards > Thomas > >> --- >> >> drivers/video/fbdev/core/fbmem.c | 6 +++--- >> include/linux/fb.h | 6 ------ >> 2 files changed, 3 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c >> index 6ae1c5fa19f9..1e70d8c67653 100644 >> --- a/drivers/video/fbdev/core/fbmem.c >> +++ b/drivers/video/fbdev/core/fbmem.c >> @@ -51,10 +51,10 @@ >> static DEFINE_MUTEX(registration_lock); >> struct fb_info *registered_fb[FB_MAX] __read_mostly; >> -EXPORT_SYMBOL(registered_fb); >> - >> int num_registered_fb __read_mostly; >> -EXPORT_SYMBOL(num_registered_fb); >> +#define for_each_registered_fb(i) \ >> + for (i = 0; i < FB_MAX; i++) \ >> + if (!registered_fb[i]) {} else >> bool fb_center_logo __read_mostly; >> diff --git a/include/linux/fb.h b/include/linux/fb.h >> index 453c3b2b6b8e..0aff76bcbb00 100644 >> --- a/include/linux/fb.h >> +++ b/include/linux/fb.h >> @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, >> extern int fb_get_options(const char *name, char **option); >> extern int fb_new_modelist(struct fb_info *info); >> -extern struct fb_info *registered_fb[FB_MAX]; >> -extern int num_registered_fb; >> extern bool fb_center_logo; >> extern int fb_logo_count; >> extern struct class *fb_class; >> -#define for_each_registered_fb(i) \ >> - for (i = 0; i < FB_MAX; i++) \ >> - if (!registered_fb[i]) {} else >> - >> static inline void lock_fb_info(struct fb_info *info) >> { >> mutex_lock(&info->lock); >
On 7/25/22 09:54, Javier Martinez Canillas wrote: > From: Daniel Vetter <daniel.vetter@ffwll.ch> > > No driver access this anymore, except for the olpc dcon fbdev driver but > that has been marked as broken anyways by commit de0952f267ff ("staging: > olpc_dcon: mark driver as broken"). > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> I've applied it to the fbdev git tree. Thanks! Helge > --- > > drivers/video/fbdev/core/fbmem.c | 6 +++--- > include/linux/fb.h | 6 ------ > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c > index 6ae1c5fa19f9..1e70d8c67653 100644 > --- a/drivers/video/fbdev/core/fbmem.c > +++ b/drivers/video/fbdev/core/fbmem.c > @@ -51,10 +51,10 @@ > static DEFINE_MUTEX(registration_lock); > > struct fb_info *registered_fb[FB_MAX] __read_mostly; > -EXPORT_SYMBOL(registered_fb); > - > int num_registered_fb __read_mostly; > -EXPORT_SYMBOL(num_registered_fb); > +#define for_each_registered_fb(i) \ > + for (i = 0; i < FB_MAX; i++) \ > + if (!registered_fb[i]) {} else > > bool fb_center_logo __read_mostly; > > diff --git a/include/linux/fb.h b/include/linux/fb.h > index 453c3b2b6b8e..0aff76bcbb00 100644 > --- a/include/linux/fb.h > +++ b/include/linux/fb.h > @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, > extern int fb_get_options(const char *name, char **option); > extern int fb_new_modelist(struct fb_info *info); > > -extern struct fb_info *registered_fb[FB_MAX]; > -extern int num_registered_fb; > extern bool fb_center_logo; > extern int fb_logo_count; > extern struct class *fb_class; > > -#define for_each_registered_fb(i) \ > - for (i = 0; i < FB_MAX; i++) \ > - if (!registered_fb[i]) {} else > - > static inline void lock_fb_info(struct fb_info *info) > { > mutex_lock(&info->lock);
On 7/26/22 09:22, Helge Deller wrote: > On 7/25/22 09:54, Javier Martinez Canillas wrote: >> From: Daniel Vetter <daniel.vetter@ffwll.ch> >> >> No driver access this anymore, except for the olpc dcon fbdev driver but >> that has been marked as broken anyways by commit de0952f267ff ("staging: >> olpc_dcon: mark driver as broken"). >> >> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> >> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> > > I've applied it to the fbdev git tree. I've dropped that patch for now from the fbdev git tree, since it gave build errors [1] in for-next: drivers/video/fbdev/simplefb.c:426:6: error: use of undeclared identifier 'num_registered_fb'; did you mean 'WB_registered'? if (num_registered_fb > 0) { ^~~~~~~~~~~~~~~~~ Helge [1] https://lore.kernel.org/all/202207270857.mo9oRcRE-lkp@intel.com/ >> >> drivers/video/fbdev/core/fbmem.c | 6 +++--- >> include/linux/fb.h | 6 ------ >> 2 files changed, 3 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c >> index 6ae1c5fa19f9..1e70d8c67653 100644 >> --- a/drivers/video/fbdev/core/fbmem.c >> +++ b/drivers/video/fbdev/core/fbmem.c >> @@ -51,10 +51,10 @@ >> static DEFINE_MUTEX(registration_lock); >> >> struct fb_info *registered_fb[FB_MAX] __read_mostly; >> -EXPORT_SYMBOL(registered_fb); >> - >> int num_registered_fb __read_mostly; >> -EXPORT_SYMBOL(num_registered_fb); >> +#define for_each_registered_fb(i) \ >> + for (i = 0; i < FB_MAX; i++) \ >> + if (!registered_fb[i]) {} else >> >> bool fb_center_logo __read_mostly; >> >> diff --git a/include/linux/fb.h b/include/linux/fb.h >> index 453c3b2b6b8e..0aff76bcbb00 100644 >> --- a/include/linux/fb.h >> +++ b/include/linux/fb.h >> @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, >> extern int fb_get_options(const char *name, char **option); >> extern int fb_new_modelist(struct fb_info *info); >> >> -extern struct fb_info *registered_fb[FB_MAX]; >> -extern int num_registered_fb; >> extern bool fb_center_logo; >> extern int fb_logo_count; >> extern struct class *fb_class; >> >> -#define for_each_registered_fb(i) \ >> - for (i = 0; i < FB_MAX; i++) \ >> - if (!registered_fb[i]) {} else >> - >> static inline void lock_fb_info(struct fb_info *info) >> { >> mutex_lock(&info->lock); >
Hi Am 27.07.22 um 06:08 schrieb Helge Deller: > On 7/26/22 09:22, Helge Deller wrote: >> On 7/25/22 09:54, Javier Martinez Canillas wrote: >>> From: Daniel Vetter <daniel.vetter@ffwll.ch> >>> >>> No driver access this anymore, except for the olpc dcon fbdev driver but >>> that has been marked as broken anyways by commit de0952f267ff ("staging: >>> olpc_dcon: mark driver as broken"). >>> >>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> >>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >>> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> >>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> >> >> I've applied it to the fbdev git tree. > > I've dropped that patch for now from the fbdev git tree, since > it gave build errors [1] in for-next: > > drivers/video/fbdev/simplefb.c:426:6: error: use of undeclared identifier 'num_registered_fb'; did you mean 'WB_registered'? > if (num_registered_fb > 0) { > ^~~~~~~~~~~~~~~~~ I've added the patch to drm-misc-next. The issue has been fixed there. Best regards Thomas > > Helge > > [1] https://lore.kernel.org/all/202207270857.mo9oRcRE-lkp@intel.com/ > > >>> >>> drivers/video/fbdev/core/fbmem.c | 6 +++--- >>> include/linux/fb.h | 6 ------ >>> 2 files changed, 3 insertions(+), 9 deletions(-) >>> >>> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c >>> index 6ae1c5fa19f9..1e70d8c67653 100644 >>> --- a/drivers/video/fbdev/core/fbmem.c >>> +++ b/drivers/video/fbdev/core/fbmem.c >>> @@ -51,10 +51,10 @@ >>> static DEFINE_MUTEX(registration_lock); >>> >>> struct fb_info *registered_fb[FB_MAX] __read_mostly; >>> -EXPORT_SYMBOL(registered_fb); >>> - >>> int num_registered_fb __read_mostly; >>> -EXPORT_SYMBOL(num_registered_fb); >>> +#define for_each_registered_fb(i) \ >>> + for (i = 0; i < FB_MAX; i++) \ >>> + if (!registered_fb[i]) {} else >>> >>> bool fb_center_logo __read_mostly; >>> >>> diff --git a/include/linux/fb.h b/include/linux/fb.h >>> index 453c3b2b6b8e..0aff76bcbb00 100644 >>> --- a/include/linux/fb.h >>> +++ b/include/linux/fb.h >>> @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, >>> extern int fb_get_options(const char *name, char **option); >>> extern int fb_new_modelist(struct fb_info *info); >>> >>> -extern struct fb_info *registered_fb[FB_MAX]; >>> -extern int num_registered_fb; >>> extern bool fb_center_logo; >>> extern int fb_logo_count; >>> extern struct class *fb_class; >>> >>> -#define for_each_registered_fb(i) \ >>> - for (i = 0; i < FB_MAX; i++) \ >>> - if (!registered_fb[i]) {} else >>> - >>> static inline void lock_fb_info(struct fb_info *info) >>> { >>> mutex_lock(&info->lock); >> >
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 6ae1c5fa19f9..1e70d8c67653 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -51,10 +51,10 @@ static DEFINE_MUTEX(registration_lock); struct fb_info *registered_fb[FB_MAX] __read_mostly; -EXPORT_SYMBOL(registered_fb); - int num_registered_fb __read_mostly; -EXPORT_SYMBOL(num_registered_fb); +#define for_each_registered_fb(i) \ + for (i = 0; i < FB_MAX; i++) \ + if (!registered_fb[i]) {} else bool fb_center_logo __read_mostly; diff --git a/include/linux/fb.h b/include/linux/fb.h index 453c3b2b6b8e..0aff76bcbb00 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -627,16 +627,10 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, extern int fb_get_options(const char *name, char **option); extern int fb_new_modelist(struct fb_info *info); -extern struct fb_info *registered_fb[FB_MAX]; -extern int num_registered_fb; extern bool fb_center_logo; extern int fb_logo_count; extern struct class *fb_class; -#define for_each_registered_fb(i) \ - for (i = 0; i < FB_MAX; i++) \ - if (!registered_fb[i]) {} else - static inline void lock_fb_info(struct fb_info *info) { mutex_lock(&info->lock);