Add devm_drm_of_find_backlight and the corresponding release function because some drivers such as tinydrm use devres versions of functions for requiring device resources.
Signed-off-by: Meghana Madhyastha meghana.madhyastha@gmail.com --- Changes in v2: -This was not present in the initial version.
drivers/gpu/drm/drm_of.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_of.h | 2 ++ 2 files changed, 49 insertions(+)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index d878d3a..26090e1 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -304,3 +304,50 @@ struct backlight_device *drm_of_find_backlight(struct device *dev) return backlight; } EXPORT_SYMBOL(drm_of_find_backlight); + +/** + * devm_drm_of_find_backlight - Find backlight device in device-tree + * devres version of the function + * @dev: Device + * + * This is the devres version of the function drm_of_find_backlight. + * Some drivers such as tinydrm use devres versions of functions for + * requiring device resources. + * + * Returns: + * NULL if there's no backlight property. + * Error pointer -EPROBE_DEFER if the DT node is found, but no backlight device + * is found. + * If the backlight device is found, a pointer to the structure is returned. + */ +struct backlight_device *devm_drm_of_find_backlight(struct device *dev) +{ + struct backlight_device *backlight; + int ret; + + backlight = drm_of_find_backlight(dev); + if (IS_ERR_OR_NULL(backlight)) + return backlight; + + ret = devm_add_action(dev, devm_drm_of_find_backlight_release, + backlight->dev); + if (ret) { + put_device(backlight->dev); + return ERR_PTR(ret); + } + + return backlight; +} +EXPORT_SYMBOL(devm_drm_of_find_backlight); + +/** + * devm_drm_of_find_backlight_release - Release backlight device + * + * This is the release function corresponding to the devm_drm_of_find_backlight. + * Each devres entry is associated with a release function. + */ +static void devm_drm_of_find_backlight_release(void *data) +{ + put_device(data); +} +EXPORT_SYMBOL(devm_drm_of_find_backlight_release) diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index e8fba5b..89a37da 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -30,6 +30,8 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, struct drm_panel **panel, struct drm_bridge **bridge); struct backlight_device *drm_of_find_backlight(struct device *dev); +struct backlight_device *devm_drm_of_find_backlight(struct device *dev) +static void devm_drm_of_find_backlight_release(void *data) #else static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port)
Hi Meghana,
[auto build test ERROR on drm/drm-next] [also build test ERROR on v4.14-rc2 next-20170929] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Meghana-Madhyastha/drm-tinydrm-Move... base: git://people.freedesktop.org/~airlied/linux.git drm-next config: i386-randconfig-x071-201739 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All error/warnings (new ones prefixed by >>):
In file included from drivers/gpu//drm/drm_of.c:11:0: include/drm/drm_of.h: In function 'devm_drm_of_find_backlight':
include/drm/drm_of.h:73:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, ^~~~~~
include/drm/drm_of.h:85:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^
drivers/gpu//drm/drm_of.c:14:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ drivers/gpu//drm/drm_of.c:28:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:55:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^
drivers/gpu//drm/drm_of.c:73:42: error: expected declaration specifiers before ';' token
EXPORT_SYMBOL(drm_of_find_possible_crtcs); ^ drivers/gpu//drm/drm_of.c:86:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:91:46: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_component_match_add); ^ drivers/gpu//drm/drm_of.c:109:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:179:38: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(drm_of_component_probe); ^ drivers/gpu//drm/drm_of.c:192:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:213:50: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_encoder_active_endpoint); ^ drivers/gpu//drm/drm_of.c:231:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:263:47: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_find_panel_or_bridge); ^ drivers/gpu//drm/drm_of.c:284:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:306:37: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(drm_of_find_backlight); ^ drivers/gpu//drm/drm_of.c:324:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/drm_of.c:341:42: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(devm_drm_of_find_backlight); ^ drivers/gpu//drm/drm_of.c:350:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^
drivers/gpu//drm/drm_of.c:353:1: error: expected '{' at end of input
EXPORT_SYMBOL(devm_drm_of_find_backlight_release) ^~~~~~~~~~~~~
drivers/gpu//drm/drm_of.c:353:1: warning: control reaches end of non-void function [-Wreturn-type]
EXPORT_SYMBOL(devm_drm_of_find_backlight_release) ^~~~~~~~~~~~~ -- In file included from drivers/gpu//drm/bridge/tc358767.c:38:0: include/drm/drm_of.h: In function 'devm_drm_of_find_backlight':
include/drm/drm_of.h:73:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, ^~~~~~
include/drm/drm_of.h:85:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ In file included from drivers/gpu//drm/bridge/tc358767.c:39:0:
include/drm/drm_panel.h:30:1: warning: empty declaration
struct device_node; ^~~~~~ include/drm/drm_panel.h:31:1: warning: empty declaration struct drm_connector; ^~~~~~ include/drm/drm_panel.h:32:1: warning: empty declaration struct drm_device; ^~~~~~ include/drm/drm_panel.h:33:1: warning: empty declaration struct drm_panel; ^~~~~~ include/drm/drm_panel.h:34:1: warning: empty declaration struct display_timing; ^~~~~~ include/drm/drm_panel.h:70:1: warning: empty declaration struct drm_panel_funcs { ^~~~~~ include/drm/drm_panel.h:88:1: warning: empty declaration struct drm_panel { ^~~~~~
include/drm/drm_panel.h:110:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ include/drm/drm_panel.h:128:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:146:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:164:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:182:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^
drivers/gpu//drm/bridge/tc358767.c:176:13: error: storage class specified for parameter 'tc_test_pattern'
static bool tc_test_pattern; ^~~~~~~~~~~~~~~ In file included from include/linux/module.h:18:0, from drivers/gpu//drm/bridge/tc358767.c:30: include/linux/moduleparam.h:346:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token static inline type __always_unused *__check_##name(void) { return(p); } ^ include/linux/moduleparam.h:398:35: note: in expansion of macro '__param_check' #define param_check_bool(name, p) __param_check(name, p, bool) ^~~~~~~~~~~~~ include/linux/moduleparam.h:148:2: note: in expansion of macro 'param_check_bool' param_check_##type(name, &(value)); \ ^~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:148:36: error: expected declaration specifiers before ';' token param_check_##type(name, &(value)); \ ^
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:222:20: error: storage class specified for parameter '__param_str_test'
static const char __param_str_##name[] = prefix #name; \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:148:36: error: parameter '__param_str_test' is initialized
param_check_##type(name, &(value)); \ ^
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: storage class specified for parameter '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:16: error: parameter '__param_test' is initialized
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:223:16: warning: '__used__' attribute ignored [-Wattributes] static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: section attribute not allowed for '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: alignment may not be specified for '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~
drivers/gpu//drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named'
module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:27:3: warning: empty declaration struct __UNIQUE_ID(name) {} ^ include/linux/moduleparam.h:30:3: note: in expansion of macro '__MODULE_INFO' __MODULE_INFO(parmtype, name##type, #name ":" _type) ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:2: note: in expansion of macro '__MODULE_PARM_TYPE' __MODULE_PARM_TYPE(name, #type) ^~~~~~~~~~~~~~~~~~ -- In file included from drivers/gpu/drm/drm_of.c:11:0: include/drm/drm_of.h: In function 'devm_drm_of_find_backlight':
include/drm/drm_of.h:73:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, ^~~~~~
include/drm/drm_of.h:85:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ drivers/gpu/drm/drm_of.c:14:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:28:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:55:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:73:42: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(drm_of_find_possible_crtcs); ^ drivers/gpu/drm/drm_of.c:86:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:91:46: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_component_match_add); ^ drivers/gpu/drm/drm_of.c:109:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:179:38: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(drm_of_component_probe); ^ drivers/gpu/drm/drm_of.c:192:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:213:50: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_encoder_active_endpoint); ^ drivers/gpu/drm/drm_of.c:231:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:263:47: error: expected declaration specifiers before ';' token EXPORT_SYMBOL_GPL(drm_of_find_panel_or_bridge); ^ drivers/gpu/drm/drm_of.c:284:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:306:37: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(drm_of_find_backlight); ^ drivers/gpu/drm/drm_of.c:324:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:341:42: error: expected declaration specifiers before ';' token EXPORT_SYMBOL(devm_drm_of_find_backlight); ^ drivers/gpu/drm/drm_of.c:350:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/drm_of.c:353:1: error: expected '{' at end of input EXPORT_SYMBOL(devm_drm_of_find_backlight_release) ^~~~~~~~~~~~~ drivers/gpu/drm/drm_of.c:353:1: warning: control reaches end of non-void function [-Wreturn-type] EXPORT_SYMBOL(devm_drm_of_find_backlight_release) ^~~~~~~~~~~~~ -- In file included from drivers/gpu/drm/bridge/tc358767.c:38:0: include/drm/drm_of.h: In function 'devm_drm_of_find_backlight':
include/drm/drm_of.h:73:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, ^~~~~~
include/drm/drm_of.h:85:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ In file included from drivers/gpu/drm/bridge/tc358767.c:39:0:
include/drm/drm_panel.h:30:1: warning: empty declaration
struct device_node; ^~~~~~ include/drm/drm_panel.h:31:1: warning: empty declaration struct drm_connector; ^~~~~~ include/drm/drm_panel.h:32:1: warning: empty declaration struct drm_device; ^~~~~~ include/drm/drm_panel.h:33:1: warning: empty declaration struct drm_panel; ^~~~~~ include/drm/drm_panel.h:34:1: warning: empty declaration struct display_timing; ^~~~~~ include/drm/drm_panel.h:70:1: warning: empty declaration struct drm_panel_funcs { ^~~~~~ include/drm/drm_panel.h:88:1: warning: empty declaration struct drm_panel { ^~~~~~
include/drm/drm_panel.h:110:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{ ^ include/drm/drm_panel.h:128:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:146:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:164:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ include/drm/drm_panel.h:182:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:176:13: error: storage class specified for parameter 'tc_test_pattern' static bool tc_test_pattern; ^~~~~~~~~~~~~~~ In file included from include/linux/module.h:18:0, from drivers/gpu/drm/bridge/tc358767.c:30: include/linux/moduleparam.h:346:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token static inline type __always_unused *__check_##name(void) { return(p); } ^ include/linux/moduleparam.h:398:35: note: in expansion of macro '__param_check' #define param_check_bool(name, p) __param_check(name, p, bool) ^~~~~~~~~~~~~ include/linux/moduleparam.h:148:2: note: in expansion of macro 'param_check_bool' param_check_##type(name, &(value)); \ ^~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:148:36: error: expected declaration specifiers before ';' token param_check_##type(name, &(value)); \ ^ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:222:20: error: storage class specified for parameter '__param_str_test'
static const char __param_str_##name[] = prefix #name; \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:148:36: error: parameter '__param_str_test' is initialized
param_check_##type(name, &(value)); \ ^ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: storage class specified for parameter '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:16: error: parameter '__param_test' is initialized
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:223:16: warning: '__used__' attribute ignored [-Wattributes] static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: section attribute not allowed for '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~
include/linux/moduleparam.h:223:49: error: alignment may not be specified for '__param_test'
static struct kernel_param __moduleparam_const __param_##name \ ^ include/linux/moduleparam.h:169:2: note: in expansion of macro '__module_param_call' __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0) ^~~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:149:2: note: in expansion of macro 'module_param_cb' module_param_cb(name, ¶m_ops_##type, &value, perm); \ ^~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:27:3: warning: empty declaration struct __UNIQUE_ID(name) {} ^ include/linux/moduleparam.h:30:3: note: in expansion of macro '__MODULE_INFO' __MODULE_INFO(parmtype, name##type, #name ":" _type) ^~~~~~~~~~~~~ include/linux/moduleparam.h:150:2: note: in expansion of macro '__MODULE_PARM_TYPE' __MODULE_PARM_TYPE(name, #type) ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:177:1: note: in expansion of macro 'module_param_named' module_param_named(test, tc_test_pattern, bool, 0644); ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:179:1: warning: empty declaration struct tc_edp_link { ^~~~~~ drivers/gpu/drm/bridge/tc358767.c:195:23: error: field 'connector' has incomplete type struct drm_connector connector; ^~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:189:1: warning: empty declaration struct tc_data { ^~~~~~ drivers/gpu/drm/bridge/tc358767.c:215:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:220:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:225:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:247:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:269:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:275:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:296:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu/drm/bridge/tc358767.c:359:27: error: storage class specified for parameter 'training_pattern1_errors' static const char * const training_pattern1_errors[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:359:1: error: parameter 'training_pattern1_errors' is initialized static const char * const training_pattern1_errors[] = { ^~~~~~ drivers/gpu/drm/bridge/tc358767.c:360:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] "No errors", ^~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:360:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:361:2: warning: excess elements in scalar initializer "Aux write error", ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:361:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:362:2: warning: excess elements in scalar initializer "Aux read error", ^~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:362:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:363:2: warning: excess elements in scalar initializer "Max voltage reached error", ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:363:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:364:2: warning: excess elements in scalar initializer "Loop counter expired error", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:364:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:365:2: warning: excess elements in scalar initializer "res", "res", "res" ^~~~~ drivers/gpu/drm/bridge/tc358767.c:365:2: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:365:9: warning: excess elements in scalar initializer "res", "res", "res" ^~~~~ drivers/gpu/drm/bridge/tc358767.c:365:9: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:365:16: warning: excess elements in scalar initializer "res", "res", "res" ^~~~~ drivers/gpu/drm/bridge/tc358767.c:365:16: note: (near initialization for 'training_pattern1_errors') drivers/gpu/drm/bridge/tc358767.c:368:27: error: storage class specified for parameter 'training_pattern2_errors' static const char * const training_pattern2_errors[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/bridge/tc358767.c:368:1: error: parameter 'training_pattern2_errors' is initialized static const char * const training_pattern2_errors[] = { ^~~~~~ drivers/gpu/drm/bridge/tc358767.c:369:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] "No errors", ^~~~~~~~~~~ ..
vim +73 include/drm/drm_of.h
7e435aad Russell King 2014-06-15 14 7e435aad Russell King 2014-06-15 15 #ifdef CONFIG_OF 91faa047 Daniel Vetter 2017-03-22 16 uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, 7e435aad Russell King 2014-06-15 17 struct device_node *port); 91faa047 Daniel Vetter 2017-03-22 18 void drm_of_component_match_add(struct device *master, 97ac0e47 Russell King 2016-10-19 19 struct component_match **matchptr, 97ac0e47 Russell King 2016-10-19 20 int (*compare)(struct device *, void *), 97ac0e47 Russell King 2016-10-19 21 struct device_node *node); 91faa047 Daniel Vetter 2017-03-22 22 int drm_of_component_probe(struct device *dev, df785aa8 Liviu Dudau 2015-10-20 23 int (*compare_of)(struct device *, void *), df785aa8 Liviu Dudau 2015-10-20 24 const struct component_master_ops *m_ops); 91faa047 Daniel Vetter 2017-03-22 25 int drm_of_encoder_active_endpoint(struct device_node *node, 4cacf91f Philipp Zabel 2015-02-24 26 struct drm_encoder *encoder, 4cacf91f Philipp Zabel 2015-02-24 27 struct of_endpoint *endpoint); 1f2db303 Rob Herring 2017-03-22 28 int drm_of_find_panel_or_bridge(const struct device_node *np, 1f2db303 Rob Herring 2017-03-22 29 int port, int endpoint, 1f2db303 Rob Herring 2017-03-22 30 struct drm_panel **panel, 1f2db303 Rob Herring 2017-03-22 31 struct drm_bridge **bridge); 4fb60416 Meghana Madhyastha 2017-09-28 32 struct backlight_device *drm_of_find_backlight(struct device *dev); 5c09694e Meghana Madhyastha 2017-09-28 @33 struct backlight_device *devm_drm_of_find_backlight(struct device *dev) 5c09694e Meghana Madhyastha 2017-09-28 34 static void devm_drm_of_find_backlight_release(void *data) 7e435aad Russell King 2014-06-15 35 #else 7e435aad Russell King 2014-06-15 36 static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, 7e435aad Russell King 2014-06-15 37 struct device_node *port) 7e435aad Russell King 2014-06-15 38 { 7e435aad Russell King 2014-06-15 39 return 0; 7e435aad Russell King 2014-06-15 40 } df785aa8 Liviu Dudau 2015-10-20 41 329f4c81 Arnd Bergmann 2016-10-26 42 static inline void 329f4c81 Arnd Bergmann 2016-10-26 43 drm_of_component_match_add(struct device *master, 97ac0e47 Russell King 2016-10-19 44 struct component_match **matchptr, 97ac0e47 Russell King 2016-10-19 45 int (*compare)(struct device *, void *), 97ac0e47 Russell King 2016-10-19 46 struct device_node *node) 97ac0e47 Russell King 2016-10-19 47 { 97ac0e47 Russell King 2016-10-19 48 } 97ac0e47 Russell King 2016-10-19 49 df785aa8 Liviu Dudau 2015-10-20 50 static inline int df785aa8 Liviu Dudau 2015-10-20 51 drm_of_component_probe(struct device *dev, df785aa8 Liviu Dudau 2015-10-20 52 int (*compare_of)(struct device *, void *), df785aa8 Liviu Dudau 2015-10-20 53 const struct component_master_ops *m_ops) df785aa8 Liviu Dudau 2015-10-20 54 { df785aa8 Liviu Dudau 2015-10-20 55 return -EINVAL; df785aa8 Liviu Dudau 2015-10-20 56 } 4cacf91f Philipp Zabel 2015-02-24 57 4cacf91f Philipp Zabel 2015-02-24 58 static inline int drm_of_encoder_active_endpoint(struct device_node *node, 4cacf91f Philipp Zabel 2015-02-24 59 struct drm_encoder *encoder, 4cacf91f Philipp Zabel 2015-02-24 60 struct of_endpoint *endpoint) 4cacf91f Philipp Zabel 2015-02-24 61 { 4cacf91f Philipp Zabel 2015-02-24 62 return -EINVAL; 4cacf91f Philipp Zabel 2015-02-24 63 } 1f2db303 Rob Herring 2017-03-22 64 static inline int drm_of_find_panel_or_bridge(const struct device_node *np, 1f2db303 Rob Herring 2017-03-22 65 int port, int endpoint, 1f2db303 Rob Herring 2017-03-22 66 struct drm_panel **panel, 1f2db303 Rob Herring 2017-03-22 67 struct drm_bridge **bridge) 1f2db303 Rob Herring 2017-03-22 68 { 1f2db303 Rob Herring 2017-03-22 69 return -EINVAL; 1f2db303 Rob Herring 2017-03-22 70 } 7e435aad Russell King 2014-06-15 71 #endif 7e435aad Russell King 2014-06-15 72 4cacf91f Philipp Zabel 2015-02-24 @73 static inline int drm_of_encoder_active_endpoint_id(struct device_node *node, 4cacf91f Philipp Zabel 2015-02-24 74 struct drm_encoder *encoder) 4cacf91f Philipp Zabel 2015-02-24 75 { 4cacf91f Philipp Zabel 2015-02-24 76 struct of_endpoint endpoint; 4cacf91f Philipp Zabel 2015-02-24 77 int ret = drm_of_encoder_active_endpoint(node, encoder, 4cacf91f Philipp Zabel 2015-02-24 78 &endpoint); 4cacf91f Philipp Zabel 2015-02-24 79 4cacf91f Philipp Zabel 2015-02-24 80 return ret ?: endpoint.id; 4cacf91f Philipp Zabel 2015-02-24 81 } 4cacf91f Philipp Zabel 2015-02-24 82 4cacf91f Philipp Zabel 2015-02-24 83 static inline int drm_of_encoder_active_port_id(struct device_node *node, 4cacf91f Philipp Zabel 2015-02-24 84 struct drm_encoder *encoder) 4cacf91f Philipp Zabel 2015-02-24 @85 { 4cacf91f Philipp Zabel 2015-02-24 86 struct of_endpoint endpoint; 4cacf91f Philipp Zabel 2015-02-24 87 int ret = drm_of_encoder_active_endpoint(node, encoder, 4cacf91f Philipp Zabel 2015-02-24 88 &endpoint); 4cacf91f Philipp Zabel 2015-02-24 89 4cacf91f Philipp Zabel 2015-02-24 90 return ret ?: endpoint.port; 4cacf91f Philipp Zabel 2015-02-24 91 } 4cacf91f Philipp Zabel 2015-02-24 92
:::::: The code at line 73 was first introduced by commit :::::: 4cacf91fcb1d7118e93caf9cb6651d7f7b56e58d drm: add drm_of_encoder_active_endpoint helpers
:::::: TO: Philipp Zabel p.zabel@pengutronix.de :::::: CC: Philipp Zabel p.zabel@pengutronix.de
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Meghana,
[auto build test ERROR on drm/drm-next] [also build test ERROR on v4.14-rc2 next-20170929] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Meghana-Madhyastha/drm-tinydrm-Move... base: git://people.freedesktop.org/~airlied/linux.git drm-next config: i386-randconfig-x073-201739 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All error/warnings (new ones prefixed by >>):
drivers/gpu//drm/i2c/tda998x_drv.c:1721:10: error: 'tda998x_bind' undeclared (first use in this function) .bind = tda998x_bind, ^~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1722:12: error: 'tda998x_unbind' undeclared (first use in this function) .unbind = tda998x_unbind, ^~~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1727:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/i2c/tda998x_drv.c:1736:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ drivers/gpu//drm/i2c/tda998x_drv.c:1742:34: error: storage class specified for parameter 'tda998x_dt_ids' static const struct of_device_id tda998x_dt_ids[] = { ^~~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1742:21: error: parameter 'tda998x_dt_ids' is initialized static const struct of_device_id tda998x_dt_ids[] = { ^~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1743:2: warning: braces around scalar initializer { .compatible = "nxp,tda998x", }, ^ drivers/gpu//drm/i2c/tda998x_drv.c:1743:2: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1743:4: error: field name not in record or union initializer { .compatible = "nxp,tda998x", }, ^ drivers/gpu//drm/i2c/tda998x_drv.c:1743:4: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1743:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] { .compatible = "nxp,tda998x", }, ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1743:18: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: warning: braces around scalar initializer { } ^ drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: error: empty scalar initializer drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: warning: excess elements in scalar initializer drivers/gpu//drm/i2c/tda998x_drv.c:1744:2: note: (near initialization for 'tda998x_dt_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1746:40: error: expected declaration specifiers before ';' token MODULE_DEVICE_TABLE(of, tda998x_dt_ids); ^ drivers/gpu//drm/i2c/tda998x_drv.c:1749:35: error: storage class specified for parameter 'tda998x_ids' static const struct i2c_device_id tda998x_ids[] = { ^~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1749:21: error: parameter 'tda998x_ids' is initialized static const struct i2c_device_id tda998x_ids[] = { ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1750:2: warning: braces around scalar initializer { "tda998x", 0 }, ^ drivers/gpu//drm/i2c/tda998x_drv.c:1750:2: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1750:4: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] { "tda998x", 0 }, ^~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1750:4: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1750:15: warning: excess elements in scalar initializer { "tda998x", 0 }, ^ drivers/gpu//drm/i2c/tda998x_drv.c:1750:15: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: warning: braces around scalar initializer { } ^ drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: error: empty scalar initializer drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: warning: excess elements in scalar initializer drivers/gpu//drm/i2c/tda998x_drv.c:1751:2: note: (near initialization for 'tda998x_ids') drivers/gpu//drm/i2c/tda998x_drv.c:1753:38: error: expected declaration specifiers before ';' token MODULE_DEVICE_TABLE(i2c, tda998x_ids); ^ drivers/gpu//drm/i2c/tda998x_drv.c:1755:26: error: storage class specified for parameter 'tda998x_driver' static struct i2c_driver tda998x_driver = { ^~~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1755:15: error: parameter 'tda998x_driver' is initialized static struct i2c_driver tda998x_driver = { ^~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1756:11: error: 'tda998x_probe' undeclared (first use in this function) .probe = tda998x_probe, ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1757:12: error: 'tda998x_remove' undeclared (first use in this function) .remove = tda998x_remove, ^~~~~~~~~~~~~~ In file included from include/linux/hdmi.h:28:0, from drivers/gpu//drm/i2c/tda998x_drv.c:19: include/linux/device.h:1503:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/printk.h:5:0, from include/linux/kernel.h:13, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/hdmi.h:28, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/init.h:165:20: error: storage class specified for parameter '__initcall_tda998x_driver_init6'
static initcall_t __initcall_##fn##id __used \ ^ include/linux/init.h:195:30: note: in expansion of macro '__define_initcall' #define device_initcall(fn) __define_initcall(fn, 6) ^~~~~~~~~~~~~~~~~ include/linux/init.h:200:24: note: in expansion of macro 'device_initcall' #define __initcall(fn) device_initcall(fn) ^~~~~~~~~~~~~~~ include/linux/module.h:85:24: note: in expansion of macro '__initcall' #define module_init(x) __initcall(x); ^~~~~~~~~~ include/linux/device.h:1506:1: note: in expansion of macro 'module_init' module_init(__driver##_init); \ ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/hdmi.h:28:0, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/device.h:1503:1: error: parameter '__initcall_tda998x_driver_init6' is initialized
{ \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ include/linux/device.h:1503:1: warning: '__used__' attribute ignored [-Wattributes] { \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/printk.h:5:0, from include/linux/kernel.h:13, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/hdmi.h:28, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/init.h:165:20: error: section attribute not allowed for '__initcall_tda998x_driver_init6'
static initcall_t __initcall_##fn##id __used \ ^ include/linux/init.h:195:30: note: in expansion of macro '__define_initcall' #define device_initcall(fn) __define_initcall(fn, 6) ^~~~~~~~~~~~~~~~~ include/linux/init.h:200:24: note: in expansion of macro 'device_initcall' #define __initcall(fn) device_initcall(fn) ^~~~~~~~~~~~~~~ include/linux/module.h:85:24: note: in expansion of macro '__initcall' #define module_init(x) __initcall(x); ^~~~~~~~~~ include/linux/device.h:1506:1: note: in expansion of macro 'module_init' module_init(__driver##_init); \ ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~
drivers/gpu//drm/i2c/tda998x_drv.c:1765:19: error: 'tda998x_driver_init' undeclared (first use in this function)
module_i2c_driver(tda998x_driver); ^ include/linux/init.h:166:58: note: in definition of macro '__define_initcall' __attribute__((__section__(".initcall" #id ".init"))) = fn; ^~ include/linux/init.h:200:24: note: in expansion of macro 'device_initcall' #define __initcall(fn) device_initcall(fn) ^~~~~~~~~~~~~~~ include/linux/module.h:85:24: note: in expansion of macro '__initcall' #define module_init(x) __initcall(x); ^~~~~~~~~~ include/linux/device.h:1506:1: note: in expansion of macro 'module_init' module_init(__driver##_init); \ ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from drivers/gpu//drm/i2c/tda998x_drv.c:20:0: include/linux/module.h:85:37: error: expected declaration specifiers before ';' token #define module_init(x) __initcall(x); ^ include/linux/device.h:1506:1: note: in expansion of macro 'module_init' module_init(__driver##_init); \ ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/hdmi.h:28:0, from drivers/gpu//drm/i2c/tda998x_drv.c:19: include/linux/device.h:1506:29: error: expected declaration specifiers before ';' token module_init(__driver##_init); \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ include/linux/device.h:1508:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/printk.h:5:0, from include/linux/kernel.h:13, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/hdmi.h:28, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/init.h:203:20: error: storage class specified for parameter '__exitcall_tda998x_driver_exit'
static exitcall_t __exitcall_##fn __exit_call = fn ^ include/linux/module.h:97:24: note: in expansion of macro '__exitcall' #define module_exit(x) __exitcall(x); ^~~~~~~~~~ include/linux/device.h:1511:1: note: in expansion of macro 'module_exit' module_exit(__driver##_exit); ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/hdmi.h:28:0, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/device.h:1508:1: error: parameter '__exitcall_tda998x_driver_exit' is initialized
{ \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ include/linux/device.h:1508:1: warning: '__used__' attribute ignored [-Wattributes] { \ ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/printk.h:5:0, from include/linux/kernel.h:13, from include/linux/list.h:8, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/hdmi.h:28, from drivers/gpu//drm/i2c/tda998x_drv.c:19:
include/linux/init.h:203:20: error: section attribute not allowed for '__exitcall_tda998x_driver_exit'
static exitcall_t __exitcall_##fn __exit_call = fn ^ include/linux/module.h:97:24: note: in expansion of macro '__exitcall' #define module_exit(x) __exitcall(x); ^~~~~~~~~~ include/linux/device.h:1511:1: note: in expansion of macro 'module_exit' module_exit(__driver##_exit); ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~
drivers/gpu//drm/i2c/tda998x_drv.c:1765:19: error: 'tda998x_driver_exit' undeclared (first use in this function)
module_i2c_driver(tda998x_driver); ^ include/linux/init.h:203:50: note: in definition of macro '__exitcall' static exitcall_t __exitcall_##fn __exit_call = fn ^~ include/linux/device.h:1511:1: note: in expansion of macro 'module_exit' module_exit(__driver##_exit); ^~~~~~~~~~~ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ In file included from include/linux/hdmi.h:28:0, from drivers/gpu//drm/i2c/tda998x_drv.c:19: include/linux/device.h:1511:29: error: expected declaration specifiers before ';' token module_exit(__driver##_exit); ^ include/linux/i2c.h:780:2: note: in expansion of macro 'module_driver' module_driver(__i2c_driver, i2c_add_driver, \ ^~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:1: note: in expansion of macro 'module_i2c_driver' module_i2c_driver(tda998x_driver); ^~~~~~~~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1765:34: error: expected declaration specifiers before ';' token module_i2c_driver(tda998x_driver); ^ In file included from include/linux/module.h:18:0, from drivers/gpu//drm/i2c/tda998x_drv.c:20: include/linux/moduleparam.h:27:3: warning: empty declaration struct __UNIQUE_ID(name) {} ^ include/linux/module.h:160:32: note: in expansion of macro '__MODULE_INFO' #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) ^~~~~~~~~~~~~ include/linux/module.h:204:32: note: in expansion of macro 'MODULE_INFO' #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) ^~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1767:1: note: in expansion of macro 'MODULE_AUTHOR' MODULE_AUTHOR("Rob Clark <robdclark@gmail.com"); ^~~~~~~~~~~~~ include/linux/moduleparam.h:27:3: warning: empty declaration struct __UNIQUE_ID(name) {} ^ include/linux/module.h:160:32: note: in expansion of macro '__MODULE_INFO' #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) ^~~~~~~~~~~~~ include/linux/module.h:207:42: note: in expansion of macro 'MODULE_INFO' #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) ^~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1768:1: note: in expansion of macro 'MODULE_DESCRIPTION' MODULE_DESCRIPTION("NXP Semiconductors TDA998X HDMI Encoder"); ^~~~~~~~~~~~~~~~~~ include/linux/moduleparam.h:27:3: warning: empty declaration struct __UNIQUE_ID(name) {} ^ include/linux/module.h:160:32: note: in expansion of macro '__MODULE_INFO' #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) ^~~~~~~~~~~~~ include/linux/module.h:198:34: note: in expansion of macro 'MODULE_INFO' #define MODULE_LICENSE(_license) MODULE_INFO(license, _license) ^~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1769:1: note: in expansion of macro 'MODULE_LICENSE' MODULE_LICENSE("GPL"); ^~~~~~~~~~~~~~ In file included from drivers/gpu//drm/i2c/tda998x_drv.c:29:0: include/drm/drm_of.h:33:26: error: old-style parameter declarations in prototyped function definition struct backlight_device *devm_drm_of_find_backlight(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/linux/component.h:4, from drivers/gpu//drm/i2c/tda998x_drv.c:18: include/linux/compiler-gcc.h:190:45: error: expected '{' at end of input #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ^ include/linux/compiler.h:52:23: note: in definition of macro '___PASTE' #define ___PASTE(a,b) a##b ^ include/linux/compiler-gcc.h:190:29: note: in expansion of macro '__PASTE' #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ^~~~~~~ include/linux/compiler.h:53:22: note: in expansion of macro '___PASTE' #define __PASTE(a,b) ___PASTE(a,b) ^~~~~~~~ include/linux/compiler-gcc.h:190:37: note: in expansion of macro '__PASTE' #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ^~~~~~~ include/linux/moduleparam.h:27:10: note: in expansion of macro '__UNIQUE_ID' struct __UNIQUE_ID(name) {} ^~~~~~~~~~~ include/linux/module.h:160:32: note: in expansion of macro '__MODULE_INFO' #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) ^~~~~~~~~~~~~ include/linux/module.h:198:34: note: in expansion of macro 'MODULE_INFO' #define MODULE_LICENSE(_license) MODULE_INFO(license, _license) ^~~~~~~~~~~ drivers/gpu//drm/i2c/tda998x_drv.c:1769:1: note: in expansion of macro 'MODULE_LICENSE' MODULE_LICENSE("GPL"); ..
vim +/__initcall_tda998x_driver_init6 +165 include/linux/init.h
^1da177e Linus Torvalds 2005-04-16 147 b67067f1 Nicholas Piggin 2016-08-24 148 /* b67067f1 Nicholas Piggin 2016-08-24 149 * initcalls are now grouped by functionality into separate ^1da177e Linus Torvalds 2005-04-16 150 * subsections. Ordering inside the subsections is determined ^1da177e Linus Torvalds 2005-04-16 151 * by link order. ^1da177e Linus Torvalds 2005-04-16 152 * For backwards compatibility, initcall() puts the call in ^1da177e Linus Torvalds 2005-04-16 153 * the device init subsection. 735a7ffb Andrew Morton 2006-10-27 154 * 735a7ffb Andrew Morton 2006-10-27 155 * The `id' arg to __define_initcall() is needed so that multiple initcalls 735a7ffb Andrew Morton 2006-10-27 156 * can point at the same handler without causing duplicate-symbol build errors. b67067f1 Nicholas Piggin 2016-08-24 157 * b67067f1 Nicholas Piggin 2016-08-24 158 * Initcalls are run by placing pointers in initcall sections that the b67067f1 Nicholas Piggin 2016-08-24 159 * kernel iterates at runtime. The linker can do dead code / data elimination b67067f1 Nicholas Piggin 2016-08-24 160 * and remove that completely, so the initcall sections have to be marked b67067f1 Nicholas Piggin 2016-08-24 161 * as KEEP() in the linker script. ^1da177e Linus Torvalds 2005-04-16 162 */ ^1da177e Linus Torvalds 2005-04-16 163 7929d407 Matthew Leach 2012-12-17 164 #define __define_initcall(fn, id) \ 3ff6eecc Adrian Bunk 2008-01-24 @165 static initcall_t __initcall_##fn##id __used \ b67067f1 Nicholas Piggin 2016-08-24 166 __attribute__((__section__(".initcall" #id ".init"))) = fn; ^1da177e Linus Torvalds 2005-04-16 167 b3438f82 Linus Torvalds 2006-11-20 168 /* c2147a50 Eduard - Gabriel Munteanu 2008-07-25 169 * Early initcalls run before initializing SMP. c2147a50 Eduard - Gabriel Munteanu 2008-07-25 170 * c2147a50 Eduard - Gabriel Munteanu 2008-07-25 171 * Only for built-in code, not modules. c2147a50 Eduard - Gabriel Munteanu 2008-07-25 172 */ 7929d407 Matthew Leach 2012-12-17 173 #define early_initcall(fn) __define_initcall(fn, early) c2147a50 Eduard - Gabriel Munteanu 2008-07-25 174 c2147a50 Eduard - Gabriel Munteanu 2008-07-25 175 /* b3438f82 Linus Torvalds 2006-11-20 176 * A "pure" initcall has no dependencies on anything else, and purely b3438f82 Linus Torvalds 2006-11-20 177 * initializes variables that couldn't be statically initialized. b3438f82 Linus Torvalds 2006-11-20 178 * b3438f82 Linus Torvalds 2006-11-20 179 * This only exists for built-in code, not for modules. 96263d28 Jim Cromie 2012-06-14 180 * Keep main.c:initcall_level_names[] in sync. b3438f82 Linus Torvalds 2006-11-20 181 */ 7929d407 Matthew Leach 2012-12-17 182 #define pure_initcall(fn) __define_initcall(fn, 0) 7929d407 Matthew Leach 2012-12-17 183 7929d407 Matthew Leach 2012-12-17 184 #define core_initcall(fn) __define_initcall(fn, 1) 7929d407 Matthew Leach 2012-12-17 185 #define core_initcall_sync(fn) __define_initcall(fn, 1s) 7929d407 Matthew Leach 2012-12-17 186 #define postcore_initcall(fn) __define_initcall(fn, 2) 7929d407 Matthew Leach 2012-12-17 187 #define postcore_initcall_sync(fn) __define_initcall(fn, 2s) 7929d407 Matthew Leach 2012-12-17 188 #define arch_initcall(fn) __define_initcall(fn, 3) 7929d407 Matthew Leach 2012-12-17 189 #define arch_initcall_sync(fn) __define_initcall(fn, 3s) 7929d407 Matthew Leach 2012-12-17 190 #define subsys_initcall(fn) __define_initcall(fn, 4) 7929d407 Matthew Leach 2012-12-17 191 #define subsys_initcall_sync(fn) __define_initcall(fn, 4s) 7929d407 Matthew Leach 2012-12-17 192 #define fs_initcall(fn) __define_initcall(fn, 5) 7929d407 Matthew Leach 2012-12-17 193 #define fs_initcall_sync(fn) __define_initcall(fn, 5s) 7929d407 Matthew Leach 2012-12-17 194 #define rootfs_initcall(fn) __define_initcall(fn, rootfs) 7929d407 Matthew Leach 2012-12-17 195 #define device_initcall(fn) __define_initcall(fn, 6) 7929d407 Matthew Leach 2012-12-17 196 #define device_initcall_sync(fn) __define_initcall(fn, 6s) 7929d407 Matthew Leach 2012-12-17 197 #define late_initcall(fn) __define_initcall(fn, 7) 7929d407 Matthew Leach 2012-12-17 198 #define late_initcall_sync(fn) __define_initcall(fn, 7s) ^1da177e Linus Torvalds 2005-04-16 199 ^1da177e Linus Torvalds 2005-04-16 200 #define __initcall(fn) device_initcall(fn) ^1da177e Linus Torvalds 2005-04-16 201 ^1da177e Linus Torvalds 2005-04-16 202 #define __exitcall(fn) \ ^1da177e Linus Torvalds 2005-04-16 @203 static exitcall_t __exitcall_##fn __exit_call = fn ^1da177e Linus Torvalds 2005-04-16 204
:::::: The code at line 165 was first introduced by commit :::::: 3ff6eecca4e5c49a5d1dd8b58ea0e20102ce08f0 remove __attribute_used__
:::::: TO: Adrian Bunk bunk@kernel.org :::::: CC: Sam Ravnborg sam@ravnborg.org
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
dri-devel@lists.freedesktop.org