mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: drivers/media/usb/dvb-usb/af9005.c:981:48: warning: suggest braces around empty body in an 'if' statement
Date: Fri, 12 Jun 2020 17:51:33 +0800	[thread overview]
Message-ID: <202006121721.du1clm8Y%lkp@intel.com> (raw)

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

Hi Navid,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b791d1bdf9212d944d749a5c7ff6febdba241771
commit: 2289adbfa559050d2a38bcd9caac1c18b800e928 media: usb: fix memory leak in af9005_identify_state
date:   8 months ago
config: c6x-randconfig-r012-20200612 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2289adbfa559050d2a38bcd9caac1c18b800e928
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_read_ofdm_register':
drivers/media/usb/dvb-usb/af9005.c:144:32: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
144 |   deb_reg("value %xn", *value);
|                                ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_read_ofdm_registers':
drivers/media/usb/dvb-usb/af9005.c:159:35: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
159 |   debug_dump(values, len, deb_reg);
|                                   ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_write_ofdm_register':
drivers/media/usb/dvb-usb/af9005.c:174:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
174 |   deb_reg("okn");
|                  ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_write_ofdm_registers':
drivers/media/usb/dvb-usb/af9005.c:191:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
191 |   deb_reg("okn");
|                  ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_identify_state':
>> drivers/media/usb/dvb-usb/af9005.c:981:48: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
981 |   deb_info("Identify state cold = %dn", *cold);
|                                                ^
/tmp/cc9dN54m.s: Assembler messages:
/tmp/cc9dN54m.s:4651: Warning: ignoring changed section attributes for .far
--
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_read_ofdm_register':
drivers/media/usb/dvb-usb/af9005.c:144:32: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
144 |   deb_reg("value %xn", *value);
|                                ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_read_ofdm_registers':
drivers/media/usb/dvb-usb/af9005.c:159:35: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
159 |   debug_dump(values, len, deb_reg);
|                                   ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_write_ofdm_register':
drivers/media/usb/dvb-usb/af9005.c:174:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
174 |   deb_reg("okn");
|                  ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_write_ofdm_registers':
drivers/media/usb/dvb-usb/af9005.c:191:18: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
191 |   deb_reg("okn");
|                  ^
drivers/media/usb/dvb-usb/af9005.c: In function 'af9005_identify_state':
>> drivers/media/usb/dvb-usb/af9005.c:981:48: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
981 |   deb_info("Identify state cold = %dn", *cold);
|                                                ^
/tmp/ccqEAIu5.s: Assembler messages:
/tmp/ccqEAIu5.s:4651: Warning: ignoring changed section attributes for .far

vim +/if +981 drivers/media/usb/dvb-usb/af9005.c

af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  956  
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  957  static int af9005_identify_state(struct usb_device *udev,
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  958  				 struct dvb_usb_device_properties *props,
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  959  				 struct dvb_usb_device_description **desc,
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  960  				 int *cold)
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  961  {
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  962  	int ret;
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  963  	u8 reply, *buf;
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  964  
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  965  	buf = kmalloc(FW_BULKOUT_SIZE + 2, GFP_KERNEL);
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  966  	if (!buf)
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  967  		return -ENOMEM;
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  968  
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  969  	ret = af9005_boot_packet(udev, FW_CONFIG, &reply,
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  970  				 buf, FW_BULKOUT_SIZE + 2);
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  971  	if (ret)
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  972  		goto err;
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  973  	deb_info("result of FW_CONFIG in identify state %d\n", reply);
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  974  	if (reply == 0x01)
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  975  		*cold = 1;
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  976  	else if (reply == 0x02)
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  977  		*cold = 0;
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  978  	else
2289adbfa55905 drivers/media/usb/dvb-usb/af9005.c Navid Emamdoost       2019-10-09  979  		ret = -EIO;
2289adbfa55905 drivers/media/usb/dvb-usb/af9005.c Navid Emamdoost       2019-10-09  980  	if (!ret)
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07 @981  		deb_info("Identify state cold = %d\n", *cold);
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  982  
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  983  err:
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  984  	kfree(buf);
c58b84ee467bfd drivers/media/usb/dvb-usb/af9005.c Mauro Carvalho Chehab 2016-10-05  985  	return ret;
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  986  }
af4e067e1dcf92 drivers/media/dvb/dvb-usb/af9005.c Luca Olivetti         2007-05-07  987  

:::::: The code at line 981 was first introduced by commit
:::::: af4e067e1dcf926d9523dff11e46c45fd9fa9da2 V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech

:::::: TO: Luca Olivetti <luca@ventoso.org>
:::::: CC: Mauro Carvalho Chehab <mchehab@infradead.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2020-06-12  9:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202006121721.du1clm8Y%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=navid.emamdoost@gmail.com \
    /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®