lkml.org 
[lkml]   [2016]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes

On Tuesday 09 February 2016 07:57 PM, Lee Jones wrote:
> +
> +#define MFD_CELL_NAME(_name) \
> + { \
> + MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL) \
> + }
> +
> struct irq_domain;

It is failed in compilation as we can not use ARRAY_SIZE(NULL)

static struct mfd_cell max77620_children[] = {
MFD_CELL_NAME("max77620-pinctrl"),
};

CC drivers/mfd/max77620.o
drivers/mfd/max77620.c:57:2: warning: braces around scalar initializer
MFD_CELL_NAME("max77620-pinctrl"),

include/linux/compiler-gcc.h:64:63: warning: taking address of
expression of type 'void'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^
include/linux/bug.h:33:55: note: in definition of macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/compiler-gcc.h:64:46: note: in expansion of macro
'__same_type'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))

\
 
 \ /
  Last update: 2016-02-09 17:01    [W:0.128 / U:26.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site