lkml.org 
[lkml]   [2012]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pinctrl: Include <linux/bug.h> to prevent compile errors
[[PATCH] pinctrl: Include <linux/bug.h> to prevent compile errors] On 09/03/2012 (Fri 13:18) Stephen Warren wrote:

> Macros in <linux/pinctrl/machine.h> call ARRAY_SIZE(), the definition of
> which eventually calls BUILD_BUG_ON_ZERO(), which is defined in
> <linux/bug.h>. Include that so that every .c file using the pinctrl macros
> doesn't have to do that itself.

Which C files are failing? The approach was to be adding it only
for headers with static inlines which use it, and add it to C files
that are actually *deploying* the macros.

Thanks,
Paul.

>
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> include/linux/pinctrl/machine.h | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
> index fee4349..012731a 100644
> --- a/include/linux/pinctrl/machine.h
> +++ b/include/linux/pinctrl/machine.h
> @@ -12,7 +12,9 @@
> #ifndef __LINUX_PINCTRL_MACHINE_H
> #define __LINUX_PINCTRL_MACHINE_H
>
> -#include "pinctrl-state.h"
> +#include <linux/bug.h>
> +
> +#include "pinctrl.h"
>
> enum pinctrl_map_type {
> PIN_MAP_TYPE_INVALID,
> --
> 1.7.0.4
>


\
 
 \ /
  Last update: 2012-03-09 21:35    [W:0.085 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site