Re: [PATCH 1/1] md/raid5: Use correct IS_ERR() variation on pointer check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 06, 2017 at 07:31:35PM -0500, Jes.Sorensen@xxxxxxxxxx wrote:
> From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux