md/raid5 - fix build error
cover md/raid5 - fix build error
From: Jes Sorensen <[email protected]>
Hi,
commit 6995f0b247e15e34fbcd10852c08b30bdc1a78da
Author: Shaohua Li <[email protected]> Date: Thu Dec 8 15:48:17 2016 -0800
md: takeover should clear unrelated bits
Introduced a bug comparing a pointer against an integer, which fails the build when stricter checking is in place. This should ideally be included in 4.10.
Cheers,
Jes
Jes Sorensen (1):
md/raid5: Use correct IS_ERR() variation on pointer check
drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.9.3
PATCH 1/1 md/raid5: Use correct IS_ERR() variation on pointer check
From: Jes Sorensen <[email protected]>
This fixes a build error on certain architectures, such as ppc64.
--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid5.c +1 -1
@@ -7829,7 +7829,7 @@ static void *raid5_takeover_raid1(struct mddev *mddev) mddev->new_chunk_sectors = chunksect; ret =setup_conf (mddev); -if (!IS_ERR_VALUE (ret)) +if (!IS_ERR (ret))clear_bit (MD_FAILFAST_SUPPORTED , &mddev->flags);return ret; }
Signature · 1 line
2.9.3
Re: [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check
Quoted 3 lines · On Fri, Jan 06, 2017 at 07:31:35PM -0500, [email protected] wrote:
From: Jes Sorensen <[email protected]>
This fixes a build error on certain architectures, such as ppc64.
Yep, we should use IS_ERR here, applied this. I'm curious why there is a compile error. The IS_ERR_VALUE casts the pointer to 'unsigned long'.
Thanks,
Shaohua
Quoted 22 lines
Fixes 6995f0b247e("md: takeover should clear unrelated bits")Signed-off-by Jes Sorensen <[email protected]>--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/raid5.c +1
-1@@ -7829,7 +7829,7 @@ static void *raid5_takeover_raid1(struct mddev *mddev) mddev->new_chunk_sectors = chunksect; ret =setup_conf (mddev); -if (!IS_ERR_VALUE (ret)) +if (!IS_ERR (ret))clear_bit (MD_FAILFAST_SUPPORTED , &mddev->flags);return ret; }Signature · 1 line
2.9.3
Re: [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check
Quoted 7 lines · Shaohua Li
Quoted 3 lines · On Fri, Jan 06, 2017 at 07:31:35PM -0500, [email protected] wrote:
From: Jes Sorensen <[email protected]>
This fixes a build error on certain architectures, such as ppc64.
Yep, we should use
IS_ERRhere, applied this. I'm curious why there is a compile error. TheIS_ERR_VALUEcasts the pointer to 'unsigned long'.
When building on ppc64 I get a -Wsign-compare build error due to -Werror.
Cheers,
Jes