Skip to contentSkip to conversation

video: fbdev: controlfb: Remove the unused function VAR_MATCH()

PATCH Applied Jiapeng Chong 2 participants 6 messages Sep 14, 2022 – Sep 25, 2022 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fbdev: controlfb: Remove the unused function VAR_MATCH()

The function VAR_MATCH is defined in the controlfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/controlfb.c:111:19: warning: unused function 'VAR_MATCH'.

---
 drivers/video/fbdev/controlfb.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/video/fbdev/controlfb.c +0 -7
index aba46118b208..6bbcd9fc864e 100644
@@ -108,13 +108,6 @@ static inline int PAR_EQUAL(struct fb_par_control *x, struct fb_par_control *y)
 	return (!DIRTY(cmode) && !DIRTY(xres) && !DIRTY(yres)
 		&& !DIRTY(vxres) && !DIRTY(vyres));
 }
-static inline int VAR_MATCH(struct fb_var_screeninfo *x, struct fb_var_screeninfo *y)
-{
-	return (!DIRTY(bits_per_pixel) && !DIRTY(xres)
-		&& !DIRTY(yres) && !DIRTY(xres_virtual)
-		&& !DIRTY(yres_virtual)
-		&& !DIRTY_CMAP(red) && !DIRTY_CMAP(green) && !DIRTY_CMAP(blue));
-}
 
 struct fb_info_control {
 	struct fb_info		info;
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

PATCH 1/1 video: fbdev: tridentfb: Remove the unused function shadowmode_off()

The function shadowmode_off() is defined in the tridentfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/tridentfb.c:1131:20: warning: unused function 'shadowmode_off'.

---
 drivers/video/fbdev/tridentfb.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/video/fbdev/tridentfb.c +0 -5
index f9c3b1d38fc2..2154dd5e37bd 100644
@@ -1128,11 +1128,6 @@ static inline void shadowmode_on(struct tridentfb_par *par)
 	write3CE(par, CyberControl, read3CE(par, CyberControl) | 0x81);
 }
 
-static inline void shadowmode_off(struct tridentfb_par *par)
-{
-	write3CE(par, CyberControl, read3CE(par, CyberControl) & 0x7E);
-}
-
 /* Set the hardware to the requested video mode */
 static int tridentfb_set_par(struct fb_info *info)
 {
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#2 lore raw

Re: [PATCH] video: fbdev: tridentfb: Remove the unused function shadowmode_off()

Quoted 8 lines · Jiapeng Chong

The function shadowmode_off() is defined in the tridentfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/tridentfb.c:1131:20: warning: unused function 'shadowmode_off'.

applied.

Thanks,
Helge

Quoted 20 lines
---
  drivers/video/fbdev/tridentfb.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/video/fbdev/tridentfb.c +0 -5
index f9c3b1d38fc2..2154dd5e37bd 100644
@@ -1128,11 +1128,6 @@ static inline void shadowmode_on(struct tridentfb_par *par)
  	write3CE(par, CyberControl, read3CE(par, CyberControl) | 0x81);
  }
 
-static inline void shadowmode_off(struct tridentfb_par *par)
-{
-	write3CE(par, CyberControl, read3CE(par, CyberControl) & 0x7E);
-}
-
  /* Set the hardware to the requested video mode */
  static int tridentfb_set_par(struct fb_info *info)
  {
#3 lore raw

PATCH 1/1 video: fbdev: arkfb: Remove the unused function dac_read_reg()

In reply to Jiapeng Chong

The function dac_read_reg() is defined in the arkfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/arkfb.c:322:18: warning: unused function 'dac_read_reg'.

---
 drivers/video/fbdev/arkfb.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/video/fbdev/arkfb.c +0 -8
index a317d9fe1d67..5f8fec9e5fd4 100644
@@ -318,14 +318,6 @@ struct dac_info
 	void *data;
 };
 
-
-static inline u8 dac_read_reg(struct dac_info *info, u8 reg)
-{
-	u8 code[2] = {reg, 0};
-	info->dac_read_regs(info->data, code, 1);
-	return code[1];
-}
-
 static inline void dac_read_regs(struct dac_info *info, u8 *code, int count)
 {
 	info->dac_read_regs(info->data, code, count);
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#4 lore raw

Re: [PATCH] video: fbdev: arkfb: Remove the unused function dac_read_reg()

Quoted 8 lines · Jiapeng Chong

The function dac_read_reg() is defined in the arkfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/arkfb.c:322:18: warning: unused function 'dac_read_reg'.

applied.

Thanks,
Helge

Quoted 23 lines
---
  drivers/video/fbdev/arkfb.c | 8 --------
  1 file changed, 8 deletions(-)
drivers/video/fbdev/arkfb.c +0 -8
index a317d9fe1d67..5f8fec9e5fd4 100644
@@ -318,14 +318,6 @@ struct dac_info
  	void *data;
  };
 
-
-static inline u8 dac_read_reg(struct dac_info *info, u8 reg)
-{
-	u8 code[2] = {reg, 0};
-	info->dac_read_regs(info->data, code, 1);
-	return code[1];
-}
-
  static inline void dac_read_regs(struct dac_info *info, u8 *code, int count)
  {
  	info->dac_read_regs(info->data, code, count);
maintainer Applied
#5 lore raw
In reply to Jiapeng Chong
Quoted 8 lines · Jiapeng Chong

The function VAR_MATCH is defined in the controlfb.c file, but not called elsewhere, so delete this unused function.

drivers/video/fbdev/controlfb.c:111:19: warning: unused function 'VAR_MATCH'.

applied.

Thanks,
Helge

Quoted 22 lines
---
  drivers/video/fbdev/controlfb.c | 7 -------
  1 file changed, 7 deletions(-)
drivers/video/fbdev/controlfb.c +0 -7
index aba46118b208..6bbcd9fc864e 100644
@@ -108,13 +108,6 @@ static inline int PAR_EQUAL(struct fb_par_control *x, struct fb_par_control *y)
  	return (!DIRTY(cmode) && !DIRTY(xres) && !DIRTY(yres)
  		&& !DIRTY(vxres) && !DIRTY(vyres));
  }
-static inline int VAR_MATCH(struct fb_var_screeninfo *x, struct fb_var_screeninfo *y)
-{
-	return (!DIRTY(bits_per_pixel) && !DIRTY(xres)
-		&& !DIRTY(yres) && !DIRTY(xres_virtual)
-		&& !DIRTY(yres_virtual)
-		&& !DIRTY_CMAP(red) && !DIRTY_CMAP(green) && !DIRTY_CMAP(blue));
-}
 
  struct fb_info_control {
  	struct fb_info		info;