mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Victor Carvalho <victor.ruivo@cryptolab.net>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: pi433: fix coding style in function rf69_set_rx_cfg()
Date: Sun, 3 Dec 2017 12:13:38 +0800	[thread overview]
Message-ID: <201712031137.IDRpXErV%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171130215336.GA5079@linuz-ub.lan>

[-- Attachment #1: Type: text/plain, Size: 6911 bytes --]

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@Wolf-Entwicklungen.de>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25022 bytes --]

      reply	other threads:[~2017-12-03  4:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 21:53 Victor Carvalho
2017-12-03  4:13 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201712031137.IDRpXErV%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=victor.ruivo@cryptolab.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®