[PATCH V2 2/3] scsi: fix compiler warning for sg
Andy Shevchenko
andy.shevchenko at gmail.com
Tue Nov 10 01:23:42 PST 2015
On Tue, Nov 10, 2015 at 6:53 AM, Timur Tabi <timur at codeaurora.org> wrote:
> Sinan Kaya wrote:
>>
>>
>> The code says it is using these macros for small integers only which
>> can't overflow. I was trying to get rid of compiler warning and it seems
>> to have disappeared.
>
>
> I would double-check the assembly code, if I were you. I don't like it when
> warnings just go away like that.
+1 to that.
>
> Besides, we *should* be using do_div() for 64-bit division.
But here looks like all numbers are guaranteed to be less than or
equal to INT_MAX.
Thus, the matter is only to replace MULDIV() by mult_frac() which is
already in kernel.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list