All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 10024/10701] drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for function 'rtw_pci_probe'
@ 2020-05-20  8:21 kbuild test robot
  2020-05-20  8:30 ` Tony Chuang
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-05-20  8:21 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 72f256c2b948622cc45ff8bc0456dd6039d8fe36 [10024/10701] rtw88: extract: export symbols about pci interface
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 72f256c2b948622cc45ff8bc0456dd6039d8fe36
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

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

>> drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for function 'rtw_pci_probe' [-Wmissing-prototypes]
int rtw_pci_probe(struct pci_dev *pdev,
^
drivers/net/wireless/realtek/rtw88/pci.c:1477:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int rtw_pci_probe(struct pci_dev *pdev,
^
static
>> drivers/net/wireless/realtek/rtw88/pci.c:1557:6: warning: no previous prototype for function 'rtw_pci_remove' [-Wmissing-prototypes]
void rtw_pci_remove(struct pci_dev *pdev)
^
drivers/net/wireless/realtek/rtw88/pci.c:1557:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void rtw_pci_remove(struct pci_dev *pdev)
^
static
>> drivers/net/wireless/realtek/rtw88/pci.c:1579:6: warning: no previous prototype for function 'rtw_pci_shutdown' [-Wmissing-prototypes]
void rtw_pci_shutdown(struct pci_dev *pdev)
^
drivers/net/wireless/realtek/rtw88/pci.c:1579:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void rtw_pci_shutdown(struct pci_dev *pdev)
^
static
drivers/net/wireless/realtek/rtw88/pci.c:88:21: warning: unused function 'rtw_pci_get_tx_desc' [-Wunused-function]
static inline void *rtw_pci_get_tx_desc(struct rtw_pci_tx_ring *tx_ring, u8 idx)
^
4 warnings generated.

vim +/rtw_pci_probe +1477 drivers/net/wireless/realtek/rtw88/pci.c

  1476	
> 1477	int rtw_pci_probe(struct pci_dev *pdev,
  1478			  const struct pci_device_id *id)
  1479	{
  1480		struct ieee80211_hw *hw;
  1481		struct rtw_dev *rtwdev;
  1482		int drv_data_size;
  1483		int ret;
  1484	
  1485		drv_data_size = sizeof(struct rtw_dev) + sizeof(struct rtw_pci);
  1486		hw = ieee80211_alloc_hw(drv_data_size, &rtw_ops);
  1487		if (!hw) {
  1488			dev_err(&pdev->dev, "failed to allocate hw\n");
  1489			return -ENOMEM;
  1490		}
  1491	
  1492		rtwdev = hw->priv;
  1493		rtwdev->hw = hw;
  1494		rtwdev->dev = &pdev->dev;
  1495		rtwdev->chip = (struct rtw_chip_info *)id->driver_data;
  1496		rtwdev->hci.ops = &rtw_pci_ops;
  1497		rtwdev->hci.type = RTW_HCI_TYPE_PCIE;
  1498	
  1499		ret = rtw_core_init(rtwdev);
  1500		if (ret)
  1501			goto err_release_hw;
  1502	
  1503		rtw_dbg(rtwdev, RTW_DBG_PCI,
  1504			"rtw88 pci probe: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
  1505			pdev->vendor, pdev->device, pdev->revision);
  1506	
  1507		ret = rtw_pci_claim(rtwdev, pdev);
  1508		if (ret) {
  1509			rtw_err(rtwdev, "failed to claim pci device\n");
  1510			goto err_deinit_core;
  1511		}
  1512	
  1513		ret = rtw_pci_setup_resource(rtwdev, pdev);
  1514		if (ret) {
  1515			rtw_err(rtwdev, "failed to setup pci resources\n");
  1516			goto err_pci_declaim;
  1517		}
  1518	
  1519		ret = rtw_chip_info_setup(rtwdev);
  1520		if (ret) {
  1521			rtw_err(rtwdev, "failed to setup chip information\n");
  1522			goto err_destroy_pci;
  1523		}
  1524	
  1525		rtw_pci_phy_cfg(rtwdev);
  1526	
  1527		ret = rtw_register_hw(rtwdev, hw);
  1528		if (ret) {
  1529			rtw_err(rtwdev, "failed to register hw\n");
  1530			goto err_destroy_pci;
  1531		}
  1532	
  1533		ret = rtw_pci_request_irq(rtwdev, pdev);
  1534		if (ret) {
  1535			ieee80211_unregister_hw(hw);
  1536			goto err_destroy_pci;
  1537		}
  1538	
  1539		return 0;
  1540	
  1541	err_destroy_pci:
  1542		rtw_pci_destroy(rtwdev, pdev);
  1543	
  1544	err_pci_declaim:
  1545		rtw_pci_declaim(rtwdev, pdev);
  1546	
  1547	err_deinit_core:
  1548		rtw_core_deinit(rtwdev);
  1549	
  1550	err_release_hw:
  1551		ieee80211_free_hw(hw);
  1552	
  1553		return ret;
  1554	}
  1555	EXPORT_SYMBOL(rtw_pci_probe);
  1556	
> 1557	void rtw_pci_remove(struct pci_dev *pdev)
  1558	{
  1559		struct ieee80211_hw *hw = pci_get_drvdata(pdev);
  1560		struct rtw_dev *rtwdev;
  1561		struct rtw_pci *rtwpci;
  1562	
  1563		if (!hw)
  1564			return;
  1565	
  1566		rtwdev = hw->priv;
  1567		rtwpci = (struct rtw_pci *)rtwdev->priv;
  1568	
  1569		rtw_unregister_hw(rtwdev, hw);
  1570		rtw_pci_disable_interrupt(rtwdev, rtwpci);
  1571		rtw_pci_destroy(rtwdev, pdev);
  1572		rtw_pci_declaim(rtwdev, pdev);
  1573		rtw_pci_free_irq(rtwdev, pdev);
  1574		rtw_core_deinit(rtwdev);
  1575		ieee80211_free_hw(hw);
  1576	}
  1577	EXPORT_SYMBOL(rtw_pci_remove);
  1578	
> 1579	void rtw_pci_shutdown(struct pci_dev *pdev)
  1580	{
  1581		struct ieee80211_hw *hw = pci_get_drvdata(pdev);
  1582		struct rtw_dev *rtwdev;
  1583		struct rtw_chip_info *chip;
  1584	
  1585		if (!hw)
  1586			return;
  1587	
  1588		rtwdev = hw->priv;
  1589		chip = rtwdev->chip;
  1590	
  1591		if (chip->ops->shutdown)
  1592			chip->ops->shutdown(rtwdev);
  1593	}
  1594	EXPORT_SYMBOL(rtw_pci_shutdown);
  1595	

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 10024/10701] drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for function 'rtw_pci_probe'
  2020-05-20  8:21 [linux-next:master 10024/10701] drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for function 'rtw_pci_probe' kbuild test robot
@ 2020-05-20  8:30 ` Tony Chuang
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Chuang @ 2020-05-20  8:30 UTC (permalink / raw)
  To: kbuild-all

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

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> master
> head:   fb57b1fabcb28f358901b2df90abd2b48abc1ca8
> commit: 72f256c2b948622cc45ff8bc0456dd6039d8fe36 [10024/10701]
> rtw88: extract: export symbols about pci interface
> config: x86_64-allyesconfig (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project
> e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
> reproduce:
>         wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install x86_64 cross compiling tool for clang build
>         # apt-get install binutils-x86-64-linux-gnu
>         git checkout 72f256c2b948622cc45ff8bc0456dd6039d8fe36
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
> ARCH=x86_64
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
> 
> >> drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous
> >> prototype for function 'rtw_pci_probe' [-Wmissing-prototypes]
> int rtw_pci_probe(struct pci_dev *pdev,
> ^
> drivers/net/wireless/realtek/rtw88/pci.c:1477:1: note: declare 'static' if the
> function is not intended to be used outside of this translation unit int
> rtw_pci_probe(struct pci_dev *pdev, ^ static

These exported symbols are used outside in rtw88 driver's
new entry points such as rtw8822be.ko/rtw8822ce.ko.
But for easier to review the patch is split and the patch that
contains the entry point is applied after this.
So it can be treated as false alarms.

Yen-Hsuan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-20  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20  8:21 [linux-next:master 10024/10701] drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for function 'rtw_pci_probe' kbuild test robot
2020-05-20  8:30 ` Tony Chuang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.