From: kernel test robot <lkp@intel.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Simon Horman <horms@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: [morimoto:renesas-bsp/v6.1-dev 13/18] drivers/net/ethernet/renesas/rswitch.c:1807:10: error: call to undeclared function 'clk_get_rate'; ISO C99 and later do not support implicit function declarations
Date: Sat, 11 May 2024 19:26:17 +0800 [thread overview]
Message-ID: <202405111942.d7Fbf8aC-lkp@intel.com> (raw)
tree: https://github.com/morimoto/linux renesas-bsp/v6.1-dev
head: 77aa8a782c7cfec5abdd25e5426bd90f67497848
commit: fa24f11486bc1e6885936fd713c7e5da9323b16c [13/18] net: ethernet: renesas: rcar_gen4_ptp: Get clock increment from clock rate
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240511/202405111942.d7Fbf8aC-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project b910bebc300dafb30569cecc3017b446ea8eafa0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240511/202405111942.d7Fbf8aC-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405111942.d7Fbf8aC-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/renesas/rswitch.c:7:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:1775:
include/linux/vmstat.h:516:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
516 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from drivers/net/ethernet/renesas/rswitch.c:7:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/net/ethernet/renesas/rswitch.c:7:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/net/ethernet/renesas/rswitch.c:7:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> drivers/net/ethernet/renesas/rswitch.c:1807:10: error: call to undeclared function 'clk_get_rate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1807 | clk_get_rate(priv->clk));
| ^
>> drivers/net/ethernet/renesas/rswitch.c:1807:29: error: no member named 'clk' in 'struct rswitch_private'
1807 | clk_get_rate(priv->clk));
| ~~~~ ^
7 warnings and 2 errors generated.
vim +/clk_get_rate +1807 drivers/net/ethernet/renesas/rswitch.c
1764
1765 static int rswitch_init(struct rswitch_private *priv)
1766 {
1767 int i, err;
1768
1769 for (i = 0; i < RSWITCH_NUM_PORTS; i++)
1770 rswitch_etha_init(priv, i);
1771
1772 rswitch_clock_enable(priv);
1773 for (i = 0; i < RSWITCH_NUM_PORTS; i++)
1774 rswitch_etha_read_mac_address(&priv->etha[i]);
1775
1776 rswitch_reset(priv);
1777
1778 rswitch_clock_enable(priv);
1779 rswitch_top_init(priv);
1780 err = rswitch_bpool_config(priv);
1781 if (err < 0)
1782 return err;
1783
1784 err = rswitch_gwca_linkfix_alloc(priv);
1785 if (err < 0)
1786 return -ENOMEM;
1787
1788 err = rswitch_gwca_ts_queue_alloc(priv);
1789 if (err < 0)
1790 goto err_ts_queue_alloc;
1791
1792 rswitch_gwca_ts_queue_fill(priv, 0, TS_RING_SIZE);
1793 INIT_LIST_HEAD(&priv->gwca.ts_info_list);
1794
1795 for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
1796 err = rswitch_device_alloc(priv, i);
1797 if (err < 0) {
1798 for (i--; i >= 0; i--)
1799 rswitch_device_free(priv, i);
1800 goto err_device_alloc;
1801 }
1802 }
1803
1804 rswitch_fwd_init(priv);
1805
1806 err = rcar_gen4_ptp_register(priv->ptp_priv, RCAR_GEN4_PTP_REG_LAYOUT,
> 1807 clk_get_rate(priv->clk));
1808 if (err < 0)
1809 goto err_ptp_register;
1810
1811 err = rswitch_gwca_request_irqs(priv);
1812 if (err < 0)
1813 goto err_gwca_request_irq;
1814
1815 err = rswitch_gwca_ts_request_irqs(priv);
1816 if (err < 0)
1817 goto err_gwca_ts_request_irq;
1818
1819 err = rswitch_gwca_hw_init(priv);
1820 if (err < 0)
1821 goto err_gwca_hw_init;
1822
1823 err = rswitch_ether_port_init_all(priv);
1824 if (err)
1825 goto err_ether_port_init_all;
1826
1827 rswitch_for_each_enabled_port(priv, i) {
1828 err = register_netdev(priv->rdev[i]->ndev);
1829 if (err) {
1830 rswitch_for_each_enabled_port_continue_reverse(priv, i)
1831 unregister_netdev(priv->rdev[i]->ndev);
1832 goto err_register_netdev;
1833 }
1834 }
1835
1836 rswitch_for_each_enabled_port(priv, i)
1837 netdev_info(priv->rdev[i]->ndev, "MAC address %pM\n",
1838 priv->rdev[i]->ndev->dev_addr);
1839
1840 return 0;
1841
1842 err_register_netdev:
1843 rswitch_ether_port_deinit_all(priv);
1844
1845 err_ether_port_init_all:
1846 rswitch_gwca_hw_deinit(priv);
1847
1848 err_gwca_hw_init:
1849 err_gwca_ts_request_irq:
1850 err_gwca_request_irq:
1851 rcar_gen4_ptp_unregister(priv->ptp_priv);
1852
1853 err_ptp_register:
1854 for (i = 0; i < RSWITCH_NUM_PORTS; i++)
1855 rswitch_device_free(priv, i);
1856
1857 err_device_alloc:
1858 rswitch_gwca_ts_queue_free(priv);
1859
1860 err_ts_queue_alloc:
1861 rswitch_gwca_linkfix_free(priv);
1862
1863 return err;
1864 }
1865
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-11 11:27 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=202405111942.d7Fbf8aC-lkp@intel.com \
--to=lkp@intel.com \
--cc=horms@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=llvm@lists.linux.dev \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).