* [PATCH] staging: rtl8723bs: hal: Fix block comment style in HalPwrSeqCmd.c
From: Praveen Jayaprakash Pattar @ 2026-05-24 15:25 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Praveen Jayaprakash Pattar
Fix non-standard block comment format. The comment was using '/*++'
and '--*/' delimiters instead of the standard '/*' and '*/' used in
kernel coding style. Also fix missing '*' prefix on subsequent lines
and remove space before tab characters.
Detected by checkpatch.pl with --strict flag.
Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c | 32 ++++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
index a59505cc4a07..7527ff051865 100644
--- a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
+++ b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
@@ -4,22 +4,22 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-/*++
-Copyright (c) Realtek Semiconductor Corp. All rights reserved.
-
-Module Name:
- HalPwrSeqCmd.c
-
-Abstract:
- Implement HW Power sequence configuration CMD handling routine for Realtek devices.
-
-Major Change History:
- When Who What
- ---------- --------------- -------------------------------
- 2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
- 2011-07-07 Roger Create.
-
---*/
+/*
+ * Copyright (c) Realtek Semiconductor Corp. All rights reserved.
+ *
+ * Module Name:
+ * HalPwrSeqCmd.c
+ *
+ * Abstract:
+ * Implement HW Power sequence configuration CMD handling routine for Realtek devices.
+ *
+ * Major Change History:
+ * When Who What
+ * ---------- --------------- -------------------------------
+ * 2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
+ * 2011-07-07 Roger Create.
+ *
+ */
#include <drv_types.h>
#include <HalPwrSeqCmd.h>
--
2.54.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: rename camelcase variable bAllow
From: Anirban Bose @ 2026-05-24 14:23 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Anirban Bose
Rename the local variable 'bAllow' to 'allow' in rtw_cmd_filter() to fix
a checkpatch CamelCase warning.
Signed-off-by: Anirban Bose <boses156@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index b932670f5d63..aa4a810d8322 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -299,12 +299,12 @@ void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
- u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
+ u8 allow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
- bAllow = true;
+ allow = true;
- if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) ||
+ if ((!pcmdpriv->padapter->hw_init_completed && !allow) ||
!atomic_read(&pcmdpriv->cmdthd_running)) /* com_thread not running */
return _FAIL;
--
2.54.0
^ permalink raw reply related
* Re: [PATCH] staging: sm750fb: Fix CamelCase style issues
From: Ahmet Sezgin Duran @ 2026-05-24 12:12 UTC (permalink / raw)
To: onish-cmd
Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-staging, linux-kernel
In-Reply-To: <20260524115823.8813-1-neharora23587@gmail.com>
On Sun, May 24, 2026 at 05:28:23PM +0530, onish-cmd wrote:
> From: Onish Sharma <neharora23587@gmail.com>
>
> - Rename struct members: powerMode -> power_mode, pvReg -> pv_reg,
> pvMem -> pv_mem, setAllEngOff -> set_all_eng_off,
> resetMemory -> reset_memory.
> - Rename enum members: sm750_24TFT -> SM750_24TFT, etc.
> - Corrected MODULE_PARM_DESC formatting to comply with kernel style.
> - Note: g_fbmode warning intentionally kept to allow runtime assignment.
>
> Signed-off-by: Onish Sharma <neharora23587@gmail.com>
You are doing way too much in a single patch.
Also doesn't apply to staging-testing, your base is probably too old.
Make sure to base it from Greg's latest staging-testing branch.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* [PATCH] staging: sm750fb: Fix CamelCase style issues
From: onish-cmd @ 2026-05-24 11:58 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang
Cc: gregkh, linux-staging, linux-kernel, Onish Sharma
From: Onish Sharma <neharora23587@gmail.com>
- Rename struct members: powerMode -> power_mode, pvReg -> pv_reg,
pvMem -> pv_mem, setAllEngOff -> set_all_eng_off,
resetMemory -> reset_memory.
- Rename enum members: sm750_24TFT -> SM750_24TFT, etc.
- Corrected MODULE_PARM_DESC formatting to comply with kernel style.
- Note: g_fbmode warning intentionally kept to allow runtime assignment.
Signed-off-by: Onish Sharma <neharora23587@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 220 ++++++++++++++---------------
drivers/staging/sm750fb/sm750.h | 74 +++++-----
drivers/staging/sm750fb/sm750_hw.c | 26 ++--
3 files changed, 157 insertions(+), 163 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9f3e3d37e..6dda8ccdb 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 *g_fbmode[] = { NULL, NULL };
static const char *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview;
@@ -41,64 +41,62 @@ static char *g_option;
static const struct fb_videomode lynx750_ext[] = {
/* 1024x600-60 VESA [1.71:1] */
- {NULL, 60, 1024, 600, 20423, 144, 40, 18, 1, 104, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1024, 600, 20423, 144, 40, 18, 1, 104, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1024x600-70 VESA */
- {NULL, 70, 1024, 600, 17211, 152, 48, 21, 1, 104, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 70, 1024, 600, 17211, 152, 48, 21, 1, 104, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1024x600-75 VESA */
- {NULL, 75, 1024, 600, 15822, 160, 56, 23, 1, 104, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 75, 1024, 600, 15822, 160, 56, 23, 1, 104, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1024x600-85 VESA */
- {NULL, 85, 1024, 600, 13730, 168, 56, 26, 1, 112, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 85, 1024, 600, 13730, 168, 56, 26, 1, 112, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 720x480 */
- {NULL, 60, 720, 480, 37427, 88, 16, 13, 1, 72, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 720, 480, 37427, 88, 16, 13, 1, 72, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1280x720 [1.78:1] */
- {NULL, 60, 1280, 720, 13426, 162, 86, 22, 1, 136, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1280, 720, 13426, 162, 86, 22, 1, 136, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1280x768@60 */
- {NULL, 60, 1280, 768, 12579, 192, 64, 20, 3, 128, 7,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1280, 768, 12579, 192, 64, 20, 3, 128, 7,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1360 x 768 [1.77083:1] */
- {NULL, 60, 1360, 768, 11804, 208, 64, 23, 1, 144, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1360, 768, 11804, 208, 64, 23, 1, 144, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1368 x 768 [1.78:1] */
- {NULL, 60, 1368, 768, 11647, 216, 72, 23, 1, 144, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1368, 768, 11647, 216, 72, 23, 1, 144, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1440 x 900 [16:10] */
- {NULL, 60, 1440, 900, 9392, 232, 80, 28, 1, 152, 3,
- FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1440, 900, 9392, 232, 80, 28, 1, 152, 3,
+ FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED },
/* 1440x960 [15:10] */
- {NULL, 60, 1440, 960, 8733, 240, 88, 30, 1, 152, 3,
- FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1440, 960, 8733, 240, 88, 30, 1, 152, 3,
+ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+ FB_VMODE_NONINTERLACED },
/* 1920x1080 [16:9] */
- {NULL, 60, 1920, 1080, 6734, 148, 88, 41, 1, 44, 3,
- FB_SYNC_VERT_HIGH_ACT,
- FB_VMODE_NONINTERLACED},
+ { NULL, 60, 1920, 1080, 6734, 148, 88, 41, 1, 44, 3,
+ FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED },
};
/* no hardware cursor supported under version 2.6.10, kernel bug */
@@ -120,8 +118,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
sm750_hw_cursor_disable(cursor);
if (fbcursor->set & FB_CUR_SETSIZE)
- sm750_hw_cursor_set_size(cursor,
- fbcursor->image.width,
+ sm750_hw_cursor_set_size(cursor, fbcursor->image.width,
fbcursor->image.height);
if (fbcursor->set & FB_CUR_SETPOS)
@@ -134,19 +131,23 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
u16 fg, bg;
fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
- ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
- ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
+ ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >>
+ 5) |
+ ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >>
+ 11);
bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) |
- ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) |
- ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
+ ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >>
+ 5) |
+ ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >>
+ 11);
sm750_hw_cursor_set_color(cursor, fg, bg);
}
if (fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {
- sm750_hw_cursor_set_data(cursor, fbcursor->rop, fbcursor->image.data,
- fbcursor->mask);
+ sm750_hw_cursor_set_data(cursor, fbcursor->rop,
+ fbcursor->image.data, fbcursor->mask);
}
if (fbcursor->enable)
@@ -178,7 +179,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
bpp = info->var.bits_per_pixel >> 3;
color = (bpp == 1) ? region->color :
- ((u32 *)info->pseudo_palette)[region->color];
+ ((u32 *)info->pseudo_palette)[region->color];
rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR : HW_ROP2_COPY;
/*
@@ -189,11 +190,9 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
*/
spin_lock(&sm750_dev->slock);
- sm750_dev->accel.de_fillrect(&sm750_dev->accel,
- base, pitch, bpp,
- region->dx, region->dy,
- region->width, region->height,
- color, rop);
+ sm750_dev->accel.de_fillrect(&sm750_dev->accel, base, pitch, bpp,
+ region->dx, region->dy, region->width,
+ region->height, color, rop);
spin_unlock(&sm750_dev->slock);
}
@@ -223,10 +222,9 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
*/
spin_lock(&sm750_dev->slock);
- sm750_dev->accel.de_copyarea(&sm750_dev->accel,
- base, pitch, region->sx, region->sy,
- base, pitch, bpp, region->dx, region->dy,
- region->width, region->height,
+ sm750_dev->accel.de_copyarea(&sm750_dev->accel, base, pitch, region->sx,
+ region->sy, base, pitch, bpp, region->dx,
+ region->dy, region->width, region->height,
HW_ROP2_COPY);
spin_unlock(&sm750_dev->slock);
}
@@ -272,12 +270,11 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
*/
spin_lock(&sm750_dev->slock);
- sm750_dev->accel.de_imageblit(&sm750_dev->accel,
- image->data, image->width >> 3, 0,
- base, pitch, bpp,
- image->dx, image->dy,
- image->width, image->height,
- fgcol, bgcol, HW_ROP2_COPY);
+ sm750_dev->accel.de_imageblit(&sm750_dev->accel, image->data,
+ image->width >> 3, 0, base, pitch, bpp,
+ image->dx, image->dy, image->width,
+ image->height, fgcol, bgcol,
+ HW_ROP2_COPY);
spin_unlock(&sm750_dev->slock);
}
@@ -385,7 +382,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
var->height = -1;
var->width = -1;
- var->accel_flags = 0;/*FB_ACCELF_TEXT;*/
+ var->accel_flags = 0; /*FB_ACCELF_TEXT;*/
if (ret) {
dev_err(info->device, "bpp %d not supported\n",
@@ -498,7 +495,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
var->height = -1;
var->width = -1;
- var->accel_flags = 0;/* FB_ACCELF_TEXT; */
+ var->accel_flags = 0; /* FB_ACCELF_TEXT; */
/* check if current fb's video memory big enough to hold the onscreen*/
request = var->xres_virtual * (var->bits_per_pixel >> 3);
@@ -514,12 +511,9 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
return hw_sm750_crtc_check_mode(crtc, var);
}
-static int lynxfb_ops_setcolreg(unsigned int regno,
- unsigned int red,
- unsigned int green,
- unsigned int blue,
- unsigned int transp,
- struct fb_info *info)
+static int lynxfb_ops_setcolreg(unsigned int regno, unsigned int red,
+ unsigned int green, unsigned int blue,
+ unsigned int transp, struct fb_info *info)
{
struct lynxfb_par *par;
struct lynxfb_crtc *crtc;
@@ -556,8 +550,7 @@ static int lynxfb_ops_setcolreg(unsigned int regno,
if (info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256) {
u32 val;
- if (var->bits_per_pixel == 16 ||
- var->bits_per_pixel == 32 ||
+ if (var->bits_per_pixel == 16 || var->bits_per_pixel == 32 ||
var->bits_per_pixel == 24) {
val = chan_to_field(red, &var->red);
val |= chan_to_field(green, &var->green);
@@ -616,32 +609,33 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
/* chip specific phase */
sm750_dev->accel.de_wait = (sm750_dev->revid == SM750LE_REVISION_ID) ?
- hw_sm750le_de_wait : hw_sm750_de_wait;
+ hw_sm750le_de_wait :
+ hw_sm750_de_wait;
switch (sm750_dev->dataflow) {
case sm750_simul_pri:
output->paths = sm750_pnc;
crtc->channel = sm750_primary;
crtc->o_screen = 0;
- crtc->v_screen = sm750_dev->pvMem;
+ crtc->v_screen = sm750_dev->pv_mem;
break;
case sm750_simul_sec:
output->paths = sm750_pnc;
crtc->channel = sm750_secondary;
crtc->o_screen = 0;
- crtc->v_screen = sm750_dev->pvMem;
+ crtc->v_screen = sm750_dev->pv_mem;
break;
case sm750_dual_normal:
if (par->index == 0) {
output->paths = sm750_panel;
crtc->channel = sm750_primary;
crtc->o_screen = 0;
- crtc->v_screen = sm750_dev->pvMem;
+ crtc->v_screen = sm750_dev->pv_mem;
} else {
output->paths = sm750_crt;
crtc->channel = sm750_secondary;
/* not consider of padding stuffs for o_screen,need fix */
crtc->o_screen = sm750_dev->vidmem_size >> 1;
- crtc->v_screen = sm750_dev->pvMem + crtc->o_screen;
+ crtc->v_screen = sm750_dev->pv_mem + crtc->o_screen;
}
break;
case sm750_dual_swap:
@@ -649,7 +643,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
output->paths = sm750_panel;
crtc->channel = sm750_secondary;
crtc->o_screen = 0;
- crtc->v_screen = sm750_dev->pvMem;
+ crtc->v_screen = sm750_dev->pv_mem;
} else {
output->paths = sm750_crt;
crtc->channel = sm750_primary;
@@ -657,7 +651,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
* need fix
*/
crtc->o_screen = sm750_dev->vidmem_size >> 1;
- crtc->v_screen = sm750_dev->pvMem + crtc->o_screen;
+ crtc->v_screen = sm750_dev->pv_mem + crtc->o_screen;
}
break;
default:
@@ -670,7 +664,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
static const struct fb_ops lynxfb_ops = {
.owner = THIS_MODULE,
FB_DEFAULT_IOMEM_OPS,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -680,7 +674,7 @@ static const struct fb_ops lynxfb_ops = {
static const struct fb_ops lynxfb_ops_with_cursor = {
.owner = THIS_MODULE,
FB_DEFAULT_IOMEM_OPS,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -691,7 +685,7 @@ static const struct fb_ops lynxfb_ops_with_cursor = {
static const struct fb_ops lynxfb_ops_accel = {
.owner = THIS_MODULE,
__FB_DEFAULT_IOMEM_OPS_RDWR,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -705,7 +699,7 @@ static const struct fb_ops lynxfb_ops_accel = {
static const struct fb_ops lynxfb_ops_accel_with_cursor = {
.owner = THIS_MODULE,
__FB_DEFAULT_IOMEM_OPS_RDWR,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -728,11 +722,14 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
struct fb_fix_screeninfo *fix;
const struct fb_videomode *pdb[] = {
- lynx750_ext, NULL, vesa_modes,
+ lynx750_ext,
+ NULL,
+ vesa_modes,
};
- int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
+ int cdb[] = { ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE };
static const char *fix_id[2] = {
- "sm750_fb1", "sm750_fb2",
+ "sm750_fb1",
+ "sm750_fb2",
};
int ret, line_length;
@@ -755,13 +752,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
* must be set after crtc member initialized
*/
crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
- crtc->cursor.mmio = sm750_dev->pvReg +
- 0x800f0 + (int)crtc->channel * 0x140;
+ crtc->cursor.mmio =
+ sm750_dev->pv_reg + 0x800f0 + (int)crtc->channel * 0x140;
crtc->cursor.max_h = 64;
crtc->cursor.max_w = 64;
crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
- crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
+ crtc->cursor.vstart = sm750_dev->pv_mem + crtc->cursor.offset;
memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
if (!g_hwcursor)
@@ -788,8 +785,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
}
for (i = 0; i < 3; i++) {
- ret = fb_find_mode(var, info, g_fbmode[index],
- pdb[i], cdb[i], NULL, 8);
+ ret = fb_find_mode(var, info, g_fbmode[index], pdb[i], cdb[i],
+ NULL, 8);
if (ret == 1 || ret == 2)
break;
@@ -859,9 +856,9 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
sm750_dev->init_parm.chip_clk = 0;
sm750_dev->init_parm.mem_clk = 0;
sm750_dev->init_parm.master_clk = 0;
- sm750_dev->init_parm.powerMode = 0;
- sm750_dev->init_parm.setAllEngOff = 0;
- sm750_dev->init_parm.resetMemory = 1;
+ sm750_dev->init_parm.power_mode = 0;
+ sm750_dev->init_parm.set_all_eng_off = 0;
+ sm750_dev->init_parm.reset_memory = 1;
/* defaultly turn g_hwcursor on for both view */
g_hwcursor = 3;
@@ -880,11 +877,11 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
} else if (!strncmp(opt, "nocrt", strlen("nocrt"))) {
sm750_dev->nocrt = 1;
} else if (!strncmp(opt, "36bit", strlen("36bit"))) {
- sm750_dev->pnltype = sm750_doubleTFT;
+ sm750_dev->pnltype = SM750_DOUBLE_TFT;
} else if (!strncmp(opt, "18bit", strlen("18bit"))) {
- sm750_dev->pnltype = sm750_dualTFT;
+ sm750_dev->pnltype = SM750_DUAL_TFT;
} else if (!strncmp(opt, "24bit", strlen("24bit"))) {
- sm750_dev->pnltype = sm750_24TFT;
+ sm750_dev->pnltype = SM750_24TFT;
} else if (!strncmp(opt, "nohwc0", strlen("nohwc0"))) {
g_hwcursor &= ~0x1;
} else if (!strncmp(opt, "nohwc1", strlen("nohwc1"))) {
@@ -901,7 +898,8 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
dev_info(&sm750_dev->pdev->dev,
"find fbmode1 : %s\n", g_fbmode[1]);
} else {
- dev_warn(&sm750_dev->pdev->dev, "How many view you wann set?\n");
+ dev_warn(&sm750_dev->pdev->dev,
+ "How many view you wann set?\n");
}
}
}
@@ -1028,7 +1026,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
sm750_dev->mtrr.vram = arch_phys_wc_add(sm750_dev->vidmem_start,
sm750_dev->vidmem_size);
- memset_io(sm750_dev->pvMem, 0, sm750_dev->vidmem_size);
+ memset_io(sm750_dev->pv_mem, 0, sm750_dev->vidmem_size);
pci_set_drvdata(pdev, sm750_dev);
@@ -1059,8 +1057,8 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
sm750fb_framebuffer_release(sm750_dev);
arch_phys_wc_del(sm750_dev->mtrr.vram);
- iounmap(sm750_dev->pvReg);
- iounmap(sm750_dev->pvMem);
+ iounmap(sm750_dev->pv_reg);
+ iounmap(sm750_dev->pv_mem);
pci_release_region(pdev, 1);
kfree(g_settings);
}
@@ -1112,8 +1110,12 @@ static int __init lynxfb_setup(char *options)
}
static const struct pci_device_id smi_pci_table[] = {
- { PCI_DEVICE(0x126f, 0x0750), },
- {0,}
+ {
+ PCI_DEVICE(0x126f, 0x0750),
+ },
+ {
+ 0,
+ }
};
MODULE_DEVICE_TABLE(pci, smi_pci_table);
@@ -1121,11 +1123,11 @@ MODULE_DEVICE_TABLE(pci, smi_pci_table);
static SIMPLE_DEV_PM_OPS(lynxfb_pm_ops, lynxfb_suspend, lynxfb_resume);
static struct pci_driver lynxfb_driver = {
- .name = "sm750fb",
- .id_table = smi_pci_table,
- .probe = lynxfb_pci_probe,
- .remove = lynxfb_pci_remove,
- .driver.pm = &lynxfb_pm_ops,
+ .name = "sm750fb",
+ .id_table = smi_pci_table,
+ .probe = lynxfb_pci_probe,
+ .remove = lynxfb_pci_remove,
+ .driver.pm = &lynxfb_pm_ops,
};
static int __init lynxfb_init(void)
@@ -1162,9 +1164,7 @@ MODULE_PARM_DESC(g_option,
"\t\tdualview:dual frame buffer feature enabled\n"
"\t\tnohwc:disable hardware cursor\n"
"\t\tUsual example:\n"
- "\t\tinsmod ./sm750fb.ko g_option=\"noaccel,nohwc,1280x1024-8@60\"\n"
- );
-
+ "\t\tinsmod ./sm750fb.ko g_option=\"noaccel,nohwc,1280x1024-8@60\"\n");
MODULE_AUTHOR("monk liu <monk.liu@siliconmotion.com>");
MODULE_AUTHOR("Sudip Mukherjee <sudip@vectorindia.org>");
MODULE_DESCRIPTION("Frame buffer driver for SM750 chipset");
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 67b9bfa23..68237d8dc 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -6,24 +6,24 @@
#define MHZ(x) ((x) * 1000000)
-#define DEFAULT_SM750_CHIP_CLOCK 290
-#define DEFAULT_SM750LE_CHIP_CLOCK 333
+#define DEFAULT_SM750_CHIP_CLOCK 290
+#define DEFAULT_SM750LE_CHIP_CLOCK 333
#ifndef SM750LE_REVISION_ID
#define SM750LE_REVISION_ID ((unsigned char)0xfe)
#endif
enum sm750_pnltype {
- sm750_24TFT = 0, /* 24bit tft */
- sm750_dualTFT = 2, /* dual 18 bit tft */
- sm750_doubleTFT = 1, /* 36 bit double pixel tft */
+ SM750_24TFT = 0, /* 24bit tft */
+ SM750_DUAL_TFT = 2, /* dual 18 bit tft */
+ SM750_DOUBLE_TFT = 1, /* 36 bit double pixel tft */
};
/* vga channel is not concerned */
enum sm750_dataflow {
- sm750_simul_pri, /* primary => all head */
- sm750_simul_sec, /* secondary => all head */
- sm750_dual_normal, /* primary => panel head and secondary => crt */
- sm750_dual_swap, /* primary => crt head and secondary => panel */
+ sm750_simul_pri, /* primary => all head */
+ sm750_simul_sec, /* secondary => all head */
+ sm750_dual_normal, /* primary => panel head and secondary => crt */
+ sm750_dual_swap, /* primary => crt head and secondary => panel */
};
enum sm750_channel {
@@ -35,19 +35,18 @@ enum sm750_channel {
enum sm750_path {
sm750_panel = 1,
sm750_crt = 2,
- sm750_pnc = 3, /* panel and crt */
+ sm750_pnc = 3, /* panel and crt */
};
struct init_status {
- ushort powerMode;
+ unsigned short power_mode;
/* below three clocks are in unit of MHZ*/
- ushort chip_clk;
- ushort mem_clk;
- ushort master_clk;
- ushort setAllEngOff;
- ushort resetMemory;
+ unsigned short chip_clk;
+ unsigned short mem_clk;
+ unsigned short master_clk;
+ unsigned short set_all_eng_off;
+ unsigned short reset_memory;
};
-
struct lynx_accel {
/* base virtual address of DPR registers */
unsigned char __iomem *dpr_base;
@@ -57,26 +56,21 @@ struct lynx_accel {
/* function pointers */
void (*de_init)(struct lynx_accel *accel);
- int (*de_wait)(void);/* see if hardware ready to work */
+ int (*de_wait)(void); /* see if hardware ready to work */
- int (*de_fillrect)(struct lynx_accel *accel,
- u32 base, u32 pitch, u32 bpp,
- u32 x, u32 y, u32 width, u32 height,
+ int (*de_fillrect)(struct lynx_accel *accel, u32 base, u32 pitch,
+ u32 bpp, u32 x, u32 y, u32 width, u32 height,
u32 color, u32 rop);
- int (*de_copyarea)(struct lynx_accel *accel,
- u32 s_base, u32 s_pitch,
- u32 sx, u32 sy,
- u32 d_base, u32 d_pitch,
- u32 bpp, u32 dx, u32 dy,
- u32 width, u32 height,
- u32 rop2);
+ int (*de_copyarea)(struct lynx_accel *accel, u32 s_base, u32 s_pitch,
+ u32 sx, u32 sy, u32 d_base, u32 d_pitch, u32 bpp,
+ u32 dx, u32 dy, u32 width, u32 height, u32 rop2);
int (*de_imageblit)(struct lynx_accel *accel, const char *p_srcbuf,
- u32 src_delta, u32 start_bit, u32 d_base, u32 d_pitch,
- u32 byte_per_pixel, u32 dx, u32 dy, u32 width,
- u32 height, u32 f_color, u32 b_color, u32 rop2);
-
+ u32 src_delta, u32 start_bit, u32 d_base,
+ u32 d_pitch, u32 byte_per_pixel, u32 dx, u32 dy,
+ u32 width, u32 height, u32 f_color, u32 b_color,
+ u32 rop2);
};
struct sm750_dev {
@@ -89,7 +83,7 @@ struct sm750_dev {
int accel_off;
int fb_count;
int mtrr_off;
- struct{
+ struct {
int vram;
} mtrr;
/* all smi graphic adaptor got below attributes */
@@ -97,8 +91,8 @@ struct sm750_dev {
unsigned long vidreg_start;
__u32 vidmem_size;
__u32 vidreg_size;
- void __iomem *pvReg;
- unsigned char __iomem *pvMem;
+ void __iomem *pv_reg;
+ unsigned char __iomem *pv_mem;
/* locks*/
spinlock_t slock;
@@ -136,11 +130,11 @@ struct lynxfb_crtc {
unsigned char __iomem *v_screen; /* virtual address of on_screen */
int o_cursor; /* cursor address offset in vidmem */
int o_screen; /* onscreen address offset in vidmem */
- int channel;/* which channel this crtc stands for*/
- resource_size_t vidmem_size;/* this view's video memory max size */
+ int channel; /* which channel this crtc stands for*/
+ resource_size_t vidmem_size; /* this view's video memory max size */
/* below attributes belong to info->fix, their value depends on specific adaptor*/
- u16 line_pad;/* padding information:0,1,2,4,8,16,... */
+ u16 line_pad; /* padding information:0,1,2,4,8,16,... */
u16 xpanstep;
u16 ypanstep;
u16 ywrapstep;
@@ -206,8 +200,8 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
struct fb_var_screeninfo *var,
struct fb_fix_screeninfo *fix);
-int hw_sm750_set_col_reg(struct lynxfb_crtc *crtc, ushort index,
- ushort red, ushort green, ushort blue);
+int hw_sm750_set_col_reg(struct lynxfb_crtc *crtc, ushort index, ushort red,
+ ushort green, ushort blue);
int hw_sm750_set_blank(struct lynxfb_output *output, int blank);
int hw_sm750le_set_blank(struct lynxfb_output *output, int blank);
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index a2798d428..5af1cdcea 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -42,18 +42,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
}
/* now map mmio and vidmem */
- sm750_dev->pvReg =
+ sm750_dev->pv_reg =
ioremap(sm750_dev->vidreg_start, sm750_dev->vidreg_size);
- if (!sm750_dev->pvReg) {
+ if (!sm750_dev->pv_reg) {
dev_err(&pdev->dev, "mmio failed\n");
ret = -EFAULT;
goto err_release_region;
}
- sm750_dev->accel.dpr_base = sm750_dev->pvReg + DE_BASE_ADDR_TYPE1;
- sm750_dev->accel.dp_port_base = sm750_dev->pvReg + DE_PORT_ADDR_TYPE1;
+ sm750_dev->accel.dpr_base = sm750_dev->pv_reg + DE_BASE_ADDR_TYPE1;
+ sm750_dev->accel.dp_port_base = sm750_dev->pv_reg + DE_PORT_ADDR_TYPE1;
- mmio750 = sm750_dev->pvReg;
+ mmio750 = sm750_dev->pv_reg;
sm750_set_chip_type(sm750_dev->devid, sm750_dev->revid);
sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
@@ -66,9 +66,9 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
sm750_dev->vidmem_size = ddk750_get_vm_size();
/* reserve the vidmem space of smi adaptor */
- sm750_dev->pvMem =
+ sm750_dev->pv_mem =
ioremap_wc(sm750_dev->vidmem_start, sm750_dev->vidmem_size);
- if (!sm750_dev->pvMem) {
+ if (!sm750_dev->pv_mem) {
dev_err(&pdev->dev, "Map video memory failed\n");
ret = -EFAULT;
goto err_unmap_reg;
@@ -77,7 +77,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
return 0;
err_unmap_reg:
- iounmap(sm750_dev->pvReg);
+ iounmap(sm750_dev->pv_reg);
err_release_region:
pci_release_region(pdev, 1);
return ret;
@@ -90,8 +90,8 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
parm = &sm750_dev->init_parm;
if (parm->chip_clk == 0)
parm->chip_clk = (sm750_get_chip_type() == SM750LE) ?
- DEFAULT_SM750LE_CHIP_CLOCK :
- DEFAULT_SM750_CHIP_CLOCK;
+ DEFAULT_SM750LE_CHIP_CLOCK :
+ DEFAULT_SM750_CHIP_CLOCK;
if (parm->mem_clk == 0)
parm->mem_clk = parm->chip_clk;
@@ -128,12 +128,12 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
~(PANEL_DISPLAY_CTRL_DUAL_DISPLAY |
PANEL_DISPLAY_CTRL_DOUBLE_PIXEL);
switch (sm750_dev->pnltype) {
- case sm750_24TFT:
+ case SM750_24TFT:
break;
- case sm750_doubleTFT:
+ case SM750_DOUBLE_TFT:
val |= PANEL_DISPLAY_CTRL_DOUBLE_PIXEL;
break;
- case sm750_dualTFT:
+ case SM750_DUAL_TFT:
val |= PANEL_DISPLAY_CTRL_DUAL_DISPLAY;
break;
}
--
2.54.0
^ permalink raw reply related
* Re: [PATCH] staging: rtl8723bs: hal: Remove unnecessary blank line in hal_intf.c
From: Ahmet Sezgin Duran @ 2026-05-24 11:43 UTC (permalink / raw)
To: Praveen Jayaprakash Pattar
Cc: gregkh, straube.linux, linux-staging, linux-kernel
In-Reply-To: <20260524085732.20153-1-praveen.pattar2022@gmail.com>
On Sun, May 24, 2026 at 02:27:32PM +0530, Praveen Jayaprakash Pattar wrote:
> Remove multiple consecutive blank lines that violate kernel coding style.
> Detected by checkpatch.pl with --strict flag.
>
> Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/hal_intf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
> index 27c0c0198714..6b433ac72d14 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_intf.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
> @@ -264,7 +264,6 @@ void beacon_timing_control(struct adapter *padapter)
> rtl8723b_SetBeaconRelatedRegisters(padapter);
> }
>
> -
> s32 rtw_hal_xmit_thread_handler(struct adapter *padapter)
> {
> return rtl8723bs_xmit_buf_handler(padapter);
> --
> 2.54.0
>
Does not apply to staging-testing. Please make sure that you are
creating patches based from Greg's latest staging-testing branch.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* Re: [PATCH] staging: rtl8723bs: hal: Fix block comment style in hal_com_phycfg.c
From: Ahmet Sezgin Duran @ 2026-05-24 11:36 UTC (permalink / raw)
To: Praveen Jayaprakash Pattar
Cc: gregkh, ethantidmore06, linux-staging, linux-kernel
In-Reply-To: <20260524095949.20819-1-praveen.pattar2022@gmail.com>
On Sun, May 24, 2026 at 03:29:49PM +0530, Praveen Jayaprakash Pattar wrote:
> Fix improper block comment alignment where '*' on each line had two
> spaces instead of one before it. Kernel coding style requires a single
> space before '*' on each line of a block comment to align with the
> opening '/*'.
>
> Detected by checkpatch.pl with --strict flag.
>
> Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> index bdd595a99b98..9f513eb92ff8 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> @@ -407,9 +407,9 @@ struct adapter *padapter
> }
>
> /*
> - * This function must be called if the value in the PHY_REG_PG.txt(or header)
> - * is exact dBm values
> - */
> + * This function must be called if the value in the PHY_REG_PG.txt(or header)
> + * is exact dBm values
> + */
> void PHY_TxPowerByRateConfiguration(struct adapter *padapter)
> {
> phy_StoreTxPowerByRateBase(padapter);
> --
> 2.54.0
>
Does not apply to staging-testing.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* [PATCH] staging: rtl8723bs: remove unnecessary braces in odm_HWConfig.c
From: Atharv Margur @ 2026-05-24 11:17 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Atharv Margur
Remove unnecessary braces around a single statement block
to improve readability and conform to kernel coding style.
No functional changes intended.
Signed-off-by: Atharv Margur <atharvmargur@gmail.com>
---
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index c88d669cb..171625264 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -236,9 +236,8 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
if (is_cck_rate) {
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
} else {
- if (rf_rx_num != 0) {
+ if (rf_rx_num != 0)
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
- }
}
}
--
2.53.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: hal: Fix block comment style in hal_com_phycfg.c
From: Praveen Jayaprakash Pattar @ 2026-05-24 9:59 UTC (permalink / raw)
To: gregkh
Cc: ethantidmore06, linux-staging, linux-kernel,
Praveen Jayaprakash Pattar
Fix improper block comment alignment where '*' on each line had two
spaces instead of one before it. Kernel coding style requires a single
space before '*' on each line of a block comment to align with the
opening '/*'.
Detected by checkpatch.pl with --strict flag.
Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index bdd595a99b98..9f513eb92ff8 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -407,9 +407,9 @@ struct adapter *padapter
}
/*
- * This function must be called if the value in the PHY_REG_PG.txt(or header)
- * is exact dBm values
- */
+ * This function must be called if the value in the PHY_REG_PG.txt(or header)
+ * is exact dBm values
+ */
void PHY_TxPowerByRateConfiguration(struct adapter *padapter)
{
phy_StoreTxPowerByRateBase(padapter);
--
2.54.0
^ permalink raw reply related
* Re: [PATCH v7 3/3] staging: rtl8723bs: fix lines ending in parentheses in hal/sdio_halinit.c
From: Dan Carpenter @ 2026-05-24 9:01 UTC (permalink / raw)
To: artur.ugnivenko; +Cc: gregkh, ahmet, linux-kernel, linux-staging
In-Reply-To: <20260522142700.23335-1-artur.ugnivenko@gmx.de>
On Fri, May 22, 2026 at 04:27:00PM +0200, artur.ugnivenko@gmx.de wrote:
> From: Artur Ugnivenko <artur.ugnivenko@gmx.de>
>
> Fix checkpatch warnings on lines that end in patentheses in
> hal/sdio_halinit.c.
>
> In _InitNormalChipRegPriority specifically pack all of the
> queues into a struct, to pass that as one argument instead of
> six individual values, so that those lines can be shortened and
> not end in parentheses.
>
> Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de>
> ---
This is a grab bag of changes.
The new code is CamelCase.
I'm not sure it's really nicer than the old code.
regards,
dan carpenter
^ permalink raw reply
* [PATCH] staging: rtl8723bs: hal: Remove unnecessary blank line in hal_intf.c
From: Praveen Jayaprakash Pattar @ 2026-05-24 8:57 UTC (permalink / raw)
To: gregkh
Cc: straube.linux, linux-staging, linux-kernel,
Praveen Jayaprakash Pattar
Remove multiple consecutive blank lines that violate kernel coding style.
Detected by checkpatch.pl with --strict flag.
Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_intf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 27c0c0198714..6b433ac72d14 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -264,7 +264,6 @@ void beacon_timing_control(struct adapter *padapter)
rtl8723b_SetBeaconRelatedRegisters(padapter);
}
-
s32 rtw_hal_xmit_thread_handler(struct adapter *padapter)
{
return rtl8723bs_xmit_buf_handler(padapter);
--
2.54.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: rename CamelCase variable RxMgmtFrameSeqNum
From: Gianmaria Biselli @ 2026-05-24 3:12 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Gianmaria Biselli
Rename RxMgmtFrameSeqNum to rx_mgmt_frame_seq_num to comply with
kernel coding style.
Found by checkpatch.pl strict.
Signed-off-by: Gianmaria Biselli <gianmariabiselli@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +-
drivers/staging/rtl8723bs/include/sta_info.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index a86d6f97cf02..89f253cc1da6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -454,12 +454,12 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
if (psta) {
if (GetRetry(pframe)) {
- if (precv_frame->u.hdr.attrib.seq_num == psta->RxMgmtFrameSeqNum) {
+ if (precv_frame->u.hdr.attrib.seq_num == psta->rx_mgmt_frame_seq_num) {
/* drop the duplicate management frame */
return;
}
}
- psta->RxMgmtFrameSeqNum = precv_frame->u.hdr.attrib.seq_num;
+ psta->rx_mgmt_frame_seq_num = precv_frame->u.hdr.attrib.seq_num;
}
switch (GetFrameSubType(pframe)) {
diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index a1b7fe843979..ce878c49e2e1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -256,7 +256,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
psta->rssi_stat.UndecoratedSmoothedCCK = (-1);
/* init for the sequence number of received management frame */
- psta->RxMgmtFrameSeqNum = 0xffff;
+ psta->rx_mgmt_frame_seq_num = 0xffff;
spin_unlock_bh(&pstapriv->sta_hash_lock);
/* alloc mac id for non-bc/mc station, */
rtw_alloc_macid(pstapriv->padapter, psta);
diff --git a/drivers/staging/rtl8723bs/include/sta_info.h b/drivers/staging/rtl8723bs/include/sta_info.h
index 63343998266a..0f53e77c110c 100644
--- a/drivers/staging/rtl8723bs/include/sta_info.h
+++ b/drivers/staging/rtl8723bs/include/sta_info.h
@@ -214,7 +214,7 @@ struct sta_info {
/* */
/* To store the sequence number of received management frame */
- u16 RxMgmtFrameSeqNum;
+ u16 rx_mgmt_frame_seq_num;
};
#define sta_rx_pkts(sta) \
--
2.51.0
^ permalink raw reply related
* Re: [PATCH] staging: sm750fb: add const to g_fbmode array
From: kernel test robot @ 2026-05-23 21:26 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez, gregkh, linux-staging
Cc: llvm, oe-kbuild-all, m.steinmoetzger, guojy.bj, straube.linux,
error27, linux-kernel, Diego Fernando Mancera Gómez
In-Reply-To: <20260521210523.133725-2-diegomancera.dev@gmail.com>
Hi Diego,
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/Diego-Fernando-Mancera-G-mez/staging-sm750fb-add-const-to-g_fbmode-array/20260522-050816
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260521210523.133725-2-diegomancera.dev%40gmail.com
patch subject: [PATCH] staging: sm750fb: add const to g_fbmode array
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20260524/202605240543.MkxvjE7m-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260524/202605240543.MkxvjE7m-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/202605240543.MkxvjE7m-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/staging/sm750fb/sm750.c:773:19: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
773 | g_fbmode[index] = g_def_fbmode;
| ~~~~~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:24:27: note: variable 'g_fbmode' declared const here
24 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:775:20: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
775 | g_fbmode[index] = g_fbmode[0];
| ~~~~~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:24:27: note: variable 'g_fbmode' declared const here
24 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:884:17: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
884 | g_fbmode[0] = opt;
| ~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:24:27: note: variable 'g_fbmode' declared const here
24 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/sm750fb/sm750.c:888:17: error: cannot assign to variable 'g_fbmode' with const-qualified type 'const char *const[2]'
888 | g_fbmode[1] = opt;
| ~~~~~~~~~~~ ^
drivers/staging/sm750fb/sm750.c:24:27: note: variable 'g_fbmode' declared const here
24 | static const char * const g_fbmode[] = {NULL, NULL};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +773 drivers/staging/sm750fb/sm750.c
81dee67e215b23f Sudip Mukherjee 2015-03-03 707
81dee67e215b23f Sudip Mukherjee 2015-03-03 708 static int lynxfb_set_fbinfo(struct fb_info *info, int index)
81dee67e215b23f Sudip Mukherjee 2015-03-03 709 {
81dee67e215b23f Sudip Mukherjee 2015-03-03 710 int i;
81dee67e215b23f Sudip Mukherjee 2015-03-03 711 struct lynxfb_par *par;
e359b6a863e19f2 Mike Rapoport 2015-10-26 712 struct sm750_dev *sm750_dev;
81dee67e215b23f Sudip Mukherjee 2015-03-03 713 struct lynxfb_crtc *crtc;
81dee67e215b23f Sudip Mukherjee 2015-03-03 714 struct lynxfb_output *output;
81dee67e215b23f Sudip Mukherjee 2015-03-03 715 struct fb_var_screeninfo *var;
81dee67e215b23f Sudip Mukherjee 2015-03-03 716 struct fb_fix_screeninfo *fix;
81dee67e215b23f Sudip Mukherjee 2015-03-03 717
81dee67e215b23f Sudip Mukherjee 2015-03-03 718 const struct fb_videomode *pdb[] = {
81dee67e215b23f Sudip Mukherjee 2015-03-03 719 lynx750_ext, NULL, vesa_modes,
81dee67e215b23f Sudip Mukherjee 2015-03-03 720 };
81dee67e215b23f Sudip Mukherjee 2015-03-03 721 int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
d0856045f0e9fc9 Hungyu Lin 2026-04-01 722 static const char * const fix_id[2] = {
81dee67e215b23f Sudip Mukherjee 2015-03-03 723 "sm750_fb1", "sm750_fb2",
81dee67e215b23f Sudip Mukherjee 2015-03-03 724 };
81dee67e215b23f Sudip Mukherjee 2015-03-03 725
81dee67e215b23f Sudip Mukherjee 2015-03-03 726 int ret, line_length;
81dee67e215b23f Sudip Mukherjee 2015-03-03 727
81dee67e215b23f Sudip Mukherjee 2015-03-03 728 ret = 0;
81dee67e215b23f Sudip Mukherjee 2015-03-03 729 par = (struct lynxfb_par *)info->par;
e359b6a863e19f2 Mike Rapoport 2015-10-26 730 sm750_dev = par->dev;
81dee67e215b23f Sudip Mukherjee 2015-03-03 731 crtc = &par->crtc;
81dee67e215b23f Sudip Mukherjee 2015-03-03 732 output = &par->output;
81dee67e215b23f Sudip Mukherjee 2015-03-03 733 var = &info->var;
81dee67e215b23f Sudip Mukherjee 2015-03-03 734 fix = &info->fix;
81dee67e215b23f Sudip Mukherjee 2015-03-03 735
81dee67e215b23f Sudip Mukherjee 2015-03-03 736 /* set index */
81dee67e215b23f Sudip Mukherjee 2015-03-03 737 par->index = index;
81dee67e215b23f Sudip Mukherjee 2015-03-03 738 output->channel = &crtc->channel;
81dee67e215b23f Sudip Mukherjee 2015-03-03 739 sm750fb_set_drv(par);
81dee67e215b23f Sudip Mukherjee 2015-03-03 740
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 741 /*
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 742 * set current cursor variable and proc pointer,
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 743 * must be set after crtc member initialized
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 744 */
fdc234d85210d91 Benjamin Philip 2021-07-28 745 crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
e359b6a863e19f2 Mike Rapoport 2015-10-26 746 crtc->cursor.mmio = sm750_dev->pvReg +
e359b6a863e19f2 Mike Rapoport 2015-10-26 747 0x800f0 + (int)crtc->channel * 0x140;
81dee67e215b23f Sudip Mukherjee 2015-03-03 748
cd33da26036ea54 Christopher Carbone 2022-08-23 749 crtc->cursor.max_h = 64;
cd33da26036ea54 Christopher Carbone 2022-08-23 750 crtc->cursor.max_w = 64;
39f9137268ee3df Benjamin Philip 2021-07-26 751 crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
f50b4602fea62fe Jennifer Guo 2026-05-09 752 crtc->cursor.vstart = sm750_dev->vmem + crtc->cursor.offset;
81dee67e215b23f Sudip Mukherjee 2015-03-03 753
3de08a2d14ff8c7 Lorenzo Stoakes 2015-03-20 754 memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
f7c8a046577e09d Thomas Zimmermann 2023-11-27 755 if (!g_hwcursor)
52d0744d751d8f1 Arnd Bergmann 2016-11-09 756 sm750_hw_cursor_disable(&crtc->cursor);
81dee67e215b23f Sudip Mukherjee 2015-03-03 757
81dee67e215b23f Sudip Mukherjee 2015-03-03 758 /* set info->fbops, must be set before fb_find_mode */
e359b6a863e19f2 Mike Rapoport 2015-10-26 759 if (!sm750_dev->accel_off) {
81dee67e215b23f Sudip Mukherjee 2015-03-03 760 /* use 2d acceleration */
f7c8a046577e09d Thomas Zimmermann 2023-11-27 761 if (!g_hwcursor)
f7c8a046577e09d Thomas Zimmermann 2023-11-27 762 info->fbops = &lynxfb_ops_accel;
f7c8a046577e09d Thomas Zimmermann 2023-11-27 763 else
f7c8a046577e09d Thomas Zimmermann 2023-11-27 764 info->fbops = &lynxfb_ops_accel_with_cursor;
f7c8a046577e09d Thomas Zimmermann 2023-11-27 765 } else {
f7c8a046577e09d Thomas Zimmermann 2023-11-27 766 if (!g_hwcursor)
81dee67e215b23f Sudip Mukherjee 2015-03-03 767 info->fbops = &lynxfb_ops;
f7c8a046577e09d Thomas Zimmermann 2023-11-27 768 else
f7c8a046577e09d Thomas Zimmermann 2023-11-27 769 info->fbops = &lynxfb_ops_with_cursor;
f7c8a046577e09d Thomas Zimmermann 2023-11-27 770 }
81dee67e215b23f Sudip Mukherjee 2015-03-03 771
81dee67e215b23f Sudip Mukherjee 2015-03-03 772 if (!g_fbmode[index]) {
81dee67e215b23f Sudip Mukherjee 2015-03-03 @773 g_fbmode[index] = g_def_fbmode;
81dee67e215b23f Sudip Mukherjee 2015-03-03 774 if (index)
81dee67e215b23f Sudip Mukherjee 2015-03-03 775 g_fbmode[index] = g_fbmode[0];
81dee67e215b23f Sudip Mukherjee 2015-03-03 776 }
81dee67e215b23f Sudip Mukherjee 2015-03-03 777
81dee67e215b23f Sudip Mukherjee 2015-03-03 778 for (i = 0; i < 3; i++) {
81dee67e215b23f Sudip Mukherjee 2015-03-03 779 ret = fb_find_mode(var, info, g_fbmode[index],
81dee67e215b23f Sudip Mukherjee 2015-03-03 780 pdb[i], cdb[i], NULL, 8);
81dee67e215b23f Sudip Mukherjee 2015-03-03 781
db7fb3588ab4920 Artem Lytkin 2026-02-23 782 if (ret == 1 || ret == 2)
81dee67e215b23f Sudip Mukherjee 2015-03-03 783 break;
81dee67e215b23f Sudip Mukherjee 2015-03-03 784 }
81dee67e215b23f Sudip Mukherjee 2015-03-03 785
81dee67e215b23f Sudip Mukherjee 2015-03-03 786 /* set par */
81dee67e215b23f Sudip Mukherjee 2015-03-03 787 par->info = info;
81dee67e215b23f Sudip Mukherjee 2015-03-03 788
81dee67e215b23f Sudip Mukherjee 2015-03-03 789 /* set info */
e3a3f9f5123683b Mike Rapoport 2015-10-26 790 line_length = ALIGN((var->xres_virtual * var->bits_per_pixel / 8),
e3a3f9f5123683b Mike Rapoport 2015-10-26 791 crtc->line_pad);
81dee67e215b23f Sudip Mukherjee 2015-03-03 792
81dee67e215b23f Sudip Mukherjee 2015-03-03 793 info->pseudo_palette = &par->pseudo_palette[0];
cc59bde1c920ab6 Benjamin Philip 2021-07-28 794 info->screen_base = crtc->v_screen;
81dee67e215b23f Sudip Mukherjee 2015-03-03 795 info->screen_size = line_length * var->yres_virtual;
81dee67e215b23f Sudip Mukherjee 2015-03-03 796
81dee67e215b23f Sudip Mukherjee 2015-03-03 797 /* set info->fix */
81dee67e215b23f Sudip Mukherjee 2015-03-03 798 fix->type = FB_TYPE_PACKED_PIXELS;
81dee67e215b23f Sudip Mukherjee 2015-03-03 799 fix->type_aux = 0;
81dee67e215b23f Sudip Mukherjee 2015-03-03 800 fix->xpanstep = crtc->xpanstep;
81dee67e215b23f Sudip Mukherjee 2015-03-03 801 fix->ypanstep = crtc->ypanstep;
81dee67e215b23f Sudip Mukherjee 2015-03-03 802 fix->ywrapstep = crtc->ywrapstep;
81dee67e215b23f Sudip Mukherjee 2015-03-03 803 fix->accel = FB_ACCEL_SMI;
81dee67e215b23f Sudip Mukherjee 2015-03-03 804
8c475735085a7db Tim Wassink 2025-12-21 805 strscpy(fix->id, fix_id[index], sizeof(fix->id));
81dee67e215b23f Sudip Mukherjee 2015-03-03 806
fdc234d85210d91 Benjamin Philip 2021-07-28 807 fix->smem_start = crtc->o_screen + sm750_dev->vidmem_start;
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 808 /*
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 809 * according to mmap experiment from user space application,
81dee67e215b23f Sudip Mukherjee 2015-03-03 810 * fix->mmio_len should not larger than virtual size
81dee67e215b23f Sudip Mukherjee 2015-03-03 811 * (xres_virtual x yres_virtual x ByPP)
81dee67e215b23f Sudip Mukherjee 2015-03-03 812 * Below line maybe buggy when user mmap fb dev node and write
81dee67e215b23f Sudip Mukherjee 2015-03-03 813 * data into the bound over virtual size
d11ac7cbcc266c6 Sudip Mukherjee 2015-08-07 814 */
81dee67e215b23f Sudip Mukherjee 2015-03-03 815 fix->smem_len = crtc->vidmem_size;
81dee67e215b23f Sudip Mukherjee 2015-03-03 816 info->screen_size = fix->smem_len;
81dee67e215b23f Sudip Mukherjee 2015-03-03 817 fix->line_length = line_length;
e359b6a863e19f2 Mike Rapoport 2015-10-26 818 fix->mmio_start = sm750_dev->vidreg_start;
e359b6a863e19f2 Mike Rapoport 2015-10-26 819 fix->mmio_len = sm750_dev->vidreg_size;
b610e1193a917f4 Matej Dujava 2020-04-30 820
b610e1193a917f4 Matej Dujava 2020-04-30 821 lynxfb_set_visual_mode(info);
81dee67e215b23f Sudip Mukherjee 2015-03-03 822
81dee67e215b23f Sudip Mukherjee 2015-03-03 823 /* set var */
81dee67e215b23f Sudip Mukherjee 2015-03-03 824 var->activate = FB_ACTIVATE_NOW;
81dee67e215b23f Sudip Mukherjee 2015-03-03 825 var->accel_flags = 0;
81dee67e215b23f Sudip Mukherjee 2015-03-03 826 var->vmode = FB_VMODE_NONINTERLACED;
81dee67e215b23f Sudip Mukherjee 2015-03-03 827
61c507cf652da1b Michel von Czettritz 2015-03-26 828 ret = fb_alloc_cmap(&info->cmap, 256, 0);
61c507cf652da1b Michel von Czettritz 2015-03-26 829 if (ret < 0) {
fbab250eb51d6d6 Artem Lytkin 2026-02-07 830 dev_err(info->device, "Could not allocate memory for cmap.\n");
81dee67e215b23f Sudip Mukherjee 2015-03-03 831 goto exit;
81dee67e215b23f Sudip Mukherjee 2015-03-03 832 }
81dee67e215b23f Sudip Mukherjee 2015-03-03 833
81dee67e215b23f Sudip Mukherjee 2015-03-03 834 exit:
81dee67e215b23f Sudip Mukherjee 2015-03-03 835 lynxfb_ops_check_var(var, info);
81dee67e215b23f Sudip Mukherjee 2015-03-03 836 return ret;
81dee67e215b23f Sudip Mukherjee 2015-03-03 837 }
81dee67e215b23f Sudip Mukherjee 2015-03-03 838
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH] staging: sm750fb: add const to g_fbmode array
From: kernel test robot @ 2026-05-23 20:33 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez, gregkh, linux-staging
Cc: oe-kbuild-all, m.steinmoetzger, guojy.bj, straube.linux, error27,
linux-kernel, Diego Fernando Mancera Gómez
In-Reply-To: <20260521210523.133725-2-diegomancera.dev@gmail.com>
Hi Diego,
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/Diego-Fernando-Mancera-G-mez/staging-sm750fb-add-const-to-g_fbmode-array/20260522-050816
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260521210523.133725-2-diegomancera.dev%40gmail.com
patch subject: [PATCH] staging: sm750fb: add const to g_fbmode array
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260524/202605240427.G89TqT5r-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260524/202605240427.G89TqT5r-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/202605240427.G89TqT5r-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/staging/sm750fb/sm750.c: In function 'lynxfb_set_fbinfo':
>> drivers/staging/sm750fb/sm750.c:773:33: error: assignment of read-only location 'g_fbmode[index]'
773 | g_fbmode[index] = g_def_fbmode;
| ^
drivers/staging/sm750fb/sm750.c:775:41: error: assignment of read-only location 'g_fbmode[index]'
775 | g_fbmode[index] = g_fbmode[0];
| ^
drivers/staging/sm750fb/sm750.c: In function 'sm750fb_setup':
>> drivers/staging/sm750fb/sm750.c:884:45: error: assignment of read-only location 'g_fbmode[0]'
884 | g_fbmode[0] = opt;
| ^
drivers/staging/sm750fb/sm750.c:888:45: error: assignment of read-only location 'g_fbmode[1]'
888 | g_fbmode[1] = opt;
| ^
vim +773 drivers/staging/sm750fb/sm750.c
81dee67e215b23 Sudip Mukherjee 2015-03-03 707
81dee67e215b23 Sudip Mukherjee 2015-03-03 708 static int lynxfb_set_fbinfo(struct fb_info *info, int index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 709 {
81dee67e215b23 Sudip Mukherjee 2015-03-03 710 int i;
81dee67e215b23 Sudip Mukherjee 2015-03-03 711 struct lynxfb_par *par;
e359b6a863e19f Mike Rapoport 2015-10-26 712 struct sm750_dev *sm750_dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 713 struct lynxfb_crtc *crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 714 struct lynxfb_output *output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 715 struct fb_var_screeninfo *var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 716 struct fb_fix_screeninfo *fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 717
81dee67e215b23 Sudip Mukherjee 2015-03-03 718 const struct fb_videomode *pdb[] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 719 lynx750_ext, NULL, vesa_modes,
81dee67e215b23 Sudip Mukherjee 2015-03-03 720 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 721 int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
d0856045f0e9fc Hungyu Lin 2026-04-01 722 static const char * const fix_id[2] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 723 "sm750_fb1", "sm750_fb2",
81dee67e215b23 Sudip Mukherjee 2015-03-03 724 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 725
81dee67e215b23 Sudip Mukherjee 2015-03-03 726 int ret, line_length;
81dee67e215b23 Sudip Mukherjee 2015-03-03 727
81dee67e215b23 Sudip Mukherjee 2015-03-03 728 ret = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 729 par = (struct lynxfb_par *)info->par;
e359b6a863e19f Mike Rapoport 2015-10-26 730 sm750_dev = par->dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 731 crtc = &par->crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 732 output = &par->output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 733 var = &info->var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 734 fix = &info->fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 735
81dee67e215b23 Sudip Mukherjee 2015-03-03 736 /* set index */
81dee67e215b23 Sudip Mukherjee 2015-03-03 737 par->index = index;
81dee67e215b23 Sudip Mukherjee 2015-03-03 738 output->channel = &crtc->channel;
81dee67e215b23 Sudip Mukherjee 2015-03-03 739 sm750fb_set_drv(par);
81dee67e215b23 Sudip Mukherjee 2015-03-03 740
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 741 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 742 * set current cursor variable and proc pointer,
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 743 * must be set after crtc member initialized
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 744 */
fdc234d85210d9 Benjamin Philip 2021-07-28 745 crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
e359b6a863e19f Mike Rapoport 2015-10-26 746 crtc->cursor.mmio = sm750_dev->pvReg +
e359b6a863e19f Mike Rapoport 2015-10-26 747 0x800f0 + (int)crtc->channel * 0x140;
81dee67e215b23 Sudip Mukherjee 2015-03-03 748
cd33da26036ea5 Christopher Carbone 2022-08-23 749 crtc->cursor.max_h = 64;
cd33da26036ea5 Christopher Carbone 2022-08-23 750 crtc->cursor.max_w = 64;
39f9137268ee3d Benjamin Philip 2021-07-26 751 crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
f50b4602fea62f Jennifer Guo 2026-05-09 752 crtc->cursor.vstart = sm750_dev->vmem + crtc->cursor.offset;
81dee67e215b23 Sudip Mukherjee 2015-03-03 753
3de08a2d14ff8c Lorenzo Stoakes 2015-03-20 754 memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
f7c8a046577e09 Thomas Zimmermann 2023-11-27 755 if (!g_hwcursor)
52d0744d751d8f Arnd Bergmann 2016-11-09 756 sm750_hw_cursor_disable(&crtc->cursor);
81dee67e215b23 Sudip Mukherjee 2015-03-03 757
81dee67e215b23 Sudip Mukherjee 2015-03-03 758 /* set info->fbops, must be set before fb_find_mode */
e359b6a863e19f Mike Rapoport 2015-10-26 759 if (!sm750_dev->accel_off) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 760 /* use 2d acceleration */
f7c8a046577e09 Thomas Zimmermann 2023-11-27 761 if (!g_hwcursor)
f7c8a046577e09 Thomas Zimmermann 2023-11-27 762 info->fbops = &lynxfb_ops_accel;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 763 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 764 info->fbops = &lynxfb_ops_accel_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 765 } else {
f7c8a046577e09 Thomas Zimmermann 2023-11-27 766 if (!g_hwcursor)
81dee67e215b23 Sudip Mukherjee 2015-03-03 767 info->fbops = &lynxfb_ops;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 768 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 769 info->fbops = &lynxfb_ops_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 770 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 771
81dee67e215b23 Sudip Mukherjee 2015-03-03 772 if (!g_fbmode[index]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 @773 g_fbmode[index] = g_def_fbmode;
81dee67e215b23 Sudip Mukherjee 2015-03-03 774 if (index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 775 g_fbmode[index] = g_fbmode[0];
81dee67e215b23 Sudip Mukherjee 2015-03-03 776 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 777
81dee67e215b23 Sudip Mukherjee 2015-03-03 778 for (i = 0; i < 3; i++) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 779 ret = fb_find_mode(var, info, g_fbmode[index],
81dee67e215b23 Sudip Mukherjee 2015-03-03 780 pdb[i], cdb[i], NULL, 8);
81dee67e215b23 Sudip Mukherjee 2015-03-03 781
db7fb3588ab492 Artem Lytkin 2026-02-23 782 if (ret == 1 || ret == 2)
81dee67e215b23 Sudip Mukherjee 2015-03-03 783 break;
81dee67e215b23 Sudip Mukherjee 2015-03-03 784 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 785
81dee67e215b23 Sudip Mukherjee 2015-03-03 786 /* set par */
81dee67e215b23 Sudip Mukherjee 2015-03-03 787 par->info = info;
81dee67e215b23 Sudip Mukherjee 2015-03-03 788
81dee67e215b23 Sudip Mukherjee 2015-03-03 789 /* set info */
e3a3f9f5123683 Mike Rapoport 2015-10-26 790 line_length = ALIGN((var->xres_virtual * var->bits_per_pixel / 8),
e3a3f9f5123683 Mike Rapoport 2015-10-26 791 crtc->line_pad);
81dee67e215b23 Sudip Mukherjee 2015-03-03 792
81dee67e215b23 Sudip Mukherjee 2015-03-03 793 info->pseudo_palette = &par->pseudo_palette[0];
cc59bde1c920ab Benjamin Philip 2021-07-28 794 info->screen_base = crtc->v_screen;
81dee67e215b23 Sudip Mukherjee 2015-03-03 795 info->screen_size = line_length * var->yres_virtual;
81dee67e215b23 Sudip Mukherjee 2015-03-03 796
81dee67e215b23 Sudip Mukherjee 2015-03-03 797 /* set info->fix */
81dee67e215b23 Sudip Mukherjee 2015-03-03 798 fix->type = FB_TYPE_PACKED_PIXELS;
81dee67e215b23 Sudip Mukherjee 2015-03-03 799 fix->type_aux = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 800 fix->xpanstep = crtc->xpanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 801 fix->ypanstep = crtc->ypanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 802 fix->ywrapstep = crtc->ywrapstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 803 fix->accel = FB_ACCEL_SMI;
81dee67e215b23 Sudip Mukherjee 2015-03-03 804
8c475735085a7d Tim Wassink 2025-12-21 805 strscpy(fix->id, fix_id[index], sizeof(fix->id));
81dee67e215b23 Sudip Mukherjee 2015-03-03 806
fdc234d85210d9 Benjamin Philip 2021-07-28 807 fix->smem_start = crtc->o_screen + sm750_dev->vidmem_start;
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 808 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 809 * according to mmap experiment from user space application,
81dee67e215b23 Sudip Mukherjee 2015-03-03 810 * fix->mmio_len should not larger than virtual size
81dee67e215b23 Sudip Mukherjee 2015-03-03 811 * (xres_virtual x yres_virtual x ByPP)
81dee67e215b23 Sudip Mukherjee 2015-03-03 812 * Below line maybe buggy when user mmap fb dev node and write
81dee67e215b23 Sudip Mukherjee 2015-03-03 813 * data into the bound over virtual size
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 814 */
81dee67e215b23 Sudip Mukherjee 2015-03-03 815 fix->smem_len = crtc->vidmem_size;
81dee67e215b23 Sudip Mukherjee 2015-03-03 816 info->screen_size = fix->smem_len;
81dee67e215b23 Sudip Mukherjee 2015-03-03 817 fix->line_length = line_length;
e359b6a863e19f Mike Rapoport 2015-10-26 818 fix->mmio_start = sm750_dev->vidreg_start;
e359b6a863e19f Mike Rapoport 2015-10-26 819 fix->mmio_len = sm750_dev->vidreg_size;
b610e1193a917f Matej Dujava 2020-04-30 820
b610e1193a917f Matej Dujava 2020-04-30 821 lynxfb_set_visual_mode(info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 822
81dee67e215b23 Sudip Mukherjee 2015-03-03 823 /* set var */
81dee67e215b23 Sudip Mukherjee 2015-03-03 824 var->activate = FB_ACTIVATE_NOW;
81dee67e215b23 Sudip Mukherjee 2015-03-03 825 var->accel_flags = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 826 var->vmode = FB_VMODE_NONINTERLACED;
81dee67e215b23 Sudip Mukherjee 2015-03-03 827
61c507cf652da1 Michel von Czettritz 2015-03-26 828 ret = fb_alloc_cmap(&info->cmap, 256, 0);
61c507cf652da1 Michel von Czettritz 2015-03-26 829 if (ret < 0) {
fbab250eb51d6d Artem Lytkin 2026-02-07 830 dev_err(info->device, "Could not allocate memory for cmap.\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 831 goto exit;
81dee67e215b23 Sudip Mukherjee 2015-03-03 832 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 833
81dee67e215b23 Sudip Mukherjee 2015-03-03 834 exit:
81dee67e215b23 Sudip Mukherjee 2015-03-03 835 lynxfb_ops_check_var(var, info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 836 return ret;
81dee67e215b23 Sudip Mukherjee 2015-03-03 837 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 838
81dee67e215b23 Sudip Mukherjee 2015-03-03 839 /* chip specific g_option configuration routine */
700591a9adc8b1 Mike Rapoport 2015-10-26 840 static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
81dee67e215b23 Sudip Mukherjee 2015-03-03 841 {
81dee67e215b23 Sudip Mukherjee 2015-03-03 842 char *opt;
81dee67e215b23 Sudip Mukherjee 2015-03-03 843 int swap;
81dee67e215b23 Sudip Mukherjee 2015-03-03 844
81dee67e215b23 Sudip Mukherjee 2015-03-03 845 swap = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 846
cc34db609ff98c Madhumitha Sundar 2026-01-27 847 sm750_dev->init_parm.chip_clk = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 848 sm750_dev->init_parm.mem_clk = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 849 sm750_dev->init_parm.master_clk = 0;
45a337c12624fc Jennifer Guo 2026-05-09 850 sm750_dev->init_parm.power_mode = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 851 sm750_dev->init_parm.setAllEngOff = 0;
45a337c12624fc Jennifer Guo 2026-05-09 852 sm750_dev->init_parm.reset_memory = 1;
81dee67e215b23 Sudip Mukherjee 2015-03-03 853
81dee67e215b23 Sudip Mukherjee 2015-03-03 854 /* defaultly turn g_hwcursor on for both view */
81dee67e215b23 Sudip Mukherjee 2015-03-03 855 g_hwcursor = 3;
81dee67e215b23 Sudip Mukherjee 2015-03-03 856
81dee67e215b23 Sudip Mukherjee 2015-03-03 857 if (!src || !*src) {
c56de0967a658c Elise Lennion 2016-10-31 858 dev_warn(&sm750_dev->pdev->dev, "no specific g_option.\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 859 goto NO_PARAM;
81dee67e215b23 Sudip Mukherjee 2015-03-03 860 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 861
0fa96e39279988 Sudip Mukherjee 2015-03-10 862 while ((opt = strsep(&src, ":")) != NULL && *opt != 0) {
c56de0967a658c Elise Lennion 2016-10-31 863 dev_info(&sm750_dev->pdev->dev, "opt=%s\n", opt);
c56de0967a658c Elise Lennion 2016-10-31 864 dev_info(&sm750_dev->pdev->dev, "src=%s\n", src);
81dee67e215b23 Sudip Mukherjee 2015-03-03 865
144634a6b42146 Katie Dunne 2017-02-19 866 if (!strncmp(opt, "swap", strlen("swap"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 867 swap = 1;
144634a6b42146 Katie Dunne 2017-02-19 868 } else if (!strncmp(opt, "nocrt", strlen("nocrt"))) {
1757d106a9ce8c Mike Rapoport 2015-10-26 869 sm750_dev->nocrt = 1;
144634a6b42146 Katie Dunne 2017-02-19 870 } else if (!strncmp(opt, "36bit", strlen("36bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 871 sm750_dev->pnltype = SM750_DOUBLE_TFT;
144634a6b42146 Katie Dunne 2017-02-19 872 } else if (!strncmp(opt, "18bit", strlen("18bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 873 sm750_dev->pnltype = SM750_DUAL_TFT;
144634a6b42146 Katie Dunne 2017-02-19 874 } else if (!strncmp(opt, "24bit", strlen("24bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 875 sm750_dev->pnltype = SM750_24TFT;
144634a6b42146 Katie Dunne 2017-02-19 876 } else if (!strncmp(opt, "nohwc0", strlen("nohwc0"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 877 g_hwcursor &= ~0x1;
144634a6b42146 Katie Dunne 2017-02-19 878 } else if (!strncmp(opt, "nohwc1", strlen("nohwc1"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 879 g_hwcursor &= ~0x2;
144634a6b42146 Katie Dunne 2017-02-19 880 } else if (!strncmp(opt, "nohwc", strlen("nohwc"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 881 g_hwcursor = 0;
144634a6b42146 Katie Dunne 2017-02-19 882 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 883 if (!g_fbmode[0]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 @884 g_fbmode[0] = opt;
cee9ba1c30d051 Abdul Rauf 2017-01-08 885 dev_info(&sm750_dev->pdev->dev,
cee9ba1c30d051 Abdul Rauf 2017-01-08 886 "find fbmode0 : %s\n", g_fbmode[0]);
81dee67e215b23 Sudip Mukherjee 2015-03-03 887 } else if (!g_fbmode[1]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 888 g_fbmode[1] = opt;
cee9ba1c30d051 Abdul Rauf 2017-01-08 889 dev_info(&sm750_dev->pdev->dev,
cee9ba1c30d051 Abdul Rauf 2017-01-08 890 "find fbmode1 : %s\n", g_fbmode[1]);
81dee67e215b23 Sudip Mukherjee 2015-03-03 891 } else {
c56de0967a658c Elise Lennion 2016-10-31 892 dev_warn(&sm750_dev->pdev->dev, "How many view you wann set?\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 893 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 894 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 895 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 896
81dee67e215b23 Sudip Mukherjee 2015-03-03 897 NO_PARAM:
e359b6a863e19f Mike Rapoport 2015-10-26 898 if (sm750_dev->revid != SM750LE_REVISION_ID) {
a3f92cc94c6126 Mike Rapoport 2016-01-17 899 if (sm750_dev->fb_count > 1) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 900 if (swap)
1757d106a9ce8c Mike Rapoport 2015-10-26 901 sm750_dev->dataflow = sm750_dual_swap;
81dee67e215b23 Sudip Mukherjee 2015-03-03 902 else
1757d106a9ce8c Mike Rapoport 2015-10-26 903 sm750_dev->dataflow = sm750_dual_normal;
81dee67e215b23 Sudip Mukherjee 2015-03-03 904 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 905 if (swap)
1757d106a9ce8c Mike Rapoport 2015-10-26 906 sm750_dev->dataflow = sm750_simul_sec;
81dee67e215b23 Sudip Mukherjee 2015-03-03 907 else
1757d106a9ce8c Mike Rapoport 2015-10-26 908 sm750_dev->dataflow = sm750_simul_pri;
81dee67e215b23 Sudip Mukherjee 2015-03-03 909 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 910 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 911 /* SM750LE only have one crt channel */
1757d106a9ce8c Mike Rapoport 2015-10-26 912 sm750_dev->dataflow = sm750_simul_sec;
81dee67e215b23 Sudip Mukherjee 2015-03-03 913 /* sm750le do not have complex attributes */
1757d106a9ce8c Mike Rapoport 2015-10-26 914 sm750_dev->nocrt = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 915 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 916 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 917
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH] staging: axis-fifo: use stream accessors for FIFO data transfers
From: Pramod Maurya @ 2026-05-23 19:40 UTC (permalink / raw)
To: gregkh
Cc: jacobsfeder, ovidiu.panait.oss, gustavopiazdasilva2102,
linux-staging, linux-kernel, Pramod Maurya
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jacob Feder <jacobsfeder@gmail.com>
Cc: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Cc: Gustavo Piaz da Silva <gustavopiazdasilva2102@gmail.com>
Cc: linux-staging@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
The driver uses iowrite32()/ioread32() to transfer payload data to and
from the transmit (XLLF_TDFD_OFFSET) and receive (XLLF_RDFD_OFFSET)
data FIFOs. On big-endian architectures iowrite32() maps to writel()
and ioread32() maps to readl(), both of which perform CPU-to-device
byte-swapping. For AXI-Stream FIFOs, which carry opaque byte streams,
this byte-swapping silently corrupts the payload.
Replace the per-word iowrite32()/ioread32() loops with writesl()/readsl(),
which transfer data without byte-swapping, preserving memory byte order
as required by AXI-Stream FIFO semantics.
Also convert the err_flush_rx drain loop to use batched readsl() with
min_t(unsigned int, ...) to match the types of words_available and
READ_BUF_SIZE, reusing the existing local variable copy.
Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 1c34de020cf8..38e4a691b6dc 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -125,7 +125,6 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
unsigned int words_available;
unsigned int copied;
unsigned int copy;
- unsigned int i;
int ret;
u32 tmp_buf[READ_BUF_SIZE];
@@ -167,10 +166,7 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
while (words_available > 0) {
copy = min(words_available, READ_BUF_SIZE);
- for (i = 0; i < copy; i++) {
- tmp_buf[i] = ioread32(fifo->base_addr +
- XLLF_RDFD_OFFSET);
- }
+ readsl(fifo->base_addr + XLLF_RDFD_OFFSET, tmp_buf, copy);
words_available -= copy;
if (copy_to_user(buf + copied * sizeof(u32), tmp_buf,
@@ -186,8 +182,11 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
return bytes_available;
err_flush_rx:
- while (words_available--)
- ioread32(fifo->base_addr + XLLF_RDFD_OFFSET);
+ while (words_available > 0) {
+ copy = min_t(unsigned int, words_available, READ_BUF_SIZE);
+ readsl(fifo->base_addr + XLLF_RDFD_OFFSET, tmp_buf, copy);
+ words_available -= copy;
+ }
end_unlock:
mutex_unlock(&fifo->read_lock);
@@ -258,8 +257,7 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
goto end_unlock;
}
- for (int i = 0; i < words_to_write; ++i)
- iowrite32(txbuf[i], fifo->base_addr + XLLF_TDFD_OFFSET);
+ writesl(fifo->base_addr + XLLF_TDFD_OFFSET, txbuf, words_to_write);
iowrite32(len, fifo->base_addr + XLLF_TLR_OFFSET);
--
2.52.0
^ permalink raw reply related
* [PATCH] staging: axis-fifo: Fix alignment of wait_event_interruptible arguments
From: Pramod Maurya @ 2026-05-23 19:38 UTC (permalink / raw)
To: gregkh
Cc: ovidiu.panait.oss, gustavopiazdasilva2102, linux-staging,
linux-kernel, Pramod Maurya
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Cc: Gustavo Piaz da Silva <gustavopiazdasilva2102@gmail.com>
Cc: linux-staging@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
The second argument to wait_event_interruptible() was indented with a
single tab instead of being aligned to the opening parenthesis. Since
the fully-aligned form exceeds 80 columns, break the condition at the
comparison operator and align the continuation line to the opening
parenthesis.
Fixes the following checkpatch.pl warning:
CHECK: Alignment should match open parenthesis
Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 3aa2aa870ea9..1c34de020cf8 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -246,7 +246,8 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
mutex_lock(&fifo->write_lock);
ret = wait_event_interruptible(fifo->write_queue,
- ioread32(fifo->base_addr + XLLF_TDFV_OFFSET) >= words_to_write);
+ ioread32(fifo->base_addr + XLLF_TDFV_OFFSET) >=
+ words_to_write);
if (ret)
goto end_unlock;
}
--
2.52.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: add missing spaces around '*' operator
From: Mohammed Momin @ 2026-05-23 17:19 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Mohammed Momin
Adhere to the Linux kernel coding style by adding missing spaces
around the '*' binary operator in the init_channel_set function.
This resolves a checkpatch warning and improves code readability.
Signed-off-by: Mohammed Momin <linuxmomin0@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 5f00fe282d1b..b821a3a1d552 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -326,7 +326,7 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
u8 b2_4GBand = false;
u8 Index2G = 0;
- memset(channel_set, 0, sizeof(struct rt_channel_info)*MAX_CHANNEL_NUM);
+ memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM);
if (ChannelPlan >= RT_CHANNEL_DOMAIN_MAX && ChannelPlan != RT_CHANNEL_DOMAIN_REALTEK_DEFINE)
return chanset_size;
--
2.54.0
^ permalink raw reply related
* Re: [PATCH v7] staging: rtl8723bs: fix remote heap info disclosure and OOB reads
From: Luka Gejak @ 2026-05-23 16:32 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, stable, luka.gejak
In-Reply-To: <2026052313-magnetism-platinum-7ee6@gregkh>
Hi Greg,
On May 23, 2026 3:44:58 PM GMT+02:00, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>On Sat, May 23, 2026 at 03:13:31PM +0200, luka.gejak@linux.dev wrote:
>> From: Luka Gejak <luka.gejak@linux.dev>
...
>> Also fix three additional issues discovered during review:
>> - Missing free of pmgntframe and its xmitbuf before jumping to exit
>> in the WLAN_EID_VENDOR_SPECIFIC lower-bound checks.
>> - In is_ap_in_tkip(), add missing lower-bound checks for the RSN and
>> vendor-specific IE data accesses (pre-existing bug).
>> - Move rtw_buf_update() before dump_mgntframe() to avoid a potential
>> use-after-free of pwlanhdr, which points into the mgmt frame buffer
>> (pre-existing bug).
>
>When you say "also" that implies you need to break this patch up into
>smaller pieces, right? Please do so.
>
Well, I just addressed sashiko comments on my patch, so I thought to
keep it one patch as it was review of if.
>>
>> Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
>> ---
>> Changes in v7:
>> - Address new sashiko comments.
>>
>
>That does not say _what_ you did, only that you did _something_. Please
>be more specific.
"Also" part is what was changed due to sashiko's request. Should I
move it here, provide link to sashiko or write it here completely.
>
>thanks,
>
>greg k-h
Best regards,
Luka Gejak
^ permalink raw reply
* [PATCH v2 1/1] staging: rtl8723bs: Fix line over 100 chars in xmit_linux.c
From: Pramod Maurya @ 2026-05-23 16:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Andy Shevchenko, linux-staging, linux-kernel, Pramod Maurya
Wrap the long function signature of rtw_os_xmit_resource_free to
comply with the 100 column line length limit reported by checkpatch.pl.
Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index d5bb1c7932fc..cb053af6b893 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -46,7 +46,9 @@ signed int rtw_endofpktfile(struct pkt_file *pfile)
return false;
}
-void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag)
+void rtw_os_xmit_resource_free(struct adapter *padapter,
+ struct xmit_buf *pxmitbuf,
+ u32 free_sz, u8 flag)
{
if (free_sz > 0)
kfree(pxmitbuf->pallocated_buf);
--
2.52.0
^ permalink raw reply related
* Re: [PATCH 4/5] staging: sm750fb: use ARRAY_SIZE macro in fb_find_mode loop
From: David Laight @ 2026-05-23 16:26 UTC (permalink / raw)
To: Dan Carpenter
Cc: Ahmet Sezgin Duran, gregkh, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <ahF8dacOkX0tdxGf@stanley.mountain>
On Sat, 23 May 2026 13:07:49 +0300
Dan Carpenter <error27@gmail.com> wrote:
> On Sat, May 23, 2026 at 05:15:08AM +0000, Ahmet Sezgin Duran wrote:
> > The loop in lynxfb_set_fbinfo() iterates over pdb[] and cdb[] using
> > a hardcoded bound of 3.
> >
> > Replace it with ARRAY_SIZE(pdb) so the bound tracks the array.
>
> I don't love this. As you mentioned, there are two arrays and they
> both have 3 elements. Why prefer one over the other? This patch
> makes the code look simpler than it really is. I would just leave
> it as 3.
Or change the code to have one array of a struct that contains the ptr:count
pair and iterate over that.
Both pdb[] and cdb[] (or what replaces them) should (probably) be static.
This interface is strange, the NULL:0 requests the modes from xfree86
(which aren't visible) whereas the vesa modes that are defined just
after them have to be requested by ptr:count,
-- David
>
> regards,
> dan carpenter
>
>
^ permalink raw reply
* [PATCH v2 4/4] staging: sm750fb: deduplicate fbinfo loop in suspend/resume
From: Ahmet Sezgin Duran @ 2026-05-23 15:34 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260523153459.177488-1-ahmet@sezginduran.net>
lynxfb_suspend() and lynxfb_resume() both walk sm750_dev->fbinfo[]
via duplicated per-index blocks for fbinfo[0] and fbinfo[1].
Replace each pair of blocks with a for-loop bounded by
sm750_dev->fb_count, the number of successfully registered
framebuffers.
No functional changes intended.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v2: No changes.
drivers/staging/sm750fb/sm750.c | 34 +++++++++++++--------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index fff9c35ee7b0..12703fc4bf0c 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -388,18 +388,18 @@ static int __maybe_unused lynxfb_suspend(struct device *dev)
{
struct fb_info *info;
struct sm750_dev *sm750_dev;
+ int i;
sm750_dev = dev_get_drvdata(dev);
console_lock();
- info = sm750_dev->fbinfo[0];
- if (info)
- /* 1 means do suspend */
- fb_set_suspend(info, 1);
- info = sm750_dev->fbinfo[1];
- if (info)
- /* 1 means do suspend */
- fb_set_suspend(info, 1);
+
+ for (i = 0; i < sm750_dev->fb_count; i++) {
+ info = sm750_dev->fbinfo[i];
+ if (info)
+ /* 1 means do suspend */
+ fb_set_suspend(info, 1);
+ }
console_unlock();
return 0;
@@ -414,6 +414,7 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
struct lynxfb_par *par;
struct lynxfb_crtc *crtc;
struct lynx_cursor *cursor;
+ int i;
sm750_dev = pci_get_drvdata(pdev);
@@ -421,21 +422,12 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
hw_sm750_inithw(sm750_dev, pdev);
- info = sm750_dev->fbinfo[0];
-
- if (info) {
- par = info->par;
- crtc = &par->crtc;
- cursor = &crtc->cursor;
- memset_io(cursor->vstart, 0x0, cursor->size);
- memset_io(crtc->v_screen, 0x0, crtc->vidmem_size);
- lynxfb_ops_set_par(info);
- fb_set_suspend(info, 0);
- }
+ for (i = 0; i < sm750_dev->fb_count; i++) {
+ info = sm750_dev->fbinfo[i];
- info = sm750_dev->fbinfo[1];
+ if (!info)
+ continue;
- if (info) {
par = info->par;
crtc = &par->crtc;
cursor = &crtc->cursor;
--
2.53.0
^ permalink raw reply related
* [PATCH v2 3/4] staging: sm750fb: remove unused struct fields
From: Ahmet Sezgin Duran @ 2026-05-23 15:34 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260523153459.177488-1-ahmet@sezginduran.net>
Remove `void *priv` pointer field in following struct definitions:
- `struct lynxfb_crtc`
- `struct lynxfb_output`
Verified that no other code references them.
No functional changes.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v2: No changes.
drivers/staging/sm750fb/sm750.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index d2c522e67f26..56d7e1fa4557 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -145,8 +145,6 @@ struct lynxfb_crtc {
u16 ypanstep;
u16 ywrapstep;
- void *priv;
-
/* cursor information */
struct lynx_cursor cursor;
};
@@ -168,7 +166,6 @@ struct lynxfb_output {
* *channel=1 means secondary channel
* output->channel ==> &crtc->channel
*/
- void *priv;
};
struct lynxfb_par {
--
2.53.0
^ permalink raw reply related
* [PATCH v2 2/4] staging: sm750fb: remove unnecessary initializations
From: Ahmet Sezgin Duran @ 2026-05-23 15:34 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260523153459.177488-1-ahmet@sezginduran.net>
Remove two instances of `ret = 0` initializations since the
variable is overridden unconditionally before being used.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v2: No changes.
drivers/staging/sm750fb/sm750.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 02db1418476b..fff9c35ee7b0 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -343,7 +343,6 @@ static int lynxfb_ops_set_par(struct fb_info *info)
if (!info)
return -EINVAL;
- ret = 0;
par = info->par;
crtc = &par->crtc;
output = &par->output;
@@ -463,7 +462,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
if (!var->pixclock)
return -EINVAL;
- ret = 0;
par = info->par;
crtc = &par->crtc;
--
2.53.0
^ permalink raw reply related
* [PATCH v2 0/4] staging: sm750fb: various code cleanups
From: Ahmet Sezgin Duran @ 2026-05-23 15:34 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
This series performs several cleanups on the sm750fb staging driver
to improve code readability and remove redundancy.
The changes include:
- Removing a block of commented-out forward declarations.
- Removing redundant variable initializations.
- Removing unused struct fields.
- Deduplicating per-index fbinfo handling in suspend/resume using
a loop.
No functional changes are intended.
Changes since v1:
- Dropped "staging: sm750fb: use ARRAY_SIZE macro in fb_find_mode
loop" per Dan Carpenter's review.
Link: <https://lore.kernel.org/linux-staging/ahF8dacOkX0tdxGf@stanley.mountain/>
v1: <https://lore.kernel.org/all/20260523051509.166152-1-ahmet@sezginduran.net>
Ahmet Sezgin Duran (4):
staging: sm750fb: remove commented-out forward declarations
staging: sm750fb: remove unnecessary initializations
staging: sm750fb: remove unused struct fields
staging: sm750fb: deduplicate fbinfo loop in suspend/resume
drivers/staging/sm750fb/sm750.c | 45 ++++++++++-----------------------
drivers/staging/sm750fb/sm750.h | 3 ---
2 files changed, 13 insertions(+), 35 deletions(-)
base-commit: 7cb1c5b32a2bfde961fff8d5204526b609bcb30a
--
2.53.0
^ permalink raw reply
* [PATCH v2 1/4] staging: sm750fb: remove commented-out forward declarations
From: Ahmet Sezgin Duran @ 2026-05-23 15:34 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260523153459.177488-1-ahmet@sezginduran.net>
The block at the top of sm750.c declares lynxfb_ops_write() and
lynxfb_ops_read() inside a commented-out #ifdef __BIG_ENDIAN guard.
Neither function is defined anywhere in the driver, so the block
is dead. Remove it.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v2: No changes.
drivers/staging/sm750fb/sm750.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 89c811e0806c..02db1418476b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -8,15 +8,6 @@
#include "sm750_accel.h"
#include "sm750_cursor.h"
-/*
- * #ifdef __BIG_ENDIAN
- * ssize_t lynxfb_ops_write(struct fb_info *info, const char __user *buf,
- * size_t count, loff_t *ppos);
- * ssize_t lynxfb_ops_read(struct fb_info *info, char __user *buf,
- * size_t count, loff_t *ppos);
- * #endif
- */
-
/* common var for all device */
static int g_hwcursor = 1;
static int g_noaccel __ro_after_init;
--
2.53.0
^ permalink raw reply related
* Re: [PATCH 4/5] staging: sm750fb: use ARRAY_SIZE macro in fb_find_mode loop
From: Ahmet Sezgin Duran @ 2026-05-23 15:06 UTC (permalink / raw)
To: Dan Carpenter; +Cc: gregkh, linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <ahF8dacOkX0tdxGf@stanley.mountain>
On 5/23/26 1:07 PM, Dan Carpenter wrote:
> I don't love this. As you mentioned, there are two arrays and they
> both have 3 elements. Why prefer one over the other? This patch
> makes the code look simpler than it really is. I would just leave
> it as 3.
>
> regards,
> dan carpenter
>
Fair. Going to drop that and send v2.
Thanks for the review.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox