staging: fbtft: Replace bit shifting with BIT macro
Subsystems (2)
cover staging: fbtft: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Payal Kshirsagar (2):
staging: fbtft: fb_agm1264k-fl.c: Replace bit shifting with BIT macro
staging: fbtft: fb_ssd1351.c: Replace bit shifting with BIT macro
drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- drivers/staging/fbtft/fb_ssd1351.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 staging: fbtft: fb_agm1264k-fl.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by Payal Kshirsagar <[email protected]>
--- drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_agm1264k-fl.c +1 -1
@@ -383,7 +383,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)/* select right side (sc1) * set addr */ -write_reg (par,0x01 ,1 <<6 ); +write_reg (par,0x01 ,BIT (6 ));write_reg (par,0x01 , (0x17 <<3 ) | (u8 )y);/* write bitmap */
Signature · 1 line
2.7.4
PATCH 2/2 staging: fbtft: fb_ssd1351.c: Replace bit shifting with BIT macro
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by Payal Kshirsagar <[email protected]>
--- drivers/staging/fbtft/fb_ssd1351.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +2 -2
@@ -81,10 +81,10 @@ static int set_var(struct fbtft_par *par)switch (par->info->var.rotate) {case 0 : -write_reg (par,0xA0 , remap |0x00 |1 <<4 ); +write_reg (par,0xA0 , remap |0x00 |BIT (4 ));break ;case 270 : -write_reg (par,0xA0 , remap |0x03 |1 <<4 ); +write_reg (par,0xA0 , remap |0x03 |BIT (4 ));break ;case 180 :write_reg (par,0xA0 , remap |0x02 );
Signature · 1 line
2.7.4