Hi Lukas, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v5.2-rc6 next-20190625] [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/Lukas-Schneider/media-bcm2048-Macros-with-complex-values-should-be-enclosed-in-parentheses/20190628-003532 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-x074-201925 (attached as .config) compiler: gcc-7 (Debian 7.4.0-9) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): >> drivers/staging/media/bcm2048/radio-bcm2048.c:2004:1: error: expected identifier or '(' before 'do' do { \ ^ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2033:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(power_state, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2033:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(power_state, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2034:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(mute, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2035:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(audio_route, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2036:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(dac_output, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2038:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2039:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2040:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2041:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2042:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2043:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2044:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2045:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2046:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, "%u", value > 3) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2048:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2049:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2050:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging/media/bcm2048/radio-bcm2048.c:2051:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ -- drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2041:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2042:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2043:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2044:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2045:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2046:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, "%u", value > 3) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2048:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2049:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2050:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2051:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2052:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2053:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(rds_wline, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2004:1: error: expected identifier or '(' before 'do' do { \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2065:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(region, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2007:3: error: expected identifier or '(' before 'while' } while (0) \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2065:1: note: in expansion of macro 'DEFINE_SYSFS_PROPERTY' DEFINE_SYSFS_PROPERTY(region, unsigned int, "%u", 0) ^~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c: In function 'bcm2048_sysfs_unregister_properties': drivers/staging//media/bcm2048/radio-bcm2048.c:2137:43: error: 'attrs' undeclared (first use in this function); did you mean 'iattr'? device_remove_file(&bdev->client->dev, &attrs[i]); ^~~~~ iattr drivers/staging//media/bcm2048/radio-bcm2048.c:2137:43: note: each undeclared identifier is reported only once for each function it appears in In file included from drivers/staging//media/bcm2048/radio-bcm2048.c:33:0: drivers/staging//media/bcm2048/radio-bcm2048.c: In function 'bcm2048_sysfs_register_properties': drivers/staging//media/bcm2048/radio-bcm2048.c:2147:29: error: 'attrs' undeclared (first use in this function); did you mean 'iattr'? for (i = 0; i < ARRAY_SIZE(attrs); i++) { ^ include/linux/kernel.h:47:33: note: in definition of macro 'ARRAY_SIZE' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~ In file included from include/linux/kernel.h:16:0, from drivers/staging//media/bcm2048/radio-bcm2048.c:33: >> include/linux/build_bug.h:16:45: error: bit-field '<anonymous>' width not an integer constant #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) ^ include/linux/compiler.h:352:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2147:18: note: in expansion of macro 'ARRAY_SIZE' for (i = 0; i < ARRAY_SIZE(attrs); i++) { ^~~~~~~~~~ In file included from drivers/staging//media/bcm2048/radio-bcm2048.c:33:0: drivers/staging//media/bcm2048/radio-bcm2048.c: In function 'bcm2048_i2c_driver_probe': drivers/staging//media/bcm2048/radio-bcm2048.c:2630:55: error: 'attrs' undeclared (first use in this function); did you mean 'iattr'? bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs)); ^ include/linux/kernel.h:47:33: note: in definition of macro 'ARRAY_SIZE' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~ In file included from include/linux/kernel.h:16:0, from drivers/staging//media/bcm2048/radio-bcm2048.c:33: >> include/linux/build_bug.h:16:45: error: bit-field '<anonymous>' width not an integer constant #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) ^ include/linux/compiler.h:352:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2630:44: note: in expansion of macro 'ARRAY_SIZE' bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs)); ^~~~~~~~~~ In file included from drivers/staging//media/bcm2048/radio-bcm2048.c:33:0: drivers/staging//media/bcm2048/radio-bcm2048.c: In function 'bcm2048_i2c_driver_remove': drivers/staging//media/bcm2048/radio-bcm2048.c:2651:56: error: 'attrs' undeclared (first use in this function); did you mean 'iattr'? bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs)); ^ include/linux/kernel.h:47:33: note: in definition of macro 'ARRAY_SIZE' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~ In file included from include/linux/kernel.h:16:0, from drivers/staging//media/bcm2048/radio-bcm2048.c:33: >> include/linux/build_bug.h:16:45: error: bit-field '<anonymous>' width not an integer constant #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) ^ include/linux/compiler.h:352:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2651:45: note: in expansion of macro 'ARRAY_SIZE' bcm2048_sysfs_unregister_properties(bdev, ARRAY_SIZE(attrs)); ^~~~~~~~~~ At top level: drivers/staging//media/bcm2048/radio-bcm2048.c:1988:16: warning: 'bcm2048_fm_rssi_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2064:1: note: in expansion of macro 'property_signed_read' property_signed_read(fm_rssi, int, "%d") ^~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1988:16: warning: 'bcm2048_fm_carrier_error_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2063:1: note: in expansion of macro 'property_signed_read' property_signed_read(fm_carrier_error, int, "%d") ^~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1969:16: warning: 'bcm2048_region_top_frequency_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2062:1: note: in expansion of macro 'property_read' property_read(region_top_frequency, "%u") ^~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1969:16: warning: 'bcm2048_region_bottom_frequency_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2061:1: note: in expansion of macro 'property_read' property_read(region_bottom_frequency, "%u") ^~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2010:16: warning: 'bcm2048_rds_data_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2059:1: note: in expansion of macro 'property_str_read' property_str_read(rds_data, BCM2048_MAX_RDS_RADIO_TEXT * 5) ^~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1969:16: warning: 'bcm2048_fm_rds_flags_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2058:1: note: in expansion of macro 'property_read' property_read(fm_rds_flags, "%u") ^~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2010:16: warning: 'bcm2048_rds_ps_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2056:1: note: in expansion of macro 'property_str_read' property_str_read(rds_ps, (BCM2048_MAX_RDS_PS + 1)) ^~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:2010:16: warning: 'bcm2048_rds_rt_read' defined but not used [-Wunused-function] static ssize_t bcm2048_##prop##_read(struct device *dev, \ ^ drivers/staging//media/bcm2048/radio-bcm2048.c:2055:1: note: in expansion of macro 'property_str_read' property_str_read(rds_rt, (BCM2048_MAX_RDS_RT + 1)) ^~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1243:12: warning: 'bcm2048_get_fm_best_tune_mode' defined but not used [-Wunused-function] static int bcm2048_get_fm_best_tune_mode(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1222:12: warning: 'bcm2048_set_fm_best_tune_mode' defined but not used [-Wunused-function] static int bcm2048_set_fm_best_tune_mode(struct bcm2048_device *bdev, u8 mode) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1176:12: warning: 'bcm2048_get_fm_rds_mask' defined but not used [-Wunused-function] static int bcm2048_get_fm_rds_mask(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1163:12: warning: 'bcm2048_set_fm_rds_mask' defined but not used [-Wunused-function] static int bcm2048_set_fm_rds_mask(struct bcm2048_device *bdev, u16 mask) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1145:12: warning: 'bcm2048_get_rds_pi_match' defined but not used [-Wunused-function] static int bcm2048_get_rds_pi_match(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1130:12: warning: 'bcm2048_set_rds_pi_match' defined but not used [-Wunused-function] static int bcm2048_set_rds_pi_match(struct bcm2048_device *bdev, u16 match) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1112:12: warning: 'bcm2048_get_rds_pi_mask' defined but not used [-Wunused-function] static int bcm2048_get_rds_pi_mask(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1099:12: warning: 'bcm2048_set_rds_pi_mask' defined but not used [-Wunused-function] static int bcm2048_set_rds_pi_mask(struct bcm2048_device *bdev, u16 mask) ^~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1081:12: warning: 'bcm2048_get_rds_b_block_match' defined but not used [-Wunused-function] static int bcm2048_get_rds_b_block_match(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1065:12: warning: 'bcm2048_set_rds_b_block_match' defined but not used [-Wunused-function] static int bcm2048_set_rds_b_block_match(struct bcm2048_device *bdev, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1047:12: warning: 'bcm2048_get_rds_b_block_mask' defined but not used [-Wunused-function] static int bcm2048_get_rds_b_block_mask(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1032:12: warning: 'bcm2048_set_rds_b_block_mask' defined but not used [-Wunused-function] static int bcm2048_set_rds_b_block_mask(struct bcm2048_device *bdev, u16 mask) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:1014:12: warning: 'bcm2048_get_fm_search_tune_mode' defined but not used [-Wunused-function] static int bcm2048_get_fm_search_tune_mode(struct bcm2048_device *bdev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging//media/bcm2048/radio-bcm2048.c:941:12: warning: 'bcm2048_get_fm_search_mode_direction' defined but not used [-Wunused-function] vim +2004 drivers/staging/media/bcm2048/radio-bcm2048.c 1986 1987 #define property_signed_read(prop, size, mask) \ > 1988 static ssize_t bcm2048_##prop##_read(struct device *dev, \ 1989 struct device_attribute *attr, \ 1990 char *buf) \ 1991 { \ 1992 struct bcm2048_device *bdev = dev_get_drvdata(dev); \ 1993 size value; \ 1994 \ 1995 if (!bdev) \ 1996 return -ENODEV; \ 1997 \ 1998 value = bcm2048_get_##prop(bdev); \ 1999 \ 2000 return sprintf(buf, mask "\n", value); \ 2001 } 2002 2003 #define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check) \ > 2004 do { \ 2005 property_write(prop, prop_type, mask, check) \ 2006 property_read(prop, mask) \ > 2007 } while (0) \ 2008 2009 #define property_str_read(prop, size) \ 2010 static ssize_t bcm2048_##prop##_read(struct device *dev, \ 2011 struct device_attribute *attr, \ 2012 char *buf) \ 2013 { \ 2014 struct bcm2048_device *bdev = dev_get_drvdata(dev); \ 2015 int count; \ 2016 u8 *out; \ 2017 \ 2018 if (!bdev) \ 2019 return -ENODEV; \ 2020 \ 2021 out = kzalloc((size) + 1, GFP_KERNEL); \ 2022 if (!out) \ 2023 return -ENOMEM; \ 2024 \ 2025 bcm2048_get_##prop(bdev, out); \ 2026 count = sprintf(buf, "%s\n", out); \ 2027 \ 2028 kfree(out); \ 2029 \ 2030 return count; \ 2031 } 2032 > 2033 DEFINE_SYSFS_PROPERTY(power_state, unsigned int, "%u", 0) 2034 DEFINE_SYSFS_PROPERTY(mute, unsigned int, "%u", 0) 2035 DEFINE_SYSFS_PROPERTY(audio_route, unsigned int, "%u", 0) 2036 DEFINE_SYSFS_PROPERTY(dac_output, unsigned int, "%u", 0) 2037 2038 DEFINE_SYSFS_PROPERTY(fm_hi_lo_injection, unsigned int, "%u", 0) 2039 DEFINE_SYSFS_PROPERTY(fm_frequency, unsigned int, "%u", 0) 2040 DEFINE_SYSFS_PROPERTY(fm_af_frequency, unsigned int, "%u", 0) 2041 DEFINE_SYSFS_PROPERTY(fm_deemphasis, unsigned int, "%u", 0) 2042 DEFINE_SYSFS_PROPERTY(fm_rds_mask, unsigned int, "%u", 0) 2043 DEFINE_SYSFS_PROPERTY(fm_best_tune_mode, unsigned int, "%u", 0) 2044 DEFINE_SYSFS_PROPERTY(fm_search_rssi_threshold, unsigned int, "%u", 0) 2045 DEFINE_SYSFS_PROPERTY(fm_search_mode_direction, unsigned int, "%u", 0) 2046 DEFINE_SYSFS_PROPERTY(fm_search_tune_mode, unsigned int, "%u", value > 3) 2047 2048 DEFINE_SYSFS_PROPERTY(rds, unsigned int, "%u", 0) 2049 DEFINE_SYSFS_PROPERTY(rds_b_block_mask, unsigned int, "%u", 0) 2050 DEFINE_SYSFS_PROPERTY(rds_b_block_match, unsigned int, "%u", 0) 2051 DEFINE_SYSFS_PROPERTY(rds_pi_mask, unsigned int, "%u", 0) 2052 DEFINE_SYSFS_PROPERTY(rds_pi_match, unsigned int, "%u", 0) 2053 DEFINE_SYSFS_PROPERTY(rds_wline, unsigned int, "%u", 0) 2054 property_read(rds_pi, "%x") 2055 property_str_read(rds_rt, (BCM2048_MAX_RDS_RT + 1)) 2056 property_str_read(rds_ps, (BCM2048_MAX_RDS_PS + 1)) 2057 2058 property_read(fm_rds_flags, "%u") 2059 property_str_read(rds_data, BCM2048_MAX_RDS_RADIO_TEXT * 5) 2060 2061 property_read(region_bottom_frequency, "%u") > 2062 property_read(region_top_frequency, "%u") 2063 property_signed_read(fm_carrier_error, int, "%d") > 2064 property_signed_read(fm_rssi, int, "%d") 2065 DEFINE_SYSFS_PROPERTY(region, unsigned int, "%u", 0) 2066 2067 static struct device_attribute attrs[] = { 2068 __ATTR(power_state, 0644, bcm2048_power_state_read, 2069 bcm2048_power_state_write), 2070 __ATTR(mute, 0644, bcm2048_mute_read, 2071 bcm2048_mute_write), 2072 __ATTR(audio_route, 0644, bcm2048_audio_route_read, 2073 bcm2048_audio_route_write), 2074 __ATTR(dac_output, 0644, bcm2048_dac_output_read, 2075 bcm2048_dac_output_write), 2076 __ATTR(fm_hi_lo_injection, 0644, 2077 bcm2048_fm_hi_lo_injection_read, 2078 bcm2048_fm_hi_lo_injection_write), 2079 __ATTR(fm_frequency, 0644, bcm2048_fm_frequency_read, 2080 bcm2048_fm_frequency_write), 2081 __ATTR(fm_af_frequency, 0644, 2082 bcm2048_fm_af_frequency_read, 2083 bcm2048_fm_af_frequency_write), 2084 __ATTR(fm_deemphasis, 0644, bcm2048_fm_deemphasis_read, 2085 bcm2048_fm_deemphasis_write), 2086 __ATTR(fm_rds_mask, 0644, bcm2048_fm_rds_mask_read, 2087 bcm2048_fm_rds_mask_write), 2088 __ATTR(fm_best_tune_mode, 0644, 2089 bcm2048_fm_best_tune_mode_read, 2090 bcm2048_fm_best_tune_mode_write), 2091 __ATTR(fm_search_rssi_threshold, 0644, 2092 bcm2048_fm_search_rssi_threshold_read, 2093 bcm2048_fm_search_rssi_threshold_write), 2094 __ATTR(fm_search_mode_direction, 0644, 2095 bcm2048_fm_search_mode_direction_read, 2096 bcm2048_fm_search_mode_direction_write), 2097 __ATTR(fm_search_tune_mode, 0644, 2098 bcm2048_fm_search_tune_mode_read, 2099 bcm2048_fm_search_tune_mode_write), 2100 __ATTR(rds, 0644, bcm2048_rds_read, 2101 bcm2048_rds_write), 2102 __ATTR(rds_b_block_mask, 0644, 2103 bcm2048_rds_b_block_mask_read, 2104 bcm2048_rds_b_block_mask_write), 2105 __ATTR(rds_b_block_match, 0644, 2106 bcm2048_rds_b_block_match_read, 2107 bcm2048_rds_b_block_match_write), 2108 __ATTR(rds_pi_mask, 0644, bcm2048_rds_pi_mask_read, 2109 bcm2048_rds_pi_mask_write), 2110 __ATTR(rds_pi_match, 0644, bcm2048_rds_pi_match_read, 2111 bcm2048_rds_pi_match_write), 2112 __ATTR(rds_wline, 0644, bcm2048_rds_wline_read, 2113 bcm2048_rds_wline_write), 2114 __ATTR(rds_pi, 0444, bcm2048_rds_pi_read, NULL), 2115 __ATTR(rds_rt, 0444, bcm2048_rds_rt_read, NULL), 2116 __ATTR(rds_ps, 0444, bcm2048_rds_ps_read, NULL), 2117 __ATTR(fm_rds_flags, 0444, bcm2048_fm_rds_flags_read, NULL), 2118 __ATTR(region_bottom_frequency, 0444, 2119 bcm2048_region_bottom_frequency_read, NULL), 2120 __ATTR(region_top_frequency, 0444, 2121 bcm2048_region_top_frequency_read, NULL), 2122 __ATTR(fm_carrier_error, 0444, 2123 bcm2048_fm_carrier_error_read, NULL), 2124 __ATTR(fm_rssi, 0444, 2125 bcm2048_fm_rssi_read, NULL), 2126 __ATTR(region, 0644, bcm2048_region_read, 2127 bcm2048_region_write), 2128 __ATTR(rds_data, 0444, bcm2048_rds_data_read, NULL), 2129 }; 2130 2131 static int bcm2048_sysfs_unregister_properties(struct bcm2048_device *bdev, 2132 int size) 2133 { 2134 int i; 2135 2136 for (i = 0; i < size; i++) > 2137 device_remove_file(&bdev->client->dev, &attrs[i]); 2138 2139 return 0; 2140 } 2141 2142 static int bcm2048_sysfs_register_properties(struct bcm2048_device *bdev) 2143 { 2144 int err = 0; 2145 int i; 2146 > 2147 for (i = 0; i < ARRAY_SIZE(attrs); i++) { 2148 if (device_create_file(&bdev->client->dev, &attrs[i]) != 0) { 2149 dev_err(&bdev->client->dev, 2150 "could not register sysfs entry\n"); 2151 err = -EBUSY; 2152 bcm2048_sysfs_unregister_properties(bdev, i); 2153 break; 2154 } 2155 } 2156 2157 return err; 2158 } 2159 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel