CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Vincent Mailhol <[email protected]>
TO: "Marc Kleine-Budde" <[email protected]>
TO: [email protected]
CC: Jimmy Assarsson <[email protected]>
CC: Masahiro Yamada <[email protected]>
CC: [email protected]
CC: [email protected]
CC: Arunachalam Santhanam <[email protected]>
CC: Vincent Mailhol <[email protected]>

Hi Vincent,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Vincent-Mailhol/Introducing-ETAS-ES58X-CAN-USB-interfaces/20210410-180245
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git 
testing
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


cocci warnings: (new ones prefixed by >>)
>> drivers/net/can/usb/etas_es58x/es58x_core.c:1802:5-24: atomic_dec_and_test 
>> variation before object free at line 1803.
   drivers/net/can/usb/etas_es58x/es58x_core.c:1837:5-24: atomic_dec_and_test 
variation before object free at line 1838.

vim +1802 drivers/net/can/usb/etas_es58x/es58x_core.c

1eb17b66e055c7 Vincent Mailhol 2021-04-10  1764  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1765  /**
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1766   * es58x_open() - Enable the 
network device.
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1767   * @netdev: CAN network device.
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1768   *
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1769   * Called when the network 
transitions to the up state. Allocate the
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1770   * URB resources if needed and 
open the channel.
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1771   *
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1772   * Return: zero on success, 
errno when any error occurs.
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1773   */
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1774  static int es58x_open(struct 
net_device *netdev)
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1775  {
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1776         struct es58x_device 
*es58x_dev = es58x_priv(netdev)->es58x_dev;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1777         int ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1778  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1779         if 
(atomic_inc_return(&es58x_dev->opened_channel_cnt) == 1) {
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1780                 ret = 
es58x_alloc_rx_urbs(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1781                 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1782                         return 
ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1783  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1784                 ret = 
es58x_set_realtime_diff_ns(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1785                 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1786                         goto 
free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1787         }
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1788  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1789         ret = 
open_candev(netdev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1790         if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1791                 goto free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1792  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1793         ret = 
es58x_dev->ops->enable_channel(es58x_priv(netdev));
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1794         if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1795                 goto free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1796  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1797         
netif_start_queue(netdev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1798  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1799         return ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1800  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1801   free_urbs:
1eb17b66e055c7 Vincent Mailhol 2021-04-10 @1802         if 
(atomic_dec_and_test(&es58x_dev->opened_channel_cnt))
1eb17b66e055c7 Vincent Mailhol 2021-04-10 @1803                 
es58x_free_urbs(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1804         netdev_err(netdev, "%s: 
Could not open the network device: %pe\n",
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1805                    __func__, 
ERR_PTR(ret));
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1806  
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1807         return ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1808  }
1eb17b66e055c7 Vincent Mailhol 2021-04-10  1809  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to