drivers/serial/atmel_serial.c: Fix BUILD_BUG_ON build
PATCH 1/1 drivers/serial/atmel_serial.c: Fix BUILD_BUG_ON build
Since 'BUILD_BUG_ON(): fix it and a couple of bogus uses of it' (commit 8c87df45) the BUILD_BUG_ON() for the ring buffer size has failed to build due to use of is_power_of_2(). Fix this in the same way as the SPARC vio.h was fixed in that commit by converting to MAYBE_BUILD_BUG_ON().
--- drivers/serial/atmel_serial.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/serial/atmel_serial.c +1 -1
@@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)void *data;int ret; -BUILD_BUG_ON (!is_power_of_2 (ATMEL_SERIAL_RINGSIZE )); +MAYBE_BUILD_BUG_ON (!is_power_of_2 (ATMEL_SERIAL_RINGSIZE )); port = &atmel_ports[pdev->id]; port->backup_imr =0 ;
Signature · 1 line
1.6.5
Quoted 8 lines · Mark Brown
Since '
BUILD_BUG_ON(): fix it and a couple of bogus uses of it' (commit8c87df45) theBUILD_BUG_ON()for the ring buffer size has failed to build due to use ofis_power_of_2(). Fix this in the same way as the SPARCvio.hwas fixed in that commit by converting toMAYBE_BUILD_BUG_ON().Signed-off-by Mark Brown <[email protected]>---
a similatr patch done by Haavard
atmel_serial-fix-bad-build_bug_on-usage.patch
is already in the -mm
btw when it will be merged?
Best Regards,
J.