fbcon: replace mono_col macro with static inline
Use __u32 for max_len to match the declaration of length in the struct fb_bitfield. Suppresses sparse shadowed variable warnings from the nested max() macros: drivers/video/console/fbcon.h:130:8: warning: symbol '_x' shadows an earlier one drivers/video/console/fbcon.h:130:8: originally declared here drivers/video/console/fbcon.h:130:8: warning: symbol '_x' shadows an earlier one drivers/video/console/fbcon.h:130:8: originally declared here drivers/video/console/fbcon.h:130:8: warning: symbol '_y' shadows an earlier one drivers/video/console/fbcon.h:130:8: originally declared here [akpm@linux-foundation.org: fix constness] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2ae09f0da1
commit
22af89aa0c
@ -104,10 +104,14 @@ struct fbcon_ops {
|
|||||||
#define attr_blink(s) \
|
#define attr_blink(s) \
|
||||||
((s) & 0x8000)
|
((s) & 0x8000)
|
||||||
|
|
||||||
#define mono_col(info) \
|
|
||||||
(~(0xfff << (max((info)->var.green.length, \
|
static inline int mono_col(const struct fb_info *info)
|
||||||
max((info)->var.red.length, \
|
{
|
||||||
(info)->var.blue.length)))) & 0xff)
|
__u32 max_len;
|
||||||
|
max_len = max(info->var.green.length, info->var.red.length);
|
||||||
|
max_len = max(info->var.blue.length, max_len);
|
||||||
|
return ~(0xfff << (max_len & 0xff));
|
||||||
|
}
|
||||||
|
|
||||||
static inline int attr_col_ec(int shift, struct vc_data *vc,
|
static inline int attr_col_ec(int shift, struct vc_data *vc,
|
||||||
struct fb_info *info, int is_fg)
|
struct fb_info *info, int is_fg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user