lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F7CF9393-B366-4810-B127-876C6D5A72A1@fb.com>
Date:   Fri, 26 Jul 2019 17:18:09 +0000
From:   Song Liu <songliubraving@...com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     Shaohua Li <shli@...nel.org>,
        "linux-raid@...r.kernel.org" <linux-raid@...r.kernel.org>,
        Jens Axboe <axboe@...nel.dk>,
        Mike Snitzer <snitzer@...hat.com>, Coly Li <colyli@...e.de>,
        Mikulas Patocka <mpatocka@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] md: Convert to use int_pow()



> On Jul 26, 2019, at 9:48 AM, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> 
> On Tue, Jul 23, 2019 at 11:41:55PM +0300, Andy Shevchenko wrote:
>> Instead of linear approach to calculate power of 10, use generic int_pow()
>> which does it better.
> 
> I took into Cc drivers/dm guys as they might have known something about md raid
> state of affairs. Sorry if I mistakenly added somebody.
> 
> Who is doing this?
> Should it be orphaned?
> 
> (I got a bounce from Shaohua address)

I process the patch. Sorry for the delay.

Song

> 
>> 
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>> ---
>> drivers/md/md.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>> 
>> diff --git a/drivers/md/md.c b/drivers/md/md.c
>> index 24638ccedce4..3f1252440ad0 100644
>> --- a/drivers/md/md.c
>> +++ b/drivers/md/md.c
>> @@ -3664,11 +3664,7 @@ int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale)
>> 		return -EINVAL;
>> 	if (decimals < 0)
>> 		decimals = 0;
>> -	while (decimals < scale) {
>> -		result *= 10;
>> -		decimals ++;
>> -	}
>> -	*res = result;
>> +	*res = result * int_pow(10, scale - decimals);
>> 	return 0;
>> }
>> 
>> -- 
>> 2.20.1
>> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ