Thanks for this test-result. That patch was only sent in on
linux-kernel@, but got never applied to
the kernel. Indeed the first half of the patch was wrong.
best regards,
Florian La Roche
Add __attribute_const__ and adjust to use (signed) int for the right param of
"<<".
Change the return value of int_sqrt() from "unsigned long" to u32 to be
the same as int_sqrt64() and adjust some calling functions.
Signed-off-by: Florian La Roche
---
driv
Hello Joe,
sending in a new patch with u32 as return value and some adjusted
callers of int_sqrt().
best regards,
Florian La Roche
Add __attribute_const__ and use normal ints for the right param of "<<".
Signed-off-by: Florian La Roche
---
include/linux/kernel.h | 4 ++--
lib/int_sqrt.c | 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/linux/kernel.h b/include/linu
From: Florian La Roche
int_sqrt() and int_sqrt64():
Add __attribute_const__ and adjust to use (signed) int for the right param of
"<<".
Signed-off-by: Florian La Roche
---
include/linux/kernel.h | 4 ++--
lib/int_sqrt.c | 8
2 files changed, 6 insertions
() and only
change masking the lowest bit.
The only other nitpick I have come up with: Adding __attribute_const__
could be possible.
best regards,
Florian La Roche
it and the 64bit version are again similar.
best regards,
Florian La Roche
Signed-off-by: Florian La Roche
---
lib/int_sqrt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
index 30e0f9770f88..66eb93105812 100644
--- a/lib/int_sqrt.c
+++
it and the 64bit version are again similar.
best regards,
Florian La Roche
Signed-off-by: Florian La Roche
---
lib/int_sqrt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
index 30e0f9770f88..66eb93105812 100644
--- a/lib/int_sqrt.c
+++
0;
}
Please note the "_builtin_clzl()" instead of the "_builtin_clz()".
The real bug is that we compute 1 to 64 for bit 0 to bit 63, whereas
the algorithm
expects 0 to 63 for the value of m.
best regards,
Florian La Roche
egards,
Florian La Roche
Signed-off-by: Florian La Roche
---
lib/int_sqrt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
index 14436f4ca6bd..ea00e84dc272 100644
--- a/lib/int_sqrt.c
+++ b/lib/int_sqrt.c
@@ -23,7 +23,7 @@ unsigned long in
else.
regards,
Florian La Roche
--- drivers/ata/libata-core.c
+++ drivers/ata/libata-core.c
@@ -4222,6 +4222,7 @@
{ "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, },
{ "WDC WD3200AAJS-00RYA0", "12.01B01", ATA_HORKAGE_NONCQ, },
{ &
else.
regards,
Florian La Roche
--- drivers/ata/libata-core.c
+++ drivers/ata/libata-core.c
@@ -4222,6 +4222,7 @@
{ WDC WD740ADFD-00NLR1, NULL, ATA_HORKAGE_NONCQ, },
{ WDC WD3200AAJS-00RYA0, 12.01B01, ATA_HORKAGE_NONCQ, },
{ FUJITSU MHV2080BH, 00840028
12 matches
Mail list logo