]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
bug: consolidate BUILD_BUG_ON with other bug code
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 Nov 2011 04:51:05 +0000 (23:51 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 4 Mar 2012 22:54:35 +0000 (17:54 -0500)
commit35edd9103c84f2b37f63227d12765c38f30495c5
treefd8afa6aee69f6353f7d0d6f927c6c5c2a6ecdd4
parent187f1882b5b0748b3c4c22274663fdb372ac0452
bug: consolidate BUILD_BUG_ON with other bug code

The support for BUILD_BUG in linux/kernel.h predates the
addition of linux/bug.h -- with this chunk off separate,
you can run into situations where a person gets a compile
fail even when they've included linux/bug.h, like this:

    CC      lib/string.o
  lib/string.c: In function 'strlcat':
  lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON'
  make[2]: *** [lib/string.o] Error 1
  $
  $ grep linux/bug.h lib/string.c
  #include <linux/bug.h>
  $

Since the above violates the principle of least surprise, move
the BUG chunks from kernel.h to bug.h so it is all together.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
include/linux/bug.h
include/linux/kernel.h