Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp82642lqr; Tue, 4 Jun 2024 22:27:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVihQdiIBSjYsNE3NuRkxNycFxpei4RC7+jLMFrKTz1rG2/TK7sa2FSRUwAlcTjH+QL7/W+Wd7J3xorhGxX4G+puIJgztPim/XIUPcj9A== X-Google-Smtp-Source: AGHT+IHxaK0XVfZQxQCyc8WPLVey1Gla4Zni2dEV/hDwW9mlQg6f24y2p3XSID/amGf4p6vTjMTX X-Received: by 2002:a81:6f86:0:b0:618:7a0d:d5ef with SMTP id 00721157ae682-62cbb5064famr13822897b3.28.1717565225811; Tue, 04 Jun 2024 22:27:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717565225; cv=pass; d=google.com; s=arc-20160816; b=nHmagNEBZBcwbCKzg/+ky6tNVUzIxdBgfJvSR5v2FIbYT3EElsFInyJ8zvbogpSNy0 t9AOyzlo1moHM8JB1o2PAh5xKtnbElrwhAqSoqO/urkIpokq0R4VIkTu5pgGTV2H1CqQ HjrGkyiPvx115MjcJ5hdj7GaQ9KVOj1TJhEnNg7vBRI27lwjKZtPmV+QDHyNGvoIAPe7 6J+16qqfrOoDSQgdVXUsBb56MMph8SKiMS7wnd+azg8AvItAUbe0CAMI4l34IuV09lTr 8tqAYuacVbZm7UNXH0XBbXROEYDnHAjXh2XBk9jYPIMWFRKWliFp7pp89bM8ohbsP42l Fd4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=gLp5UQaiZ9Nbta/3ev83gXvw8Hf+0qRq7Af1uLYkp6M=; fh=XpeXTAwf14sz0e0/sr0+DHHao3K7kzuVKRijQzdEvDc=; b=wj0U8rXEg7i0E7xc9YDYpIDG5lJNaIOYDh+28FwPXsaSyEl3+vyVpz24sUn8hXaTEy Uugfcqr43Y20eA3doYpefwAFZuC22gOubWBmX28LGhBdokeA75J/W8TgtzHLIb8zdiG5 wNeuwG6iDSKfQYKk2iVozzJi9Gtb5xiJEpXZjDHkwtbDxXZy4NkL7jxHz9msTkSqq5n8 7lmlF6GBoalKN58TDFlt6sJ/8WRZR6A8u8XBCY0p0WgZTluhgxAvz/L0ixzaCH8x8HCG P5ftGuutDUMZv1ZRhcDashaynAuTx9L/kUE2cPhjxD9f/m8wJIhI3IqscIeqm6hsUSFt wbyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VKK18Grm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-201775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2466ae8si30715751cf.356.2024.06.04.22.27.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 22:27:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VKK18Grm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-201775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7793A1C229B0 for ; Wed, 5 Jun 2024 05:27:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2238C13AD2F; Wed, 5 Jun 2024 05:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VKK18Grm" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D33F8C07 for ; Wed, 5 Jun 2024 05:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717565216; cv=none; b=gd9Jp+unOh8w730g03CsmS5Z6BYVHmC6HYYm88vOABPD52V5GmbMX5kdqlcYnv6PnP4cFv82a03wSGml7bf/ADLrJbMgHuTicydjHLDHuluricENQl9RNHovFh3SsnmZuUJQhMxq7ucRJvWpZgnphavXrqBE5OVASGUCNVEm8pE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717565216; c=relaxed/simple; bh=JWl0dvcLsDyhJpa9XHTWrzG8gS4xKr5gWdK/xlwOF90=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=AF3PJEbyhM3+V40jvl6f3PAmibE7J+AVCav/EmzAZergkLkN9o9VQISbrEIgG83KWFdMvodhuMjjgIN3RDke3nIsNSafK2n0+N9r55eg+0FZwLIfzW4VF+S/QnBsM/hbM+6uQ/4zIxs79gwU0BO7MwjFZEW+Wipthnk74miRqdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VKK18Grm; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a68a288b8a4so225154466b.2 for ; Tue, 04 Jun 2024 22:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717565213; x=1718170013; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gLp5UQaiZ9Nbta/3ev83gXvw8Hf+0qRq7Af1uLYkp6M=; b=VKK18GrmP4u7LAE9/CGvOEPSNV4LxqtuY4bNpPN6nVaWFG1+gLg2nnN4qKjOQJVHd3 yRe3moeo/3DcVfeR8TpYYaeDeAexVA8i25RQBbsHbAjMb5Rx1Xu2N1PQKde6nN7Kx9SM mhLtkKOE7gF6RfEvE6Xs+jJoO4Yy/b+cWDO7QImJffzAFQ9/9TGKdYfH7NSxJUxgqlW4 avGZPeuDrnRybG6OvCc37DZzSQs2DZRA2GQVAtCDaAQMwRXCJbf8e894140UM8pEnwKW 3OGPmk4q9xGPWFCUJldc3StsOLPpbq5iuCPqINcFiLxSQkBNMaZGv1Ol21hf8Rwdisuv 5Ayg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717565213; x=1718170013; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gLp5UQaiZ9Nbta/3ev83gXvw8Hf+0qRq7Af1uLYkp6M=; b=joPZmWgA5B37Do+KaPT0+LBln4PoKS8bhD2jxmCPvrvaNliAQpAi5/h4OBcaBX9egP Mv9x6ibfEKL6nNRKElp8okxEC1txhO+8vt3QyH5jgAiLT3vB+Ki56bEiSAGX3NYlmwsL wYEA8t0eJxqbRRVa+DPx8SyUvx20ST+ABw08+0ksm+8hDOF9UPAnUcXMGpj8rg0dFdsQ 3b7Nn7wfaeECQEo+yzieKzhXgLjQh+0vN7v2V7TUuayFcfmTTTeqtTKfyX6OkmBroOL5 RPAAYt307NvQB4SW2miX5Mv2CjODlH98j9sQFLRy+J4UAYja59c1yi6EuiCC9OQOJV/X V5WA== X-Forwarded-Encrypted: i=1; AJvYcCWAJDe6qx47qBhZKMvqHLvXf6pQY23zkXacHEnkADMBvRQB3XoOObmop2KPXmzkFzyaoh0A3b6UDw7j2QzhDl8iihBlH41X9DGMPIIr X-Gm-Message-State: AOJu0YxJgfQsEmiB/hjxkilfcBPyGXuYo9Ni4Hcm0ZD0VvahSpvDFzg5 EcICTJAM3ENWDhChCqFeYYJaSkmN+JjGMMRIcX0TVUP2kAIwEWdaGdj8kU4MrHU= X-Received: by 2002:a50:9b18:0:b0:579:d673:4e67 with SMTP id 4fb4d7f45d1cf-57a8bc9ba6emr1091753a12.26.1717565212609; Tue, 04 Jun 2024 22:26:52 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31b98de7sm8515234a12.10.2024.06.04.22.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 22:26:52 -0700 (PDT) Date: Wed, 5 Jun 2024 08:26:48 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Xiaolei Wang , 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 Message-ID: <6c78b634-0e83-42dd-81ce-b36999a1b0ef@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240530061453.561708-1-xiaolei.wang@windriver.com> Hi Xiaolei, kernel test robot noticed the following build warnings: 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 | Reported-by: Dan Carpenter | 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