[xlnx:master 11563/12425] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:3003:47-48: WARNING this kind of initialization is deprecated (https://www.kernel.org/doc/html/latest/process/deprecated.html#uninitialized-var) (fwd)
Julia Lawall
julia.lawall at inria.fr
Wed Sep 1 14:13:31 PDT 2021
The problem is initializing axienet_clk_init to itself.
julia
---------- Forwarded message ----------
Date: Thu, 2 Sep 2021 00:55:30 +0800
From: kernel test robot <lkp at intel.com>
To: kbuild at lists.01.org
Cc: lkp at intel.com, Julia Lawall <julia.lawall at lip6.fr>
Subject: [xlnx:master 11563/12425]
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:3003:47-48: WARNING this
kind of initialization is deprecated
(https://www.kernel.org/doc/html/latest/process/deprecated.html#uninitialize
d-var)
CC: kbuild-all at lists.01.org
CC: linux-arm-kernel at lists.infradead.org
TO: Vishal Sagar <vishal.sagar at xilinx.com>
CC: Michal Simek <monstr at monstr.eu>
CC: Hyun Kwon <hyun.kwon at xilinx.com>
tree: https://github.com/Xilinx/linux-xlnx master
head: 52495976d054651fbf88cb12e08c57bf8d0ad781
commit: be1a315c549bd2d6be07219a14335d2e156db988 [11563/12425] staging: xlnxsync: Fix the uapi header license
:::::: branch date: 32 hours ago
:::::: commit date: 5 months ago
config: nds32-randconfig-c003-20210831 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Julia Lawall <julia.lawall at lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:3003:47-48: WARNING this kind of initialization is deprecated (https://www.kernel.org/doc/html/latest/process/deprecated.html#uninitialized-var)
vim +3003 drivers/net/ethernet/xilinx/xilinx_axienet_main.c
7033a0f491129a8 Appana Durga Kedareswara Rao 2020-01-24 2986
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2987 /**
2be586205ca2b81 Srikanth Thokala 2015-05-05 2988 * axienet_probe - Axi Ethernet probe function.
95219aa538e11d5 Srikanth Thokala 2015-05-05 2989 * @pdev: Pointer to platform device structure.
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2990 *
b0d081c524b46c2 Michal Simek 2015-05-05 2991 * Return: 0, on success
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2992 * Non-zero error value on failure.
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2993 *
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2994 * This is the probe routine for Axi Ethernet driver. This is called before
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2995 * any other driver routines are invoked. It allocates and sets up the Ethernet
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2996 * device. Parses through device tree and populates fields of
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2997 * axienet_local. It registers the Ethernet device.
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 2998 */
2be586205ca2b81 Srikanth Thokala 2015-05-05 2999 static int axienet_probe(struct platform_device *pdev)
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3000 {
4c3b5b0773df3a7 Appana Durga Kedareswara Rao 2021-01-22 3001 int (*axienet_clk_init)(struct platform_device *pdev,
4c3b5b0773df3a7 Appana Durga Kedareswara Rao 2021-01-22 3002 struct clk **axi_aclk, struct clk **axis_clk,
4c3b5b0773df3a7 Appana Durga Kedareswara Rao 2021-01-22 @3003 struct clk **ref_clk, struct clk **tmpclk) =
4c3b5b0773df3a7 Appana Durga Kedareswara Rao 2021-01-22 3004 axienet_clk_init;
3135d19569c0630 Appana Durga Kedareswara Rao 2021-01-22 3005 int ret = 0;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3006 struct device_node *np;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3007 struct axienet_local *lp;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3008 struct net_device *ndev;
da90e38003e2f05 Tobias Klauser 2016-12-07 3009 const void *mac_addr;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3010 struct resource *ethres;
8495659bf93c8e2 Srikanth Thokala 2015-05-05 3011 u32 value;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3012 u16 num_queues = XAE_MAX_QUEUES;
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3013 bool is_tsn = false;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3014
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3015 is_tsn = of_property_read_bool(pdev->dev.of_node, "xlnx,tsn");
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3016 ret = of_property_read_u16(pdev->dev.of_node, "xlnx,num-queues",
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3017 &num_queues);
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3018 if (ret) {
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3019 if (!is_tsn) {
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3020 #ifndef CONFIG_AXIENET_HAS_MCDMA
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3021 num_queues = 1;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3022 #endif
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3023 }
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3024 }
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3025 #ifdef CONFIG_XILINX_TSN
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3026 if (is_tsn && (num_queues < XAE_TSN_MIN_QUEUES ||
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3027 num_queues > XAE_MAX_QUEUES))
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3028 num_queues = XAE_MAX_QUEUES;
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3029 #endif
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3030
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3031 ndev = alloc_etherdev_mq(sizeof(*lp), num_queues);
41de8d4cff21a2e Joe Perches 2012-01-29 3032 if (!ndev)
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3033 return -ENOMEM;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3034
95219aa538e11d5 Srikanth Thokala 2015-05-05 3035 platform_set_drvdata(pdev, ndev);
e5971b124969cff Pranavi Somisetty 2021-01-22 3036 #ifdef CONFIG_XILINX_TSN
fb5a7597eefba74 Shravya Kumbham 2021-01-22 3037 bool slave = false;
e5971b124969cff Pranavi Somisetty 2021-01-22 3038 if (is_tsn) {
e5971b124969cff Pranavi Somisetty 2021-01-22 3039 slave = of_property_read_bool(pdev->dev.of_node,
e5971b124969cff Pranavi Somisetty 2021-01-22 3040 "xlnx,tsn-slave");
e5971b124969cff Pranavi Somisetty 2021-01-22 3041 if (slave)
e5971b124969cff Pranavi Somisetty 2021-01-22 3042 snprintf(ndev->name, sizeof(ndev->name), "eth2");
e5971b124969cff Pranavi Somisetty 2021-01-22 3043 else
e5971b124969cff Pranavi Somisetty 2021-01-22 3044 snprintf(ndev->name, sizeof(ndev->name), "eth1");
e5971b124969cff Pranavi Somisetty 2021-01-22 3045 }
e5971b124969cff Pranavi Somisetty 2021-01-22 3046 #endif
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3047
95219aa538e11d5 Srikanth Thokala 2015-05-05 3048 SET_NETDEV_DEV(ndev, &pdev->dev);
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3049 ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
28e24c62ab3062e Eric Dumazet 2013-12-02 3050 ndev->features = NETIF_F_SG;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3051 ndev->netdev_ops = &axienet_netdev_ops;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3052 ndev->ethtool_ops = &axienet_ethtool_ops;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3053
d894be57ca92c8a Jarod Wilson 2016-10-20 3054 /* MTU range: 64 - 9000 */
d894be57ca92c8a Jarod Wilson 2016-10-20 3055 ndev->min_mtu = 64;
d894be57ca92c8a Jarod Wilson 2016-10-20 3056 ndev->max_mtu = XAE_JUMBO_MTU;
d894be57ca92c8a Jarod Wilson 2016-10-20 3057
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3058 lp = netdev_priv(ndev);
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3059 lp->ndev = ndev;
95219aa538e11d5 Srikanth Thokala 2015-05-05 3060 lp->dev = &pdev->dev;
8a3b7a252dca9fb Daniel Borkmann 2012-01-19 3061 lp->options = XAE_OPTION_DEFAULTS;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3062 lp->num_tx_queues = num_queues;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3063 lp->num_rx_queues = num_queues;
c5d8859a13f5f3c Saurabh Sengar 2021-01-22 3064 lp->is_tsn = is_tsn;
8b09ca823ffb4ee Robert Hancock 2019-06-06 3065 lp->rx_bd_num = RX_BD_NUM_DEFAULT;
8b09ca823ffb4ee Robert Hancock 2019-06-06 3066 lp->tx_bd_num = TX_BD_NUM_DEFAULT;
8d6d4d04f7ed813 Saurabh Sengar 2021-01-22 3067
:::::: The code at line 3003 was first introduced by commit
:::::: 4c3b5b0773df3a73938529634e562784458aeb90 net: axienet: Add clock support
:::::: TO: Appana Durga Kedareswara Rao <appana.durga.rao at xilinx.com>
:::::: CC: Michal Simek <michal.simek at xilinx.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 27639 bytes
Desc:
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210901/4cbae830/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list