drivers/staging/sm750fb/sm750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The static const char * arrays 'g_fbmode' and 'fix_id' should be
defined as 'static const char * const' to make the pointer arrays
themselves constant. This allows the compiler to place them in the
read-only data section.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9a42a08c8..b0bdfaeca 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,7 +33,7 @@
static int g_hwcursor = 1;
static int g_noaccel;
static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
static const char *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview;
@@ -728,7 +728,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
lynx750_ext, NULL, vesa_modes,
};
int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
- static const char *fix_id[2] = {
+ static const char * const fix_id[2] = {
"sm750_fb1", "sm750_fb2",
};
--
2.34.1
Hi Hungyu,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Hungyu-Lin/staging-sm750fb-constify-static-char-pointer-arrays/20260331-152633
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260331050738.1547-1-dennylin0707%40gmail.com
patch subject: [PATCH] staging: sm750fb: constify static char pointer arrays
config: i386-buildonly-randconfig-004-20260331 (https://download.01.org/0day-ci/archive/20260331/202603312237.JBEuEw74-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603312237.JBEuEw74-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603312237.JBEuEw74-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/staging/sm750fb/sm750.c:782:19: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
782 | g_fbmode[index] = g_def_fbmode;
| ~~~~~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:36:27: note: variable 'g_fbmode' declared const here
36 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:784:20: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
784 | g_fbmode[index] = g_fbmode[0];
| ~~~~~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:36:27: note: variable 'g_fbmode' declared const here
36 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:893:17: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
893 | g_fbmode[0] = opt;
| ~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:36:27: note: variable 'g_fbmode' declared const here
36 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:897:17: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
897 | g_fbmode[1] = opt;
| ~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:36:27: note: variable 'g_fbmode' declared const here
36 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +782 drivers/staging/sm750fb/sm750.c
81dee67e215b23 Sudip Mukherjee 2015-03-03 716
81dee67e215b23 Sudip Mukherjee 2015-03-03 717 static int lynxfb_set_fbinfo(struct fb_info *info, int index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 718 {
81dee67e215b23 Sudip Mukherjee 2015-03-03 719 int i;
81dee67e215b23 Sudip Mukherjee 2015-03-03 720 struct lynxfb_par *par;
e359b6a863e19f Mike Rapoport 2015-10-26 721 struct sm750_dev *sm750_dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 722 struct lynxfb_crtc *crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 723 struct lynxfb_output *output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 724 struct fb_var_screeninfo *var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 725 struct fb_fix_screeninfo *fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 726
81dee67e215b23 Sudip Mukherjee 2015-03-03 727 const struct fb_videomode *pdb[] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 728 lynx750_ext, NULL, vesa_modes,
81dee67e215b23 Sudip Mukherjee 2015-03-03 729 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 730 int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
218d4cc450cea4 Hungyu Lin 2026-03-31 731 static const char * const fix_id[2] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 732 "sm750_fb1", "sm750_fb2",
81dee67e215b23 Sudip Mukherjee 2015-03-03 733 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 734
81dee67e215b23 Sudip Mukherjee 2015-03-03 735 int ret, line_length;
81dee67e215b23 Sudip Mukherjee 2015-03-03 736
81dee67e215b23 Sudip Mukherjee 2015-03-03 737 ret = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 738 par = (struct lynxfb_par *)info->par;
e359b6a863e19f Mike Rapoport 2015-10-26 739 sm750_dev = par->dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 740 crtc = &par->crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 741 output = &par->output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 742 var = &info->var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 743 fix = &info->fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 744
81dee67e215b23 Sudip Mukherjee 2015-03-03 745 /* set index */
81dee67e215b23 Sudip Mukherjee 2015-03-03 746 par->index = index;
81dee67e215b23 Sudip Mukherjee 2015-03-03 747 output->channel = &crtc->channel;
81dee67e215b23 Sudip Mukherjee 2015-03-03 748 sm750fb_set_drv(par);
81dee67e215b23 Sudip Mukherjee 2015-03-03 749
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 750 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 751 * set current cursor variable and proc pointer,
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 752 * must be set after crtc member initialized
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 753 */
fdc234d85210d9 Benjamin Philip 2021-07-28 754 crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
e359b6a863e19f Mike Rapoport 2015-10-26 755 crtc->cursor.mmio = sm750_dev->pvReg +
e359b6a863e19f Mike Rapoport 2015-10-26 756 0x800f0 + (int)crtc->channel * 0x140;
81dee67e215b23 Sudip Mukherjee 2015-03-03 757
cd33da26036ea5 Christopher Carbone 2022-08-23 758 crtc->cursor.max_h = 64;
cd33da26036ea5 Christopher Carbone 2022-08-23 759 crtc->cursor.max_w = 64;
39f9137268ee3d Benjamin Philip 2021-07-26 760 crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
e359b6a863e19f Mike Rapoport 2015-10-26 761 crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
81dee67e215b23 Sudip Mukherjee 2015-03-03 762
3de08a2d14ff8c Lorenzo Stoakes 2015-03-20 763 memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
f7c8a046577e09 Thomas Zimmermann 2023-11-27 764 if (!g_hwcursor)
52d0744d751d8f Arnd Bergmann 2016-11-09 765 sm750_hw_cursor_disable(&crtc->cursor);
81dee67e215b23 Sudip Mukherjee 2015-03-03 766
81dee67e215b23 Sudip Mukherjee 2015-03-03 767 /* set info->fbops, must be set before fb_find_mode */
e359b6a863e19f Mike Rapoport 2015-10-26 768 if (!sm750_dev->accel_off) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 769 /* use 2d acceleration */
f7c8a046577e09 Thomas Zimmermann 2023-11-27 770 if (!g_hwcursor)
f7c8a046577e09 Thomas Zimmermann 2023-11-27 771 info->fbops = &lynxfb_ops_accel;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 772 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 773 info->fbops = &lynxfb_ops_accel_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 774 } else {
f7c8a046577e09 Thomas Zimmermann 2023-11-27 775 if (!g_hwcursor)
81dee67e215b23 Sudip Mukherjee 2015-03-03 776 info->fbops = &lynxfb_ops;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 777 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 778 info->fbops = &lynxfb_ops_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 779 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 780
81dee67e215b23 Sudip Mukherjee 2015-03-03 781 if (!g_fbmode[index]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 @782 g_fbmode[index] = g_def_fbmode;
81dee67e215b23 Sudip Mukherjee 2015-03-03 783 if (index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 784 g_fbmode[index] = g_fbmode[0];
81dee67e215b23 Sudip Mukherjee 2015-03-03 785 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 786
81dee67e215b23 Sudip Mukherjee 2015-03-03 787 for (i = 0; i < 3; i++) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 788 ret = fb_find_mode(var, info, g_fbmode[index],
81dee67e215b23 Sudip Mukherjee 2015-03-03 789 pdb[i], cdb[i], NULL, 8);
81dee67e215b23 Sudip Mukherjee 2015-03-03 790
db7fb3588ab492 Artem Lytkin 2026-02-23 791 if (ret == 1 || ret == 2)
81dee67e215b23 Sudip Mukherjee 2015-03-03 792 break;
81dee67e215b23 Sudip Mukherjee 2015-03-03 793 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 794
81dee67e215b23 Sudip Mukherjee 2015-03-03 795 /* set par */
81dee67e215b23 Sudip Mukherjee 2015-03-03 796 par->info = info;
81dee67e215b23 Sudip Mukherjee 2015-03-03 797
81dee67e215b23 Sudip Mukherjee 2015-03-03 798 /* set info */
e3a3f9f5123683 Mike Rapoport 2015-10-26 799 line_length = ALIGN((var->xres_virtual * var->bits_per_pixel / 8),
e3a3f9f5123683 Mike Rapoport 2015-10-26 800 crtc->line_pad);
81dee67e215b23 Sudip Mukherjee 2015-03-03 801
81dee67e215b23 Sudip Mukherjee 2015-03-03 802 info->pseudo_palette = &par->pseudo_palette[0];
cc59bde1c920ab Benjamin Philip 2021-07-28 803 info->screen_base = crtc->v_screen;
81dee67e215b23 Sudip Mukherjee 2015-03-03 804 info->screen_size = line_length * var->yres_virtual;
81dee67e215b23 Sudip Mukherjee 2015-03-03 805
81dee67e215b23 Sudip Mukherjee 2015-03-03 806 /* set info->fix */
81dee67e215b23 Sudip Mukherjee 2015-03-03 807 fix->type = FB_TYPE_PACKED_PIXELS;
81dee67e215b23 Sudip Mukherjee 2015-03-03 808 fix->type_aux = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 809 fix->xpanstep = crtc->xpanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 810 fix->ypanstep = crtc->ypanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 811 fix->ywrapstep = crtc->ywrapstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 812 fix->accel = FB_ACCEL_SMI;
81dee67e215b23 Sudip Mukherjee 2015-03-03 813
8c475735085a7d Tim Wassink 2025-12-21 814 strscpy(fix->id, fix_id[index], sizeof(fix->id));
81dee67e215b23 Sudip Mukherjee 2015-03-03 815
fdc234d85210d9 Benjamin Philip 2021-07-28 816 fix->smem_start = crtc->o_screen + sm750_dev->vidmem_start;
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 817 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 818 * according to mmap experiment from user space application,
81dee67e215b23 Sudip Mukherjee 2015-03-03 819 * fix->mmio_len should not larger than virtual size
81dee67e215b23 Sudip Mukherjee 2015-03-03 820 * (xres_virtual x yres_virtual x ByPP)
81dee67e215b23 Sudip Mukherjee 2015-03-03 821 * Below line maybe buggy when user mmap fb dev node and write
81dee67e215b23 Sudip Mukherjee 2015-03-03 822 * data into the bound over virtual size
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 823 */
81dee67e215b23 Sudip Mukherjee 2015-03-03 824 fix->smem_len = crtc->vidmem_size;
81dee67e215b23 Sudip Mukherjee 2015-03-03 825 info->screen_size = fix->smem_len;
81dee67e215b23 Sudip Mukherjee 2015-03-03 826 fix->line_length = line_length;
e359b6a863e19f Mike Rapoport 2015-10-26 827 fix->mmio_start = sm750_dev->vidreg_start;
e359b6a863e19f Mike Rapoport 2015-10-26 828 fix->mmio_len = sm750_dev->vidreg_size;
b610e1193a917f Matej Dujava 2020-04-30 829
b610e1193a917f Matej Dujava 2020-04-30 830 lynxfb_set_visual_mode(info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 831
81dee67e215b23 Sudip Mukherjee 2015-03-03 832 /* set var */
81dee67e215b23 Sudip Mukherjee 2015-03-03 833 var->activate = FB_ACTIVATE_NOW;
81dee67e215b23 Sudip Mukherjee 2015-03-03 834 var->accel_flags = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 835 var->vmode = FB_VMODE_NONINTERLACED;
81dee67e215b23 Sudip Mukherjee 2015-03-03 836
61c507cf652da1 Michel von Czettritz 2015-03-26 837 ret = fb_alloc_cmap(&info->cmap, 256, 0);
61c507cf652da1 Michel von Czettritz 2015-03-26 838 if (ret < 0) {
fbab250eb51d6d Artem Lytkin 2026-02-07 839 dev_err(info->device, "Could not allocate memory for cmap.\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 840 goto exit;
81dee67e215b23 Sudip Mukherjee 2015-03-03 841 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 842
81dee67e215b23 Sudip Mukherjee 2015-03-03 843 exit:
81dee67e215b23 Sudip Mukherjee 2015-03-03 844 lynxfb_ops_check_var(var, info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 845 return ret;
81dee67e215b23 Sudip Mukherjee 2015-03-03 846 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 847
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
On Tue, Mar 31, 2026 at 05:07:38AM +0000, Hungyu Lin wrote:
> The static const char * arrays 'g_fbmode' and 'fix_id' should be
> defined as 'static const char * const' to make the pointer arrays
> themselves constant. This allows the compiler to place them in the
> read-only data section.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 9a42a08c8..b0bdfaeca 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -33,7 +33,7 @@
> static int g_hwcursor = 1;
> static int g_noaccel;
> static int g_nomtrr;
> -static const char *g_fbmode[] = {NULL, NULL};
> +static const char * const g_fbmode[] = {NULL, NULL};
> static const char *g_def_fbmode = "1024x768-32@60";
> static char *g_settings;
> static int g_dualview;
> @@ -728,7 +728,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
> lynx750_ext, NULL, vesa_modes,
> };
> int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
> - static const char *fix_id[2] = {
> + static const char * const fix_id[2] = {
> "sm750_fb1", "sm750_fb2",
> };
>
> --
> 2.34.1
>
>
Please always test-build your changes so you do not get grumpy kernel
maintainers asking you why you did not test-build your changes :(
thanks,
greg k-h
Hi Greg,
Thanks for the reminder. I will make sure to test-build my changes
before submitting patches next time.
Best regards,
Hungyu Lin
On Tue, Mar 31, 2026 at 1:45 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Tue, Mar 31, 2026 at 05:07:38AM +0000, Hungyu Lin wrote:
> > The static const char * arrays 'g_fbmode' and 'fix_id' should be
> > defined as 'static const char * const' to make the pointer arrays
> > themselves constant. This allows the compiler to place them in the
> > read-only data section.
> >
> > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> > ---
> > drivers/staging/sm750fb/sm750.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> > index 9a42a08c8..b0bdfaeca 100644
> > --- a/drivers/staging/sm750fb/sm750.c
> > +++ b/drivers/staging/sm750fb/sm750.c
> > @@ -33,7 +33,7 @@
> > static int g_hwcursor = 1;
> > static int g_noaccel;
> > static int g_nomtrr;
> > -static const char *g_fbmode[] = {NULL, NULL};
> > +static const char * const g_fbmode[] = {NULL, NULL};
> > static const char *g_def_fbmode = "1024x768-32@60";
> > static char *g_settings;
> > static int g_dualview;
> > @@ -728,7 +728,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
> > lynx750_ext, NULL, vesa_modes,
> > };
> > int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
> > - static const char *fix_id[2] = {
> > + static const char * const fix_id[2] = {
> > "sm750_fb1", "sm750_fb2",
> > };
> >
> > --
> > 2.34.1
> >
> >
>
> Please always test-build your changes so you do not get grumpy kernel
> maintainers asking you why you did not test-build your changes :(
>
> thanks,
>
> greg k-h
Constify the static fix_id array so it can be placed in read-only memory.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
Changes in v2:
- Drop g_fbmode change as it is modified at runtime.
---
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 62f6e0cdf..795e9164b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -740,7 +740,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
"kernel HELPERS prepared vesa_modes",
};
- static const char *fix_id[2] = {
+ static const char * const fix_id[2] = {
"sm750_fb1", "sm750_fb2",
};
--
2.34.1
On Tue, Mar 31, 2026 at 01:57:59PM +0000, Hungyu Lin wrote:
> Constify the static fix_id array so it can be placed in read-only memory.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
>
> ---
> Changes in v2:
> - Drop g_fbmode change as it is modified at runtime.
> ---
> drivers/staging/sm750fb/sm750.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 62f6e0cdf..795e9164b 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -740,7 +740,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
> "kernel HELPERS prepared vesa_modes",
> };
>
> - static const char *fix_id[2] = {
> + static const char * const fix_id[2] = {
> "sm750_fb1", "sm750_fb2",
> };
>
> --
> 2.34.1
>
>
This is really a "v3" patch, AND please don't respond within the middle
of the thread, make it a new one.
thanks,
greg k-h
Make the static fix_id array const-qualified so it can be placed
in read-only memory.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 62f6e0cdf..795e9164b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -740,7 +740,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
"kernel HELPERS prepared vesa_modes",
};
- static const char *fix_id[2] = {
+ static const char * const fix_id[2] = {
"sm750_fb1", "sm750_fb2",
};
--
2.34.1
On Tue, Mar 31, 2026 at 01:43:49PM +0000, Hungyu Lin wrote:
> Make the static fix_id array const-qualified so it can be placed
> in read-only memory.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 62f6e0cdf..795e9164b 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -740,7 +740,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
> "kernel HELPERS prepared vesa_modes",
> };
>
> - static const char *fix_id[2] = {
> + static const char * const fix_id[2] = {
> "sm750_fb1", "sm750_fb2",
> };
>
> --
> 2.34.1
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Make the static fix_id array const-qualified so it can be placed
in read-only memory.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 62f6e0cdf..795e9164b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -740,7 +740,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
"kernel HELPERS prepared vesa_modes",
};
- static const char *fix_id[2] = {
+ static const char * const fix_id[2] = {
"sm750_fb1", "sm750_fb2",
};
--
2.34.1
© 2016 - 2026 Red Hat, Inc.