Fixed the warning generated by sparse that 'cast truncates bits from
constant value' by typecasting unsigned values to u8 as their logical
operation is being performed with and stored in a u8 type variable.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
u8 temp;
temp = xgifb_reg_get(port, index);
- temp = (temp & data_and) | data_or;
+ temp = (u8) ((temp & data_and) | data_or);
xgifb_reg_set(port, index, temp);
}
u8 temp;
temp = xgifb_reg_get(port, index);
- temp &= data_and;
+ temp = (u8) (temp & data_and);
xgifb_reg_set(port, index, temp);
}