[Drbd-dev] [DRBD-user] [PATCH] drbd: drbd_bitmap: Avoid name collision

Lars Ellenberg lars.ellenberg at linbit.com
Tue Mar 10 11:54:45 CET 2015


On Sat, Mar 07, 2015 at 03:14:26PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Building for ARM64 leads to the following build warnings:
> 
>   CC      drivers/block/drbd/drbd_bitmap.o
> drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE" redefined
>  #define BITS_PER_PAGE  (1UL << (PAGE_SHIFT + 3))


Apparently there are more than one consumer of "BITS_PER_PAGE".
The commit that moved the now conflicting definition to pid_namespace.h
itself already refered to a similar "redefined" warning.

Would it not make more sense to have one such definition next to PAGE_SIZE?
Or somewhere central, anyways?

> Fix the warnings by using BITS_PER_PAGE_DRBD and BITS_PER_PAGE_MASK_DRBD 
> definitions to avoid the name collision.

Other than that:
Ack.

	Lars Ellenberg


More information about the drbd-dev mailing list