bitops: collect BIT macros to include/linux/bitops.h
Same macros are defined in various places. Collect them into include/linux/bitops.h like Linux. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
@@ -10,12 +10,10 @@
|
||||
#ifndef __LIN_COMPAT_H__
|
||||
#define __LIN_COMPAT_H__
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
/* common */
|
||||
#define BITS_PER_BYTE 8
|
||||
#define BITS_TO_LONGS(nr) \
|
||||
DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
|
||||
#define DECLARE_BITMAP(name, bits) \
|
||||
unsigned long name[BITS_TO_LONGS(bits)]
|
||||
|
||||
|
Reference in New Issue
Block a user