Re: [PATCH 06/11] staging: lustre: add missing spaces for LNet layer reported by checkpatch.pl

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

 



On Fri, 2016-02-12 at 12:06 -0500, James Simmons wrote:
> Add missing spaces in the code reported by checkpatch.pl.
[]
> diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
[]
> @@ -112,7 +112,7 @@ typedef struct lnet_libhandle {
>  } lnet_libhandle_t;
>  
>  #define lh_entry(ptr, type, member) \
> -	((type *)((char *)(ptr)-(char *)(&((type *)0)->member)))
> +	((type *)((char *)(ptr) - (char *)(&((type *)0)->member)))

This could use offsetof(type, member)

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux