linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] md/raid5 - fix build error
@ 2017-01-07  0:31 Jes.Sorensen
  2017-01-07  0:31 ` [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check Jes.Sorensen
  0 siblings, 1 reply; 4+ messages in thread
From: Jes.Sorensen @ 2017-01-07  0:31 UTC (permalink / raw)
  To: shli; +Cc: linux-raid

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

commit 6995f0b247e15e34fbcd10852c08b30bdc1a78da
Author: Shaohua Li <shli@fb.com>
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(-)

-- 
2.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check
  2017-01-07  0:31 [PATCH 0/1] md/raid5 - fix build error Jes.Sorensen
@ 2017-01-07  0:31 ` Jes.Sorensen
  2017-01-09 21:34   ` Shaohua Li
  0 siblings, 1 reply; 4+ messages in thread
From: Jes.Sorensen @ 2017-01-07  0:31 UTC (permalink / raw)
  To: shli; +Cc: linux-raid

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This fixes a build error on certain architectures, such as ppc64.

Fixes: 6995f0b247e("md: takeover should clear unrelated bits")
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/md/raid5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 06d7279..0e0646b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -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;
 }
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check
  2017-01-07  0:31 ` [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check Jes.Sorensen
@ 2017-01-09 21:34   ` Shaohua Li
  2017-01-09 21:38     ` Jes Sorensen
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2017-01-09 21:34 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: linux-raid

On Fri, Jan 06, 2017 at 07:31:35PM -0500, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
> 
> 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
> Fixes: 6995f0b247e("md: takeover should clear unrelated bits")
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> ---
>  drivers/md/raid5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 06d7279..0e0646b 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -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;
>  }
> -- 
> 2.9.3
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check
  2017-01-09 21:34   ` Shaohua Li
@ 2017-01-09 21:38     ` Jes Sorensen
  0 siblings, 0 replies; 4+ messages in thread
From: Jes Sorensen @ 2017-01-09 21:38 UTC (permalink / raw)
  To: Shaohua Li; +Cc: linux-raid

Shaohua Li <shli@kernel.org> writes:
> On Fri, Jan 06, 2017 at 07:31:35PM -0500, Jes.Sorensen@redhat.com wrote:
>> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>> 
>> 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'.

When building on ppc64 I get a -Wsign-compare build error due to -Werror.

Cheers,
Jes

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-09 21:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-07  0:31 [PATCH 0/1] md/raid5 - fix build error Jes.Sorensen
2017-01-07  0:31 ` [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check Jes.Sorensen
2017-01-09 21:34   ` Shaohua Li
2017-01-09 21:38     ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).