From: xiaolei wang <xiaolei.wang@windriver.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
oe-kbuild@lists.linux.dev, linux@armlinux.org.uk,
alexandre.torgue@foss.st.com, joabreu@synopsys.com,
andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [net v2 PATCH] net: stmmac: Update CBS parameters when speed changes after linking up
Date: Wed, 5 Jun 2024 13:30:49 +0800 [thread overview]
Message-ID: <b2243507-764f-4ab6-9ad7-c94076a18316@windriver.com> (raw)
In-Reply-To: <6c78b634-0e83-42dd-81ce-b36999a1b0ef@moroto.mountain>
On 6/5/24 13:26, Dan Carpenter wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Hi Xiaolei,
>
> kernel test robot noticed the following build warnings:
Please drop this patch as there are still some questions on this issue
thanks
xiaolei
>
> url: https://github.com/intel-lab-lkp/linux/commits/Xiaolei-Wang/net-stmmac-Update-CBS-parameters-when-speed-changes-after-linking-up/20240530-141843
> base: net/main
> patch link: https://lore.kernel.org/r/20240530061453.561708-1-xiaolei.wang%40windriver.com
> patch subject: [net v2 PATCH] net: stmmac: Update CBS parameters when speed changes after linking up
> config: i386-randconfig-141-20240604 (https://download.01.org/0day-ci/archive/20240605/202406050318.jsyBFsxx-lkp@intel.com/config)
> compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
>
> 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>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202406050318.jsyBFsxx-lkp@intel.com/
>
> New smatch warnings:
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3234 stmmac_configure_cbs() error: uninitialized symbol 'ptr'.
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3234 stmmac_configure_cbs() error: uninitialized symbol 'speed_div'.
>
> vim +/ptr +3234 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>
> 19d9187317979c Joao Pinto 2017-03-10 3194 static void stmmac_configure_cbs(struct stmmac_priv *priv)
> 19d9187317979c Joao Pinto 2017-03-10 3195 {
> 19d9187317979c Joao Pinto 2017-03-10 3196 u32 tx_queues_count = priv->plat->tx_queues_to_use;
> 19d9187317979c Joao Pinto 2017-03-10 3197 u32 mode_to_use;
> 19d9187317979c Joao Pinto 2017-03-10 3198 u32 queue;
> 882212f550d669 Xiaolei Wang 2024-05-30 3199 u32 ptr, speed_div;
> 882212f550d669 Xiaolei Wang 2024-05-30 3200 u64 value;
> 882212f550d669 Xiaolei Wang 2024-05-30 3201
> 882212f550d669 Xiaolei Wang 2024-05-30 3202 /* Port Transmit Rate and Speed Divider */
> 882212f550d669 Xiaolei Wang 2024-05-30 3203 switch (priv->speed) {
> 882212f550d669 Xiaolei Wang 2024-05-30 3204 case SPEED_10000:
> 882212f550d669 Xiaolei Wang 2024-05-30 3205 ptr = 32;
> 882212f550d669 Xiaolei Wang 2024-05-30 3206 speed_div = 10000000;
> 882212f550d669 Xiaolei Wang 2024-05-30 3207 break;
> 882212f550d669 Xiaolei Wang 2024-05-30 3208 case SPEED_5000:
> 882212f550d669 Xiaolei Wang 2024-05-30 3209 ptr = 32;
> 882212f550d669 Xiaolei Wang 2024-05-30 3210 speed_div = 5000000;
> 882212f550d669 Xiaolei Wang 2024-05-30 3211 break;
> 882212f550d669 Xiaolei Wang 2024-05-30 3212 case SPEED_2500:
> 882212f550d669 Xiaolei Wang 2024-05-30 3213 ptr = 8;
> 882212f550d669 Xiaolei Wang 2024-05-30 3214 speed_div = 2500000;
> 882212f550d669 Xiaolei Wang 2024-05-30 3215 break;
> 882212f550d669 Xiaolei Wang 2024-05-30 3216 case SPEED_1000:
> 882212f550d669 Xiaolei Wang 2024-05-30 3217 ptr = 8;
> 882212f550d669 Xiaolei Wang 2024-05-30 3218 speed_div = 1000000;
> 882212f550d669 Xiaolei Wang 2024-05-30 3219 break;
> 882212f550d669 Xiaolei Wang 2024-05-30 3220 case SPEED_100:
> 882212f550d669 Xiaolei Wang 2024-05-30 3221 ptr = 4;
> 882212f550d669 Xiaolei Wang 2024-05-30 3222 speed_div = 100000;
> 882212f550d669 Xiaolei Wang 2024-05-30 3223 break;
> 882212f550d669 Xiaolei Wang 2024-05-30 3224 default:
> 882212f550d669 Xiaolei Wang 2024-05-30 3225 netdev_dbg(priv->dev, "link speed is not known\n");
>
> return;?
>
> 882212f550d669 Xiaolei Wang 2024-05-30 3226 }
> 19d9187317979c Joao Pinto 2017-03-10 3227
> 44781fef137896 Joao Pinto 2017-03-31 3228 /* queue 0 is reserved for legacy traffic */
> 44781fef137896 Joao Pinto 2017-03-31 3229 for (queue = 1; queue < tx_queues_count; queue++) {
> 19d9187317979c Joao Pinto 2017-03-10 3230 mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use;
> 19d9187317979c Joao Pinto 2017-03-10 3231 if (mode_to_use == MTL_QUEUE_DCB)
> 19d9187317979c Joao Pinto 2017-03-10 3232 continue;
> 19d9187317979c Joao Pinto 2017-03-10 3233
> 882212f550d669 Xiaolei Wang 2024-05-30 @3234 value = div_s64(priv->old_idleslope[queue] * 1024ll * ptr, speed_div);
> ^^^ ^^^^^^^^^^
> Uninitialized.
>
> 882212f550d669 Xiaolei Wang 2024-05-30 3235 priv->plat->tx_queues_cfg[queue].idle_slope = value & GENMASK(31, 0);
> 882212f550d669 Xiaolei Wang 2024-05-30 3236
> 882212f550d669 Xiaolei Wang 2024-05-30 3237 value = div_s64(-priv->old_sendslope[queue] * 1024ll * ptr, speed_div);
> 882212f550d669 Xiaolei Wang 2024-05-30 3238 priv->plat->tx_queues_cfg[queue].send_slope = value & GENMASK(31, 0);
> 882212f550d669 Xiaolei Wang 2024-05-30 3239
> c10d4c82a5c84c Jose Abreu 2018-04-16 3240 stmmac_config_cbs(priv, priv->hw,
> 19d9187317979c Joao Pinto 2017-03-10 3241 priv->plat->tx_queues_cfg[queue].send_slope,
> 19d9187317979c Joao Pinto 2017-03-10 3242 priv->plat->tx_queues_cfg[queue].idle_slope,
> 19d9187317979c Joao Pinto 2017-03-10 3243 priv->plat->tx_queues_cfg[queue].high_credit,
> 19d9187317979c Joao Pinto 2017-03-10 3244 priv->plat->tx_queues_cfg[queue].low_credit,
> 19d9187317979c Joao Pinto 2017-03-10 3245 queue);
> 19d9187317979c Joao Pinto 2017-03-10 3246 }
> 19d9187317979c Joao Pinto 2017-03-10 3247 }
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
prev parent reply other threads:[~2024-06-05 5:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 6:14 Xiaolei Wang
2024-05-30 12:50 ` Andrew Lunn
2024-05-30 13:28 ` Vladimir Oltean
2024-05-30 13:40 ` Russell King (Oracle)
2024-05-30 13:53 ` Vladimir Oltean
2024-05-30 14:14 ` Russell King (Oracle)
2024-05-30 14:35 ` Vladimir Oltean
2024-05-31 8:23 ` xiaolei wang
2024-05-30 16:13 ` Jakub Kicinski
2024-06-05 5:26 ` Dan Carpenter
2024-06-05 5:30 ` xiaolei wang [this message]
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=b2243507-764f-4ab6-9ad7-c94076a18316@windriver.com \
--to=xiaolei.wang@windriver.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lkp@intel.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@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
all inboxes | Powered by JetHome®