* [PATCH 0/3] staging: sm750fb: remove dead code and redundant definitions
@ 2026-11-19 14:06 Jiaqi Shi
2026-11-19 14:06 ` [PATCH 1/3] staging: sm750fb: remove unused MHZ macro Jiaqi Shi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiaqi Shi @ 2026-11-19 14:06 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Jiaqi Shi
This series addresses part of the cleanup item in the sm750fb TODO by
removing dead code and a redundant definition:
- an unused MHZ macro;
- struct fields that are never read;
- a duplicate SM750LE_REVISION_ID definition.
Each patch was build-tested with W=1 on arm64. Sparse checks were run
without warnings. No hardware runtime testing was performed.
Jiaqi Shi (3):
staging: sm750fb: remove unused MHZ macro
staging: sm750fb: remove more unused struct fields
staging: sm750fb: remove duplicate SM750LE_REVISION_ID definition
drivers/staging/sm750fb/ddk750_mode.h | 2 --
drivers/staging/sm750fb/sm750.c | 2 --
drivers/staging/sm750fb/sm750.h | 15 ---------------
3 files changed, 19 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/3] staging: sm750fb: remove unused MHZ macro 2026-11-19 14:06 [PATCH 0/3] staging: sm750fb: remove dead code and redundant definitions Jiaqi Shi @ 2026-11-19 14:06 ` Jiaqi Shi 2026-11-19 14:06 ` [PATCH 2/3] staging: sm750fb: remove more unused struct fields Jiaqi Shi 2026-11-19 14:06 ` [PATCH 3/3] staging: sm750fb: remove duplicate SM750LE_REVISION_ID definition Jiaqi Shi 2 siblings, 0 replies; 4+ messages in thread From: Jiaqi Shi @ 2026-11-19 14:06 UTC (permalink / raw) To: sudipm.mukherjee, teddy.wang, gregkh Cc: linux-fbdev, linux-staging, linux-kernel, Jiaqi Shi The MHZ(x) macro has no users in the driver. Remove it. Signed-off-by: Jiaqi Shi <shijiaqi_develop@163.com> --- drivers/staging/sm750fb/sm750.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index fd1cf9eb5797..7511fab2e0e3 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -5,8 +5,6 @@ #define FB_ACCEL_SMI 0xab -#define MHZ(x) ((x) * 1000000) - #define DEFAULT_SM750_CHIP_CLOCK 290 #define DEFAULT_SM750LE_CHIP_CLOCK 333 #ifndef SM750LE_REVISION_ID -- 2.53.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: sm750fb: remove more unused struct fields 2026-11-19 14:06 [PATCH 0/3] staging: sm750fb: remove dead code and redundant definitions Jiaqi Shi 2026-11-19 14:06 ` [PATCH 1/3] staging: sm750fb: remove unused MHZ macro Jiaqi Shi @ 2026-11-19 14:06 ` Jiaqi Shi 2026-11-19 14:06 ` [PATCH 3/3] staging: sm750fb: remove duplicate SM750LE_REVISION_ID definition Jiaqi Shi 2 siblings, 0 replies; 4+ messages in thread From: Jiaqi Shi @ 2026-11-19 14:06 UTC (permalink / raw) To: sudipm.mukherjee, teddy.wang, gregkh Cc: linux-fbdev, linux-staging, linux-kernel, Jiaqi Shi The hw_cursor, o_cursor, dpms, horizontal_frequency and vertical_frequency fields are never read. Remove them and the only assignment to hw_cursor. Signed-off-by: Jiaqi Shi <shijiaqi_develop@163.com> --- drivers/staging/sm750fb/ddk750_mode.h | 2 -- drivers/staging/sm750fb/sm750.c | 2 -- drivers/staging/sm750fb/sm750.h | 10 ---------- 3 files changed, 14 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.h b/drivers/staging/sm750fb/ddk750_mode.h index 1b70885f85e5..f52f893c6a6d 100644 --- a/drivers/staging/sm750fb/ddk750_mode.h +++ b/drivers/staging/sm750fb/ddk750_mode.h @@ -26,8 +26,6 @@ struct mode_parameter { /* Refresh timing. */ unsigned long pixel_clock; - unsigned long horizontal_frequency; - unsigned long vertical_frequency; /* Clock Phase. This clock phase only applies to Panel. */ enum spolarity clock_phase_polarity; diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 21e310274330..99d410e184bd 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -584,8 +584,6 @@ static int sm750fb_set_drv(struct lynxfb_par *par) crtc->vidmem_size >>= 1; /* setup crtc and output member */ - sm750_dev->hw_cursor = g_hwcursor; - crtc->line_pad = 16; crtc->xpanstep = 8; crtc->ypanstep = 1; diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 7511fab2e0e3..ea8f445b5fd4 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -95,14 +95,6 @@ struct sm750_dev { enum sm750_pnltype pnltype; enum sm750_dataflow dataflow; int nocrt; - - /* - * 0: no hardware cursor - * 1: primary crtc hw cursor enabled, - * 2: secondary crtc hw cursor enabled - * 3: both ctrc hw cursor enabled - */ - int hw_cursor; }; struct lynx_cursor { @@ -123,7 +115,6 @@ struct lynx_cursor { struct lynxfb_crtc { unsigned char __iomem *v_cursor; /* virtual address of cursor */ 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 */ @@ -139,7 +130,6 @@ struct lynxfb_crtc { }; struct lynxfb_output { - int dpms; int paths; /* * which paths(s) this output stands for,for sm750: -- 2.53.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: sm750fb: remove duplicate SM750LE_REVISION_ID definition 2026-11-19 14:06 [PATCH 0/3] staging: sm750fb: remove dead code and redundant definitions Jiaqi Shi 2026-11-19 14:06 ` [PATCH 1/3] staging: sm750fb: remove unused MHZ macro Jiaqi Shi 2026-11-19 14:06 ` [PATCH 2/3] staging: sm750fb: remove more unused struct fields Jiaqi Shi @ 2026-11-19 14:06 ` Jiaqi Shi 2 siblings, 0 replies; 4+ messages in thread From: Jiaqi Shi @ 2026-11-19 14:06 UTC (permalink / raw) To: sudipm.mukherjee, teddy.wang, gregkh Cc: linux-fbdev, linux-staging, linux-kernel, Jiaqi Shi sm750.h includes ddk750_chip.h, which already defines SM750LE_REVISION_ID. Remove the redundant conditional definition from sm750.h. Signed-off-by: Jiaqi Shi <shijiaqi_develop@163.com> --- 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 ea8f445b5fd4..32f58bd7b547 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -7,9 +7,6 @@ #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 */ -- 2.53.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-19 14:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-11-19 14:06 [PATCH 0/3] staging: sm750fb: remove dead code and redundant definitions Jiaqi Shi 2026-11-19 14:06 ` [PATCH 1/3] staging: sm750fb: remove unused MHZ macro Jiaqi Shi 2026-11-19 14:06 ` [PATCH 2/3] staging: sm750fb: remove more unused struct fields Jiaqi Shi 2026-11-19 14:06 ` [PATCH 3/3] staging: sm750fb: remove duplicate SM750LE_REVISION_ID definition Jiaqi Shi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®