Fix cfs_bitmap_t struct and function parameters to eliminate the "Do not add new typedefs" warning generated by checkpatch.pl and meet kernel coding style. Signed-off-by: Lisa Nguyen <lisa@xxxxxxxxxxxxxxx> --- .../staging/lustre/include/linux/libcfs/bitmap.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/bitmap.h b/drivers/staging/lustre/include/linux/libcfs/bitmap.h index f3d4a89..d1538b0 100644 --- a/drivers/staging/lustre/include/linux/libcfs/bitmap.h +++ b/drivers/staging/lustre/include/linux/libcfs/bitmap.h @@ -37,18 +37,18 @@ #define _LIBCFS_BITMAP_H_ -typedef struct { +struct cfs_bitmap_t { int size; unsigned long data[0]; -} cfs_bitmap_t; +}; #define CFS_BITMAP_SIZE(nbits) \ - (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(cfs_bitmap_t)) + (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(struct cfs_bitmap_t)) -static inline +static inline struct cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size) { - cfs_bitmap_t *ptr; + struct cfs_bitmap_t *ptr; OBD_ALLOC(ptr, CFS_BITMAP_SIZE(size)); if (ptr == NULL) @@ -62,38 +62,38 @@ cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size) #define CFS_FREE_BITMAP(ptr) OBD_FREE(ptr, CFS_BITMAP_SIZE(ptr->size)) static inline -void cfs_bitmap_set(cfs_bitmap_t *bitmap, int nbit) +void cfs_bitmap_set(struct cfs_bitmap_t *bitmap, int nbit) { set_bit(nbit, bitmap->data); } static inline -void cfs_bitmap_clear(cfs_bitmap_t *bitmap, int nbit) +void cfs_bitmap_clear(struct cfs_bitmap_t *bitmap, int nbit) { test_and_clear_bit(nbit, bitmap->data); } static inline -int cfs_bitmap_check(cfs_bitmap_t *bitmap, int nbit) +int cfs_bitmap_check(struct cfs_bitmap_t *bitmap, int nbit) { return test_bit(nbit, bitmap->data); } static inline -int cfs_bitmap_test_and_clear(cfs_bitmap_t *bitmap, int nbit) +int cfs_bitmap_test_and_clear(struct cfs_bitmap_t *bitmap, int nbit) { return test_and_clear_bit(nbit, bitmap->data); } /* return 0 is bitmap has none set bits */ static inline -int cfs_bitmap_check_empty(cfs_bitmap_t *bitmap) +int cfs_bitmap_check_empty(struct cfs_bitmap_t *bitmap) { return find_first_bit(bitmap->data, bitmap->size) == bitmap->size; } static inline -void cfs_bitmap_copy(cfs_bitmap_t *new, cfs_bitmap_t *old) +void cfs_bitmap_copy(struct cfs_bitmap_t *new, struct cfs_bitmap_t *old) { int newsize; -- 1.8.1.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel