Re: [PATCH 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 June 2013 18:03, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
>> @@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd,
>>                * get the remaining count from the ... count register
>>                * which is 1*8 before the config register
>>                */
>> -             ret = put_user(__raw_readq(user_dog - 8) / 1000000, p);
>> +             tmp_user_dog = __raw_readq(user_dog - 8);
>> +             tmp_user_dog = do_div(tmp_user_dog, 1000000);
>> +             ret = put_user(tmp_user_dog, p);
>
> In effect the code with your change now does:
>
>                 ret = put_user(__raw_readq(user_dog - 8) % 1000000, p);
>
> No good.
>
>                 tmp_user_dog = __raw_readq(user_dog - 8);
>                 do_div(tmp_user_dog, 1000000);
>                 ret = put_user(tmp_user_dog, p);
>
> Should to the right thing.
>

Hi Ralf,

Yes you are right. I will submit a new patch.

--
Regards,
Markos Chandras


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux