Re: [Patch] Staging: media: bcm2048: fixed errors and warnings
From: kbuild test robot
Date: Fri Feb 10 2017 - 09:30:14 EST
Hi Ran,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.10-rc7 next-20170210]
[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/Ran-Algawi/Staging-media-bcm2048-fixed-errors-and-warnings/20170210-174451
base: git://linuxtv.org/media_tree.git master
config: i386-allmodconfig (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 errors (new ones prefixed by >>):
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2023:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(power_state, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2024:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(mute, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2025:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(audio_route, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2026:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(dac_output, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2028:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2029:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2030:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2031:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2032:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2033:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2034:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2035:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2036:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, int, "%u", value > 3)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2038:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2039:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2040:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2041:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2042:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2043:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(rds_wline, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/bcm2048/radio-bcm2048.c:1995:64: error: expected identifier or '(' before '{' token
#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
^
drivers/staging/media/bcm2048/radio-bcm2048.c:2055:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY'
DEFINE_SYSFS_PROPERTY(region, unsigned int, int, "%u", 0)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kobject.h:21:0,
from include/linux/module.h:17,
from drivers/staging/media/bcm2048/radio-bcm2048.c:33:
vim +1995 drivers/staging/media/bcm2048/radio-bcm2048.c
1989 \
1990 value = bcm2048_get_##prop(bdev); \
1991 \
1992 return sprintf(buf, mask "\n", value); \
1993 }
1994
> 1995 #define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) { \
1996 property_write(prop, signal size, mask, check) \
1997 property_read(prop, size, mask) }
1998
1999 #define property_str_read(prop, size) \
2000 static ssize_t bcm2048_##prop##_read(struct device *dev, \
2001 struct device_attribute *attr, \
2002 char *buf) \
2003 { \
2004 struct bcm2048_device *bdev = dev_get_drvdata(dev); \
2005 int count; \
2006 u8 *out; \
2007 \
2008 if (!bdev) \
2009 return -ENODEV; \
2010 \
2011 out = kzalloc(size + 1, GFP_KERNEL); \
2012 if (!out) \
2013 return -ENOMEM; \
2014 \
2015 bcm2048_get_##prop(bdev, out); \
2016 count = sprintf(buf, "%s\n", out); \
2017 \
2018 kfree(out); \
2019 \
2020 return count; \
2021 }
2022
2023 DEFINE_SYSFS_PROPERTY(power_state, unsigned int, int, "%u", 0)
2024 DEFINE_SYSFS_PROPERTY(mute, unsigned int, int, "%u", 0)
2025 DEFINE_SYSFS_PROPERTY(audio_route, unsigned int, int, "%u", 0)
2026 DEFINE_SYSFS_PROPERTY(dac_output, unsigned int, int, "%u", 0)
2027
2028 DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned int, int, "%u", 0)
2029 DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned int, int, "%u", 0)
2030 DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned int, int, "%u", 0)
2031 DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, int, "%u", 0)
2032 DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, int, "%u", 0)
2033 DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, int, "%u", 0)
2034 DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, int, "%u", 0)
2035 DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, int, "%u", 0)
2036 DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, int, "%u", value > 3)
2037
2038 DEFINE_SYSFS_PROPERTY(rds, unsigned int, int, "%u", 0)
2039 DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, int, "%u", 0)
2040 DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, int, "%u", 0)
2041 DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, int, "%u", 0)
2042 DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned int, int, "%u", 0)
2043 DEFINE_SYSFS_PROPERTY(rds_wline, unsigned int, int, "%u", 0)
2044 property_read(rds_pi, unsigned int, "%x")
2045 property_str_read(rds_rt, (BCM2048_MAX_RDS_RT + 1))
2046 property_str_read(rds_ps, (BCM2048_MAX_RDS_PS + 1))
2047
2048 property_read(fm_rds_flags, unsigned int, "%u")
2049 property_str_read(rds_data, BCM2048_MAX_RDS_RADIO_TEXT * 5)
2050
2051 property_read(region_bottom_frequency, unsigned int, "%u")
2052 property_read(region_top_frequency, unsigned int, "%u")
2053 property_signed_read(fm_carrier_error, int, "%d")
2054 property_signed_read(fm_rssi, int, "%d")
2055 DEFINE_SYSFS_PROPERTY(region, unsigned int, int, "%u", 0)
2056
2057 static struct device_attribute attrs[] = {
> 2058 __ATTR(power_state, 0644, bcm2048_power_state_read,
> 2059 bcm2048_power_state_write),
> 2060 __ATTR(mute, 0644, bcm2048_mute_read,
> 2061 bcm2048_mute_write),
> 2062 __ATTR(audio_route, 0644, bcm2048_audio_route_read,
> 2063 bcm2048_audio_route_write),
> 2064 __ATTR(dac_output, 0644, bcm2048_dac_output_read,
> 2065 bcm2048_dac_output_write),
2066 __ATTR(fm_hi_lo_injection, 0644,
> 2067 bcm2048_fm_hi_lo_injection_read,
> 2068 bcm2048_fm_hi_lo_injection_write),
> 2069 __ATTR(fm_frequency, 0644, bcm2048_fm_frequency_read,
> 2070 bcm2048_fm_frequency_write),
2071 __ATTR(fm_af_frequency, 0644,
> 2072 bcm2048_fm_af_frequency_read,
> 2073 bcm2048_fm_af_frequency_write),
> 2074 __ATTR(fm_deemphasis, 0644, bcm2048_fm_deemphasis_read,
> 2075 bcm2048_fm_deemphasis_write),
> 2076 __ATTR(fm_rds_mask, 0644, bcm2048_fm_rds_mask_read,
> 2077 bcm2048_fm_rds_mask_write),
2078 __ATTR(fm_best_tune_mode, 0644,
> 2079 bcm2048_fm_best_tune_mode_read,
> 2080 bcm2048_fm_best_tune_mode_write),
2081 __ATTR(fm_search_rssi_threshold, 0644,
> 2082 bcm2048_fm_search_rssi_threshold_read,
> 2083 bcm2048_fm_search_rssi_threshold_write),
2084 __ATTR(fm_search_mode_direction, 0644,
> 2085 bcm2048_fm_search_mode_direction_read,
> 2086 bcm2048_fm_search_mode_direction_write),
2087 __ATTR(fm_search_tune_mode, 0644,
> 2088 bcm2048_fm_search_tune_mode_read,
> 2089 bcm2048_fm_search_tune_mode_write),
> 2090 __ATTR(rds, 0644, bcm2048_rds_read,
> 2091 bcm2048_rds_write),
2092 __ATTR(rds_b_block_mask, 0644,
> 2093 bcm2048_rds_b_block_mask_read,
> 2094 bcm2048_rds_b_block_mask_write),
2095 __ATTR(rds_b_block_match, 0644,
> 2096 bcm2048_rds_b_block_match_read,
> 2097 bcm2048_rds_b_block_match_write),
> 2098 __ATTR(rds_pi_mask, 0644, bcm2048_rds_pi_mask_read,
> 2099 bcm2048_rds_pi_mask_write),
> 2100 __ATTR(rds_pi_match, 0644, bcm2048_rds_pi_match_read,
> 2101 bcm2048_rds_pi_match_write),
> 2102 __ATTR(rds_wline, 0644, bcm2048_rds_wline_read,
> 2103 bcm2048_rds_wline_write),
2104 __ATTR(rds_pi, 0444, bcm2048_rds_pi_read, NULL),
2105 __ATTR(rds_rt, 0444, bcm2048_rds_rt_read, NULL),
2106 __ATTR(rds_ps, 0444, bcm2048_rds_ps_read, NULL),
2107 __ATTR(fm_rds_flags, 0444, bcm2048_fm_rds_flags_read, NULL),
2108 __ATTR(region_bottom_frequency, 0444,
2109 bcm2048_region_bottom_frequency_read, NULL),
2110 __ATTR(region_top_frequency, 0444,
2111 bcm2048_region_top_frequency_read, NULL),
2112 __ATTR(fm_carrier_error, 0444,
2113 bcm2048_fm_carrier_error_read, NULL),
2114 __ATTR(fm_rssi, 0444,
2115 bcm2048_fm_rssi_read, NULL),
> 2116 __ATTR(region, 0644, bcm2048_region_read,
> 2117 bcm2048_region_write),
2118 __ATTR(rds_data, 0444, bcm2048_rds_data_read, NULL),
2119 };
2120
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip