md: Convert to use int_pow()
Quoted 2 lines · Andy Shevchenko
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)
Quoted 26 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/md/md.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/md/md.c +1
-5@@ -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 ; }Signature · 1 line
2.20.1
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 8 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
Instead of linear approach to calculate power of 10, use generic
int_pow()which does it better.
Quoted 7 lines
I took into Cc
drivers/dmguys 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
Quoted 33 lines
Quoted 27 lines
Signed-off-by Andy Shevchenko <[email protected]>---
drivers/md/md.c| 6 +-----1 file changed, 1 insertion(+), 5 deletions(-)drivers/md/md.c +1
-5@@ -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 ; }Signature · 1 line
2.20.1Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · Song Liu
Quoted 11 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
Instead of linear approach to calculate power of 10, use generic
int_pow()which does it better.I took into Cc
drivers/dmguys as they might have known something about md raid state of affairs. Sorry if I mistakenly added somebody.
Quoted 6 lines
Quoted 4 lines
Who is doing this?
Should it be orphaned?(I got a bounce from Shaohua address)
I process the patch. Sorry for the delay.
Ah, no problem, thanks!
Perhaps someone can update MAINTAINERS data base?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 14 lines · Song Liu
Quoted 14 lines · Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
Instead of linear approach to calculate power of 10, use generic
int_pow()which does it better.I took into Cc
drivers/dmguys 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?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
(I got a bounce from Shaohua address)
I process the patch. Sorry for the delay.
Ah, no problem, thanks!
Perhaps someone can update
MAINTAINERSdata base?
I will discuss this with Jens.
I applied this patch to my local branch. It will go to Jens' tree for 5.4.
Thanks,
Song