[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201712031137.IDRpXErV%fengguang.wu@intel.com>
Date: Sun, 3 Dec 2017 12:13:38 +0800
From: kbuild test robot <lkp@...el.com>
To: Victor Carvalho <victor.ruivo@...ptolab.net>
Cc: kbuild-all@...org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: pi433: fix coding style in function
rf69_set_rx_cfg()
Hi Victor,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.15-rc1 next-20171201]
[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/Victor-Carvalho/staging-pi433-fix-coding-style-in-function-rf69_set_rx_cfg/20171203-112632
config: i386-randconfig-x003-201749 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
drivers/staging/pi433/pi433_if.c: In function 'rf69_set_rx_cfg':
>> drivers/staging/pi433/pi433_if.c:209:2: error: 'else' without a previous 'if'
else
^~~~
vim +209 drivers/staging/pi433/pi433_if.c
874bcba6 Marcus Wolf 2017-07-16 178
874bcba6 Marcus Wolf 2017-07-16 179 static int
874bcba6 Marcus Wolf 2017-07-16 180 rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg)
874bcba6 Marcus Wolf 2017-07-16 181 {
125a452c Elia Geretto 2017-07-31 182 int ret;
874bcba6 Marcus Wolf 2017-07-16 183 int payload_length;
874bcba6 Marcus Wolf 2017-07-16 184
874bcba6 Marcus Wolf 2017-07-16 185 /* receiver config */
874bcba6 Marcus Wolf 2017-07-16 186 SET_CHECKED(rf69_set_frequency(dev->spi, rx_cfg->frequency));
874bcba6 Marcus Wolf 2017-07-16 187 SET_CHECKED(rf69_set_bit_rate(dev->spi, rx_cfg->bit_rate));
874bcba6 Marcus Wolf 2017-07-16 188 SET_CHECKED(rf69_set_modulation(dev->spi, rx_cfg->modulation));
2c58352f Victor Carvalho 2017-11-30 189 SET_CHECKED(rf69_set_antenna_impedance(dev->spi,
2c58352f Victor Carvalho 2017-11-30 190 rx_cfg->antenna_impedance));
874bcba6 Marcus Wolf 2017-07-16 191 SET_CHECKED(rf69_set_rssi_threshold(dev->spi, rx_cfg->rssi_threshold));
2c58352f Victor Carvalho 2017-11-30 192 SET_CHECKED(rf69_set_ook_threshold_dec(dev->spi,
2c58352f Victor Carvalho 2017-11-30 193 rx_cfg->thresholdDecrement));
2c58352f Victor Carvalho 2017-11-30 194 SET_CHECKED(rf69_set_bandwidth(dev->spi, rx_cfg->bw_mantisse,
2c58352f Victor Carvalho 2017-11-30 195 rx_cfg->bw_exponent));
2c58352f Victor Carvalho 2017-11-30 196 SET_CHECKED(rf69_set_bandwidth_during_afc(dev->spi,
2c58352f Victor Carvalho 2017-11-30 197 rx_cfg->bw_mantisse,
2c58352f Victor Carvalho 2017-11-30 198 rx_cfg->bw_exponent));
874bcba6 Marcus Wolf 2017-07-16 199 SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc));
874bcba6 Marcus Wolf 2017-07-16 200
874bcba6 Marcus Wolf 2017-07-16 201 dev->rx_bytes_to_drop = rx_cfg->bytes_to_drop;
874bcba6 Marcus Wolf 2017-07-16 202
874bcba6 Marcus Wolf 2017-07-16 203 /* packet config */
874bcba6 Marcus Wolf 2017-07-16 204 /* enable */
874bcba6 Marcus Wolf 2017-07-16 205 SET_CHECKED(rf69_set_sync_enable(dev->spi, rx_cfg->enable_sync));
874bcba6 Marcus Wolf 2017-07-16 206 if (rx_cfg->enable_sync == optionOn)
2c58352f Victor Carvalho 2017-11-30 207 SET_CHECKED(rf69_set_fifo_fill_condition(dev->spi,
2c58352f Victor Carvalho 2017-11-30 208 afterSyncInterrupt));
874bcba6 Marcus Wolf 2017-07-16 @209 else
874bcba6 Marcus Wolf 2017-07-16 210 SET_CHECKED(rf69_set_fifo_fill_condition(dev->spi, always));
2c58352f Victor Carvalho 2017-11-30 211
125a452c Elia Geretto 2017-07-31 212 if (rx_cfg->enable_length_byte == optionOn) {
125a452c Elia Geretto 2017-07-31 213 ret = rf69_set_packet_format(dev->spi, packetLengthVar);
125a452c Elia Geretto 2017-07-31 214 if (ret < 0)
125a452c Elia Geretto 2017-07-31 215 return ret;
125a452c Elia Geretto 2017-07-31 216 } else {
125a452c Elia Geretto 2017-07-31 217 ret = rf69_set_packet_format(dev->spi, packetLengthFix);
125a452c Elia Geretto 2017-07-31 218 if (ret < 0)
125a452c Elia Geretto 2017-07-31 219 return ret;
125a452c Elia Geretto 2017-07-31 220 }
2c58352f Victor Carvalho 2017-11-30 221
2c58352f Victor Carvalho 2017-11-30 222 SET_CHECKED(rf69_set_adressFiltering
2c58352f Victor Carvalho 2017-11-30 223 (dev->spi, rx_cfg->enable_address_filtering));
874bcba6 Marcus Wolf 2017-07-16 224 SET_CHECKED(rf69_set_crc_enable(dev->spi, rx_cfg->enable_crc));
874bcba6 Marcus Wolf 2017-07-16 225
874bcba6 Marcus Wolf 2017-07-16 226 /* lengths */
874bcba6 Marcus Wolf 2017-07-16 227 SET_CHECKED(rf69_set_sync_size(dev->spi, rx_cfg->sync_length));
2c58352f Victor Carvalho 2017-11-30 228 if (rx_cfg->enable_length_byte == optionOn) {
874bcba6 Marcus Wolf 2017-07-16 229 SET_CHECKED(rf69_set_payload_length(dev->spi, 0xff));
2c58352f Victor Carvalho 2017-11-30 230 } else if (rx_cfg->fixed_message_length != 0) {
874bcba6 Marcus Wolf 2017-07-16 231 payload_length = rx_cfg->fixed_message_length;
2c58352f Victor Carvalho 2017-11-30 232 if (rx_cfg->enable_length_byte == optionOn)
2c58352f Victor Carvalho 2017-11-30 233 payload_length++;
2c58352f Victor Carvalho 2017-11-30 234 if (rx_cfg->enable_address_filtering != filteringOff)
2c58352f Victor Carvalho 2017-11-30 235 payload_length++;
874bcba6 Marcus Wolf 2017-07-16 236 SET_CHECKED(rf69_set_payload_length(dev->spi, payload_length));
2c58352f Victor Carvalho 2017-11-30 237 } else {
874bcba6 Marcus Wolf 2017-07-16 238 SET_CHECKED(rf69_set_payload_length(dev->spi, 0));
874bcba6 Marcus Wolf 2017-07-16 239 }
874bcba6 Marcus Wolf 2017-07-16 240
874bcba6 Marcus Wolf 2017-07-16 241 /* values */
874bcba6 Marcus Wolf 2017-07-16 242 if (rx_cfg->enable_sync == optionOn)
874bcba6 Marcus Wolf 2017-07-16 243 SET_CHECKED(rf69_set_sync_values(dev->spi, rx_cfg->sync_pattern));
2c58352f Victor Carvalho 2017-11-30 244
2c58352f Victor Carvalho 2017-11-30 245 if (rx_cfg->enable_address_filtering != filteringOff) {
874bcba6 Marcus Wolf 2017-07-16 246 SET_CHECKED(rf69_set_node_address (dev->spi, rx_cfg->node_address));
874bcba6 Marcus Wolf 2017-07-16 247 SET_CHECKED(rf69_set_broadcast_address(dev->spi, rx_cfg->broadcast_address));
874bcba6 Marcus Wolf 2017-07-16 248 }
874bcba6 Marcus Wolf 2017-07-16 249
874bcba6 Marcus Wolf 2017-07-16 250 return 0;
874bcba6 Marcus Wolf 2017-07-16 251 }
874bcba6 Marcus Wolf 2017-07-16 252
:::::: The code at line 209 was first introduced by commit
:::::: 874bcba65f9a3a2a304b5f520529c046887c3cdc staging: pi433: New driver
:::::: TO: Marcus Wolf <linux@...f-Entwicklungen.de>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (25022 bytes)
Powered by blists - more mailing lists