Re: [PATCH] video: radeon.h Fix Shifting signed 32 bit value by 31 bits problem

2019-07-15 Thread Bartlomiej Zolnierkiewicz
On 7/6/19 8:41 PM, Shobhit Kukreti wrote: > Fix RB2D_DC_BUSY and HORZ_AUTO_RATIO_INC defines to use "U" cast to > avoid shifting signed 32 bit values by 31 bit problem. This is not a > problem for gcc built kernel. > > However, the header file being a public api, other compilers may not > handle

[PATCH] video: radeon.h Fix Shifting signed 32 bit value by 31 bits problem

2019-07-06 Thread Shobhit Kukreti
Fix RB2D_DC_BUSY and HORZ_AUTO_RATIO_INC defines to use "U" cast to avoid shifting signed 32 bit values by 31 bit problem. This is not a problem for gcc built kernel. However, the header file being a public api, other compilers may not handle the condition safely resulting in undefined behavior.