From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload
Date: Tue, 12 Nov 2019 20:43:41 +0800 [thread overview]
Message-ID: <201911122024.LxCD5byT%lkp@intel.com> (raw)
In-Reply-To: <20191111042715.13444-1-Po.Liu@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 5284 bytes --]
Hi Po,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on v5.4-rc7 next-20191112]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Po-Liu/enetc-Configure-the-Time-Aware-Scheduler-via-tc-taprio-offload/20191112-193235
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/net/ethernet/freescale/enetc/enetc_qos.c: In function 'enetc_setup_tc_taprio':
>> drivers/net/ethernet/freescale/enetc/enetc_qos.c:25:6: warning: 'temp' may be used uninitialized in this function [-Wmaybe-uninitialized]
u32 temp;
^~~~
vim +/temp +25 drivers/net/ethernet/freescale/enetc/enetc_qos.c
13
14 static int enetc_setup_taprio(struct net_device *ndev,
15 struct tc_taprio_qopt_offload *admin_conf)
16 {
17 struct enetc_ndev_priv *priv = netdev_priv(ndev);
18 struct enetc_cbd cbd = {.cmd = 0};
19 struct tgs_gcl_conf *gcl_config;
20 struct tgs_gcl_data *gcl_data;
21 struct gce *gce;
22 dma_addr_t dma;
23 u16 data_size;
24 u16 gcl_len;
> 25 u32 temp;
26 int i;
27
28 gcl_len = admin_conf->num_entries;
29 if (gcl_len > enetc_get_max_gcl_len(&priv->si->hw))
30 return -EINVAL;
31
32 if (admin_conf->enable) {
33 enetc_wr(&priv->si->hw,
34 ENETC_QBV_PTGCR_OFFSET,
35 temp & (~ENETC_QBV_TGE));
36 usleep_range(10, 20);
37 enetc_wr(&priv->si->hw,
38 ENETC_QBV_PTGCR_OFFSET,
39 temp | ENETC_QBV_TGE);
40 } else {
41 enetc_wr(&priv->si->hw,
42 ENETC_QBV_PTGCR_OFFSET,
43 temp & (~ENETC_QBV_TGE));
44 return 0;
45 }
46
47 /* Configure the (administrative) gate control list using the
48 * control BD descriptor.
49 */
50 gcl_config = &cbd.gcl_conf;
51
52 data_size = sizeof(struct tgs_gcl_data) + gcl_len * sizeof(struct gce);
53
54 gcl_data = kzalloc(data_size, __GFP_DMA | GFP_KERNEL);
55 if (!gcl_data)
56 return -ENOMEM;
57
58 gce = (struct gce *)(gcl_data + 1);
59
60 /* Since no initial state config in taprio, set gates open as default.
61 */
62 gcl_config->atc = 0xff;
63 gcl_config->acl_len = cpu_to_le16(gcl_len);
64
65 if (!admin_conf->base_time) {
66 gcl_data->btl =
67 cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR0));
68 gcl_data->bth =
69 cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR1));
70 } else {
71 gcl_data->btl =
72 cpu_to_le32(lower_32_bits(admin_conf->base_time));
73 gcl_data->bth =
74 cpu_to_le32(upper_32_bits(admin_conf->base_time));
75 }
76
77 gcl_data->ct = cpu_to_le32(admin_conf->cycle_time);
78 gcl_data->cte = cpu_to_le32(admin_conf->cycle_time_extension);
79
80 for (i = 0; i < gcl_len; i++) {
81 struct tc_taprio_sched_entry *temp_entry;
82 struct gce *temp_gce = gce + i;
83
84 temp_entry = &admin_conf->entries[i];
85
86 temp_gce->gate = cpu_to_le32(temp_entry->gate_mask);
87 temp_gce->period = cpu_to_le32(temp_entry->interval);
88 }
89
90 cbd.length = cpu_to_le16(data_size);
91 cbd.status_flags = 0;
92
93 dma = dma_map_single(&priv->si->pdev->dev, gcl_data,
94 data_size, DMA_TO_DEVICE);
95 if (dma_mapping_error(&priv->si->pdev->dev, dma)) {
96 netdev_err(priv->si->ndev, "DMA mapping failed!\n");
97 kfree(gcl_data);
98 return -ENOMEM;
99 }
100
101 cbd.addr[0] = lower_32_bits(dma);
102 cbd.addr[1] = upper_32_bits(dma);
103 cbd.cls = BDCR_CMD_PORT_GCL;
104
105 /* Updated by ENETC on completion of the configuration
106 * command. A zero value indicates success.
107 */
108 cbd.status_flags = 0;
109
110 enetc_send_cmd(priv->si, &cbd);
111
112 dma_unmap_single(&priv->si->pdev->dev, dma, data_size, DMA_TO_DEVICE);
113 kfree(gcl_data);
114
115 return 0;
116 }
117
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 67129 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Po Liu <po.liu@nxp.com>
Cc: kbuild-all@lists.01.org, Claudiu Manoil <claudiu.manoil@nxp.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"vinicius.gomes@intel.com" <vinicius.gomes@intel.com>,
Po Liu <po.liu@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Alexandru Marginean <alexandru.marginean@nxp.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Roy Zang <roy.zang@nxp.com>, Mingkai Hu <mingkai.hu@nxp.com>,
Jerry Huang <jerry.huang@nxp.com>, Leo Li <leoyang.li@nxp.com>
Subject: Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload
Date: Tue, 12 Nov 2019 20:43:41 +0800 [thread overview]
Message-ID: <201911122024.LxCD5byT%lkp@intel.com> (raw)
In-Reply-To: <20191111042715.13444-1-Po.Liu@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 5138 bytes --]
Hi Po,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on v5.4-rc7 next-20191112]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Po-Liu/enetc-Configure-the-Time-Aware-Scheduler-via-tc-taprio-offload/20191112-193235
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/net/ethernet/freescale/enetc/enetc_qos.c: In function 'enetc_setup_tc_taprio':
>> drivers/net/ethernet/freescale/enetc/enetc_qos.c:25:6: warning: 'temp' may be used uninitialized in this function [-Wmaybe-uninitialized]
u32 temp;
^~~~
vim +/temp +25 drivers/net/ethernet/freescale/enetc/enetc_qos.c
13
14 static int enetc_setup_taprio(struct net_device *ndev,
15 struct tc_taprio_qopt_offload *admin_conf)
16 {
17 struct enetc_ndev_priv *priv = netdev_priv(ndev);
18 struct enetc_cbd cbd = {.cmd = 0};
19 struct tgs_gcl_conf *gcl_config;
20 struct tgs_gcl_data *gcl_data;
21 struct gce *gce;
22 dma_addr_t dma;
23 u16 data_size;
24 u16 gcl_len;
> 25 u32 temp;
26 int i;
27
28 gcl_len = admin_conf->num_entries;
29 if (gcl_len > enetc_get_max_gcl_len(&priv->si->hw))
30 return -EINVAL;
31
32 if (admin_conf->enable) {
33 enetc_wr(&priv->si->hw,
34 ENETC_QBV_PTGCR_OFFSET,
35 temp & (~ENETC_QBV_TGE));
36 usleep_range(10, 20);
37 enetc_wr(&priv->si->hw,
38 ENETC_QBV_PTGCR_OFFSET,
39 temp | ENETC_QBV_TGE);
40 } else {
41 enetc_wr(&priv->si->hw,
42 ENETC_QBV_PTGCR_OFFSET,
43 temp & (~ENETC_QBV_TGE));
44 return 0;
45 }
46
47 /* Configure the (administrative) gate control list using the
48 * control BD descriptor.
49 */
50 gcl_config = &cbd.gcl_conf;
51
52 data_size = sizeof(struct tgs_gcl_data) + gcl_len * sizeof(struct gce);
53
54 gcl_data = kzalloc(data_size, __GFP_DMA | GFP_KERNEL);
55 if (!gcl_data)
56 return -ENOMEM;
57
58 gce = (struct gce *)(gcl_data + 1);
59
60 /* Since no initial state config in taprio, set gates open as default.
61 */
62 gcl_config->atc = 0xff;
63 gcl_config->acl_len = cpu_to_le16(gcl_len);
64
65 if (!admin_conf->base_time) {
66 gcl_data->btl =
67 cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR0));
68 gcl_data->bth =
69 cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR1));
70 } else {
71 gcl_data->btl =
72 cpu_to_le32(lower_32_bits(admin_conf->base_time));
73 gcl_data->bth =
74 cpu_to_le32(upper_32_bits(admin_conf->base_time));
75 }
76
77 gcl_data->ct = cpu_to_le32(admin_conf->cycle_time);
78 gcl_data->cte = cpu_to_le32(admin_conf->cycle_time_extension);
79
80 for (i = 0; i < gcl_len; i++) {
81 struct tc_taprio_sched_entry *temp_entry;
82 struct gce *temp_gce = gce + i;
83
84 temp_entry = &admin_conf->entries[i];
85
86 temp_gce->gate = cpu_to_le32(temp_entry->gate_mask);
87 temp_gce->period = cpu_to_le32(temp_entry->interval);
88 }
89
90 cbd.length = cpu_to_le16(data_size);
91 cbd.status_flags = 0;
92
93 dma = dma_map_single(&priv->si->pdev->dev, gcl_data,
94 data_size, DMA_TO_DEVICE);
95 if (dma_mapping_error(&priv->si->pdev->dev, dma)) {
96 netdev_err(priv->si->ndev, "DMA mapping failed!\n");
97 kfree(gcl_data);
98 return -ENOMEM;
99 }
100
101 cbd.addr[0] = lower_32_bits(dma);
102 cbd.addr[1] = upper_32_bits(dma);
103 cbd.cls = BDCR_CMD_PORT_GCL;
104
105 /* Updated by ENETC on completion of the configuration
106 * command. A zero value indicates success.
107 */
108 cbd.status_flags = 0;
109
110 enetc_send_cmd(priv->si, &cbd);
111
112 dma_unmap_single(&priv->si->pdev->dev, dma, data_size, DMA_TO_DEVICE);
113 kfree(gcl_data);
114
115 return 0;
116 }
117
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67129 bytes --]
next prev parent reply other threads:[~2019-11-12 12:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 4:41 [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload Po Liu
2019-11-11 4:41 ` [net-next, 2/2] enetc: update TSN Qbv PSPEED set according to adjust link speed Po Liu
2019-11-12 8:42 ` [v2,net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload Po Liu
2019-11-12 8:42 ` [v2,net-next, 2/2] enetc: update TSN Qbv PSPEED set according to adjust link speed Po Liu
2019-11-12 18:57 ` David Miller
2019-11-14 5:12 ` [v3,net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload Po Liu
2019-11-14 5:12 ` [v3,net-next, 2/2] enetc: update TSN Qbv PSPEED set according to adjust link speed Po Liu
2019-11-15 3:33 ` [v4,net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload Po Liu
2019-11-15 3:33 ` [v4,net-next, 2/2] enetc: update TSN Qbv PSPEED set according to adjust link speed Po Liu
2019-11-16 20:49 ` David Miller
2019-11-15 15:20 ` [v4,net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload Ivan Khoronzhuk
2019-11-16 20:49 ` David Miller
2019-11-14 18:51 ` [v3,net-next, " Ivan Khoronzhuk
2019-11-15 2:37 ` [EXT] " Po Liu
2019-11-12 18:57 ` [v2,net-next, " David Miller
2019-11-12 21:10 ` Ivan Khoronzhuk
2019-11-13 3:45 ` [EXT] " Po Liu
2019-11-13 13:41 ` Ivan Khoronzhuk
2019-11-14 4:39 ` Po Liu
2019-11-12 9:41 ` [net-next, 2/2] enetc: update TSN Qbv PSPEED set according to adjust link speed Simon Horman
2019-11-12 19:59 ` kbuild test robot
2019-11-12 19:59 ` kbuild test robot
2019-11-12 5:50 ` [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload David Miller
2019-11-12 6:48 ` [EXT] " Po Liu
2019-11-12 9:41 ` Simon Horman
2019-11-12 11:19 ` [EXT] " Po Liu
2019-11-12 11:54 ` Claudiu Manoil
2019-11-12 13:46 ` Simon Horman
2019-11-12 13:50 ` Simon Horman
2019-11-12 18:58 ` David Miller
2019-11-12 18:59 ` David Miller
2019-11-13 4:55 ` [EXT] " Po Liu
2019-11-12 12:31 ` kbuild test robot
2019-11-12 12:31 ` kbuild test robot
2019-11-12 12:43 ` kbuild test robot [this message]
2019-11-12 12:43 ` kbuild test robot
2019-11-12 16:03 ` Ivan Khoronzhuk
2019-11-12 22:57 ` kbuild test robot
2019-11-12 22:57 ` kbuild test robot
2019-11-12 22:57 ` [RFC PATCH] enetc: enetc_setup_tc_mqprio() can be static kbuild test robot
2019-11-12 22:57 ` kbuild test robot
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=201911122024.LxCD5byT%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.