From nobody Thu Nov 28 16:45:22 2024 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 5A6341990D1; Mon, 30 Sep 2024 18:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720309; cv=none; b=KlAdEhKI6PuttJ1fRGyef03MiWQx5mfeSc/pz5gthKhxCQfMLELexiGZIRaXy8FjPozzAj9bM3yLJA0TmYHXbW5SE528GQndy4MVExDjbIntrPXLlI5eBgQMC9JkAQtosY9TioBBOu0bbHpKkkUDzILCj9095NSm6xu69vSzU20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720309; c=relaxed/simple; bh=+5DCAmNofiqQxSfTPouF2/P46xP4+6bAFIJeMZcjia8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ES/rVgst/MBnANm22R23cAN2eatMlR54finiNxLoxWbChtk47sQycHS4mX8OOIjSSQxPCAWlmbMegrcx8GrEkM8k04VUA7vWOqRQ7PqUV40ln7ius9Islr2WpJulFDZCXH3pFmmfizRuGGwGka6huT3ooZ19dFQVI5hKZRSfD0w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=g4BocECq; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g4BocECq" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-20b84bfbdfcso8764015ad.0; Mon, 30 Sep 2024 11:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727720307; x=1728325107; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c92ixIRY2KWnqqRQ0uFbE36joymNkXozEPE3FiZECyc=; b=g4BocECqtxnnzYZtVjU53HKsUT6qno3JJllpp9E76S7YBLj9zShIaYUzlc+isq3q9x 92Yr74uZQhgg90lPU184HkLPQqu14ieBsLKaC3uE6bZLT9zIXPfS3VugVNz38PWRKdiC BtBgnX2vGzCxYOUYTqM3wjpWZSe1t0Wv+qu+2eaV0VfOsjtMnNZVLYhOse0RXUPJTMAf CoEYRnU6gbnDAeyzf90oyZtiPYEZCnK3Kyu8EG7c5jX3wnDNDKSvoOZ2mzfKumAu7gRX N0d3tt7gjtvTbtG02RLlogEdY1+vEK+MPWtUJgo/ONUjRmpJiO0zmHhnWH2q2+s6CsHX Hn0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727720307; x=1728325107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c92ixIRY2KWnqqRQ0uFbE36joymNkXozEPE3FiZECyc=; b=tgqwkaoGPylXSfpM9py2epkfeHD/rhIvyH+AZbB7cSsqeJKFptlWNQ6a5nEHTQ0yrK TGmE9uMwj37vnPKUfT31Ip4B/uUUH3bQLZUDEzoRrpHy9JJMPDQcLJ12+TeWn34gAmCf u83Rvq7JY8GjKNOBw5GQ9OITrQNTMBwOF9DZZCbspL6nYYYYFGIO8GthoEwj0z+Wjv+C z43Hrtb+YDP01uvkiI2c6Jg2ohFNNQycG86GoC5OkQs64F+pM0N/wGoZOMWz0lfRjXcz MjzW1xQFSv9cU45wjv9pkTaps9HhHxSSOledYVxD8Wx0UDr/qZN4Usi//RfL3tkVVbpF Dt+Q== X-Forwarded-Encrypted: i=1; AJvYcCXzUlr0JAa1UFs2Agjs7fNWcKCyKMjqo0QMlDv39ConUCbMukNwe3KA6HfsdXtjxMnGNS+YyFBW7QIT7WM=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7vcbmNuZ/rYbJjnjO9UtdNV4mRAaOlaO6TOov8nO9VSdxw8W4 LUmzi1aNpQcX0uOmEL5LbuENZxazu3xNkDZASbt4YzncilAnS30UO8ttNJs+ X-Google-Smtp-Source: AGHT+IGVz6KimAeENwWbsdFMBCHcSSj5y2auLCcU6IKBtDcSW9Bdzx3AyNecMdnUQ6RpH/8zBLTRrA== X-Received: by 2002:a17:903:1105:b0:20b:5aeb:9b8 with SMTP id d9443c01a7336-20ba9f061e2mr8160785ad.24.1727720307429; Mon, 30 Sep 2024 11:18:27 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37db029csm57444365ad.106.2024.09.30.11.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:18:26 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCH net-next 1/5] net: ag71xx: use devm_ioremap_resource Date: Mon, 30 Sep 2024 11:18:19 -0700 Message-ID: <20240930181823.288892-2-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930181823.288892-1-rosenp@gmail.com> References: <20240930181823.288892-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We can just use res directly. Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/a= theros/ag71xx.c index 9586b6894f7e..9c85450ce859 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1841,9 +1841,9 @@ static int ag71xx_probe(struct platform_device *pdev) return PTR_ERR(ag->mac_reset); } =20 - ag->mac_base =3D devm_ioremap(&pdev->dev, res->start, resource_size(res)); - if (!ag->mac_base) - return -ENOMEM; + ag->mac_base =3D devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(ag->mac_base)) + return PTR_ERR(ag->mac_base); =20 /* ensure that HW is in manual polling mode before interrupts are * activated. Otherwise ag71xx_interrupt might call napi_schedule --=20 2.46.2 From nobody Thu Nov 28 16:45:22 2024 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 E41F2199FCD; Mon, 30 Sep 2024 18:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720311; cv=none; b=k/FUnmsSx0Epkv2ldmDI1JCOcKa4Wi+X3qq6riOc1uubLXIgGy1hqolavarmy6RNuIhBxLEd87ovx0LGIF4vrU7Hrr2wP1FkjikcoTM9CIizH5828rTln6QMNSvtiOyzqae8SGltak3q/2TZiAtM/RsDErEoZ0Ucb0loi/lO34s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720311; c=relaxed/simple; bh=J2w0NK0mEOp+LmcZQ6HcXuYL0pgsoyNbTzZX+qkTdSE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g0m4gi4jLafaDtFbKebnpWmawsfb7zglKU8o/VlU1fGXDtIAICVI+aXglmjP6mMC66MDMYm8145uYrOPFxx8kk739D9N8g6ggGPLV2r2HSeomMBP5kPTsEoQykODM4EB/MN4UxSMhtIbfU3T8K2TfNBY9X/meUA2UchiVgJr4WM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dwjDx+b5; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dwjDx+b5" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-20b1335e4e4so42728825ad.0; Mon, 30 Sep 2024 11:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727720309; x=1728325109; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MPUoZMLAK+WibpLUoFoyAZDdX6Yikvf8jxcRrCws23I=; b=dwjDx+b5li8+HOzXZecXbPjEzr2C65J1tuLmlOYWyoP3TG+sYAjEAw7C5F4lT/yUrl C4YKnezC2FVhz0pMoxSrGgo7wZ5+glFkKylZzrj9JRWKv3gnZV5tMo6oI51GDkp3nKXx HqK3QDmam7a2gsMDxQgygR6GDfCalBVNctygHOZ2BvII3zXsgBIKN6rjqNeZUUU2OjPE l89T1P+0ru+MvSYyRx3t/+qQy9sTY/81R++RKSRIdsxruMZyI6xfMKeRPPU1GTiY7iPW ZHV7rebGGuVXeSZwhvVC2HX77Gr9yrvAxtZ16fWSZEUUCUWnE8U1xzyrTSOCjfvvihHc WDzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727720309; x=1728325109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MPUoZMLAK+WibpLUoFoyAZDdX6Yikvf8jxcRrCws23I=; b=oxAXhBIZozVUFX06BWnFHr0amJzNcNtIxK8OnvZBl1cl2MBu2/7yd8nyVXRO0c5UEy LlCqTjP05AzaWS2/3AVrvUd8RYRsUppJcs3sJF7uXK0xmafhXTCqXUYJ8foaWCYecUAc HPxcurg1JRwWP6seZnusfYSpjEKPVlPeQkAkQJbvbr9pjbTGwaEslBHZHMxJgYGP51L3 3dNBbScEQ5k3s3Wx6SgAObvNcjeWN7P0Fy3B+WCv1DC3DRcIbFZLosy9nroxi41fUWe8 DD/jQkDOEWxQwSGo5pQOLyWhzCvsc7uCCXEqFPYb7gOTetjvPk8Un9Ech0pDX0pmEBLT TnGQ== X-Forwarded-Encrypted: i=1; AJvYcCUwolqVTkys6uyk6oSv1qf3mGKYvk/H7eTp7iV48AP52zu02WQ9xPXmzzRlwkd9msDSZhHwocceicjEPss=@vger.kernel.org X-Gm-Message-State: AOJu0YyyNE/bku0tNi11pHIHzLzrZHyv24DbA6VTqUXtjd1N6wvItnlo Z1GiZqVHzUQQh1c7XzcusqDe7difD+JAM0EPTCLlMpFLJ3HoDvJI4/jJV95I X-Google-Smtp-Source: AGHT+IHZXpE14UMKh+i8Ji81+V/x+oL4tWR1eYeUjhIBxCMZ8CMfbgZ3rcEAjy6eCcfpd1VmpC11Zg== X-Received: by 2002:a17:903:2285:b0:20b:6d5c:8ed with SMTP id d9443c01a7336-20b6d5c0b9dmr87195915ad.61.1727720309072; Mon, 30 Sep 2024 11:18:29 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37db029csm57444365ad.106.2024.09.30.11.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:18:28 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCH net-next 2/5] net: ag71xx: use some dev_err_probe Date: Mon, 30 Sep 2024 11:18:20 -0700 Message-ID: <20240930181823.288892-3-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930181823.288892-1-rosenp@gmail.com> References: <20240930181823.288892-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" These functions can return EPROBE_DEFER. Don't warn in such a case. Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/a= theros/ag71xx.c index 9c85450ce859..195354b0a187 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1822,10 +1822,9 @@ static int ag71xx_probe(struct platform_device *pdev) } =20 clk_eth =3D devm_clk_get_enabled(&pdev->dev, "eth"); - if (IS_ERR(clk_eth)) { - netif_err(ag, probe, ndev, "Failed to get eth clk.\n"); - return PTR_ERR(clk_eth); - } + if (IS_ERR(clk_eth)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk_eth), + "Failed to get eth clk."); =20 SET_NETDEV_DEV(ndev, &pdev->dev); =20 @@ -1836,10 +1835,9 @@ static int ag71xx_probe(struct platform_device *pdev) memcpy(ag->fifodata, dcfg->fifodata, sizeof(ag->fifodata)); =20 ag->mac_reset =3D devm_reset_control_get(&pdev->dev, "mac"); - if (IS_ERR(ag->mac_reset)) { - netif_err(ag, probe, ndev, "missing mac reset\n"); - return PTR_ERR(ag->mac_reset); - } + if (IS_ERR(ag->mac_reset)) + return dev_err_probe(&pdev->dev, PTR_ERR(ag->mac_reset), + "missing mac reset"); =20 ag->mac_base =3D devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(ag->mac_base)) @@ -1920,10 +1918,9 @@ static int ag71xx_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ndev); =20 err =3D ag71xx_phylink_setup(ag); - if (err) { - netif_err(ag, probe, ndev, "failed to setup phylink (%d)\n", err); - return err; - } + if (err) + return dev_err_probe(&pdev->dev, err, + "failed to setup phylink"); =20 err =3D devm_register_netdev(&pdev->dev, ndev); if (err) { --=20 2.46.2 From nobody Thu Nov 28 16:45:22 2024 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 507D219AD8B; Mon, 30 Sep 2024 18:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720313; cv=none; b=JDAY1JOx/EDm7dqyaj7GTSaOGT9bBFTbwYiAYUGooo2iWpR7b0wpuuyOtyBVBEV6/+cd7Ni+beG9FlRTwibf9WtxC4SyQMpuK1Q1EyMePevn08vqayPIYHJ4VuMlrK4HWQ/boE1+ElKPPjZUX6hN4sBQCmTsuyXm8IB1aypmHKg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720313; c=relaxed/simple; bh=IXBYFs0iDJMEWJmoXZXSewI92WyeES9G4AqBRYsDqOI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lhDscG+0t/YRrNCiMs7WRJzmwdglz9uYSsBm+ERruiqKe6yFpTFCTPVRd/7MCYiLulcy6cJvPmK19HU6CZ+9nDjSaMAn4NcbhlOVxhsl8NjXQatsSZJY+cJlC/qSMrotx2Ud4rVNwoScm7GvcEEruA+Mt1UFd/uwar8OS4iILuo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hwGgMr5S; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hwGgMr5S" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-20ba733b6faso3537515ad.0; Mon, 30 Sep 2024 11:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727720310; x=1728325110; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2NksXPSwBAvRuzYIT4BTX0jsTpGZ9Ko/iJdBXkmtOTI=; b=hwGgMr5S3xA0ga4e1da4soG6TVRDtaXahAT9fwxtoPE2XVatIfrjlUgFYOcJAK7Wge U9Q6Be8ze8t19MCdioTtWWJu1I4sjtEK47tjpZdLPmA3LbfgF82s/JlabdeeYcGVuHPq BwmT5dkGiSog3EXPCfROxL570fmhYVSu/eSqYVXczWbwPajfxnXQTo6BTNtnwmPiE9sM a89zlm7mZYxBN5tEWZulnwmQIYMK1dRysZq8W8YjoxnsnTIM3xfNWvJ2J/OgITpBHBOn MYWf1XPHEEOJvXpNBhKGVUt1iK9QbNNhE2ZXohdmDGEVhEfrLP3zFlMqEcotXPH/4SCG oDQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727720310; x=1728325110; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2NksXPSwBAvRuzYIT4BTX0jsTpGZ9Ko/iJdBXkmtOTI=; b=US+zG0HY2Nh0fXKK9xuf3pIv+2NxayW2zTo5Ute9IbKrGAR6URlxEV3jYkB9JANNvX qBpmZuUY+4LmigzMirPdUEBW/SlUCJlf4h65n1rYkkJ/Libqcgff7Diqm1t+km1UX+dY zOBTtw2bgIpgNmaoGEz9BIk0O9akMc55CT4ccsmZbAx1hMGrKRpcWCz9nILy2pzaWbMl Y3hMhFEiBH0dajuT8+aqCT2VWb9T7eJl+zMsYZUt+pJ4Alqoh2Qem7KZ6aoay4DWR7IS Kv9vLzkdrNokRoA2cdp4IWGHr1WdtsQQUTT3rZNsW8M/SM1EQMuGtwYrmJp1JToHZ3rI /a2Q== X-Forwarded-Encrypted: i=1; AJvYcCWeOTi8FyHV80KsDgp2JkHwBNvkA//F/G5y+ikZWGo+vIMNq2DarCNcFL8qts0LwHAVJoDNTval0MIMIyg=@vger.kernel.org X-Gm-Message-State: AOJu0YxOgAqaVA9ce94rrcklA1IK5Z/BztW+yYgTgbQij6MP832uY2su 2GwapODIpDNRN4fj3JKUNH/mXTPqqcXrUeVztRHCEyLgQcCIstjXHmDowOxv X-Google-Smtp-Source: AGHT+IG2n2Dhs+MOq3zPa8niBB6RW0yHZT6wcWpvW27Ks3cX59EJG2nrlSCcl9hHydj0ezhefLLDRg== X-Received: by 2002:a17:902:e749:b0:20b:9062:7b00 with SMTP id d9443c01a7336-20b90627dc7mr47505055ad.0.1727720310473; Mon, 30 Sep 2024 11:18:30 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37db029csm57444365ad.106.2024.09.30.11.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:18:30 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCH net-next 3/5] net: ag71xx: remove platform_set_drvdata Date: Mon, 30 Sep 2024 11:18:21 -0700 Message-ID: <20240930181823.288892-4-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930181823.288892-1-rosenp@gmail.com> References: <20240930181823.288892-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" platform_get_drvdata is never called as a result of all the devm conversions. Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/a= theros/ag71xx.c index 195354b0a187..ec360a3e9f0e 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1915,8 +1915,6 @@ static int ag71xx_probe(struct platform_device *pdev) if (err) return err; =20 - platform_set_drvdata(pdev, ndev); - err =3D ag71xx_phylink_setup(ag); if (err) return dev_err_probe(&pdev->dev, err, @@ -1925,7 +1923,6 @@ static int ag71xx_probe(struct platform_device *pdev) err =3D devm_register_netdev(&pdev->dev, ndev); if (err) { netif_err(ag, probe, ndev, "unable to register net device\n"); - platform_set_drvdata(pdev, NULL); return err; } =20 --=20 2.46.2 From nobody Thu Nov 28 16:45:22 2024 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 A65B219ADB6; Mon, 30 Sep 2024 18:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720314; cv=none; b=JT2+cJwuy4DL4fEIxt/Dp+jvXmJK0aHhBkDwF5kV8gjJYrViMyR1lIEa4H9QJt1MPQgXwv5x6f82wdMDZqhaBjO3ow6uTkQOzRdSdEm2e771Jh2TUSxlvkJ25O5q3vxXceXliqJN9SxTHCMTy6Cnj2I6IOyR3ZIf2Hc6kIv6auk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720314; c=relaxed/simple; bh=5ozNaIGmskdHCWNw24hJsVQC/5dhOLjK/bmmgAkTjIk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TZGYHS7keiQAwjkTMp9Zy96q5feYteWNxLHGD0zk6CioswZkaRPxwrKOPUIXiT1k68QxjDo2Ywkjo6XPwXA1byJ7AnwDGDv7D+ewMBABOnbDelV4W4UsNNEuFCQ334+EmSFqQOMt28tBASWEnBCtHaoswd5+C0keDC+aNo6NI2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NNuDdP2p; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NNuDdP2p" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-20ba6b39a78so3870365ad.3; Mon, 30 Sep 2024 11:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727720312; x=1728325112; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CAMBZJ2HCcR6enXUwvhotyHNyYUBC52QPo0eDVNRKS8=; b=NNuDdP2pLLTH4ilV1+FKTXBWypJ4wo4DrwZ0vFjtd4Bk7N3uEanO/Ubrmy1pZzyFV6 3EKkz42nAAupBAE8Di6U86J2+fqog7zSPlV9Mm7xo1ikI2OynJyKRs0eWZ8MogQwWFJ2 b7UIhwjGyeSnu7JRreZnuAAUMROh6zhmYt+xO2mCPTk9eyX0tv4wYndfSvvaUfsuavlu BOqkYJccyRICd77RruSbuEHTnLRXsyYkgIoBiqTfABs+suc8fdRlaYETK2thUh75QHde rJGgxyOgZtc8D/N57svCnezen/qAzQhV6HFyf4UctnHsyQyd4gwVMaind6htbwJqHYuP e6lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727720312; x=1728325112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CAMBZJ2HCcR6enXUwvhotyHNyYUBC52QPo0eDVNRKS8=; b=eE5Dflp/TGvI/KqIkNJTnjPpK/PRRZoJpAuoa+TLeCsdXCqyaSVOtpiAGBUJpGQB1e LpuBipM8Ki+iqIPlyBkyjo72ibeYCCK0rk3R34iZ8u3Dzzi01ab9KZscyCI2lsHXQHvu INpFhLYhefx0KVNNqt1BCu8i92sNA2VgHfsIBpj7N4EtxXB0Hus3TvNfKHsb6n5Dfnai zmDn4vwSEvf/q0QK4oANwLrwXwIiXw0mjtA7SDtxBciCj+tGH6TiqpZ82pXzqkSU1vRg z1XX3xXxp6+GL0zFI/ntcrTGQeG1oO9kCxOoOhVesyW4F0Gy/o4PHe+ewLlw6YRfZW4o 5sOQ== X-Forwarded-Encrypted: i=1; AJvYcCUd/zwJ+GpaIOgPxZIr6SKoyJvgdUxVpFIpqm4Z0iJoe3WbbkMbtXeTKn1oZI56JQonyvANbz7jpdLXZrw=@vger.kernel.org X-Gm-Message-State: AOJu0YyMJ2tLyEvRgMn5/RN9ULq5emoMvOhYi1CYI167n0btLWHrufZp Hiw5ka9gOUPDHbELtXLarbXgIEtInZYR/huv3Dag34m0QkiFo8+cuXpWKRTY X-Google-Smtp-Source: AGHT+IFguj+kjFghj/4/0r3q3ZY/SDKeExK2vlQYCJ3k/F0RSmS6N6xRsxbA8M5OP0HtD7xlD9wIUg== X-Received: by 2002:a17:902:ec85:b0:20b:8a93:eeff with SMTP id d9443c01a7336-20b8a93f3e6mr46121365ad.37.1727720311911; Mon, 30 Sep 2024 11:18:31 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37db029csm57444365ad.106.2024.09.30.11.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:18:31 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCH net-next 4/5] net: ag71xx: replace INIT_LIST_HEAD Date: Mon, 30 Sep 2024 11:18:22 -0700 Message-ID: <20240930181823.288892-5-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930181823.288892-1-rosenp@gmail.com> References: <20240930181823.288892-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" LIST_HEAD is a shorter macro. No real difference. Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/a= theros/ag71xx.c index ec360a3e9f0e..067a012a5799 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1598,8 +1598,8 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int l= imit) int ring_mask, ring_size, done =3D 0; unsigned int pktlen_mask, offset; struct ag71xx_ring *ring; - struct list_head rx_list; struct sk_buff *skb; + LIST_HEAD(rx_list); =20 ring =3D &ag->rx_ring; pktlen_mask =3D ag->dcfg->desc_pktlen_mask; @@ -1610,8 +1610,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int l= imit) netif_dbg(ag, rx_status, ndev, "rx packets, limit=3D%d, curr=3D%u, dirty= =3D%u\n", limit, ring->curr, ring->dirty); =20 - INIT_LIST_HEAD(&rx_list); - while (done < limit) { unsigned int i =3D ring->curr & ring_mask; struct ag71xx_desc *desc =3D ag71xx_ring_desc(ring, i); --=20 2.46.2 From nobody Thu Nov 28 16:45:22 2024 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 5307419B5B8; Mon, 30 Sep 2024 18:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720315; cv=none; b=jbK7sWi26AyHcc3XQ7E522g5HVw18MxPHuIofEwwqBWc+fF1A0k+hSlzUctT+e8ROwH0juAUViQ7b5vfELU166/JSkujOGC3aJgGGXw2pXTqybs+G9HKL2V+E+Xblg+KztEPUDjV0N2Uk7FPKZlaYJ3aREqelGlBoWbRWwRWg4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727720315; c=relaxed/simple; bh=GwHU+XsAiYxMZdaaMiGMyEwVRRgDrPlyJrnPNW0Klsc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cyVd3a86/tY+vNro1aB70vY+xayUioRGMHJoUHhkeK45c8ya7NupoESr+mHNPt98bYf94K0rBKfH3C6yzTsxuFi2Aw2wZmOKtU02UUEVTGjgcZzycWMKss27OfqXzudjbI4DbVlpHV1xesAYrPim/0B1iHywwFWRyyZz4bS3ig8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mc36TKCe; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mc36TKCe" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-20b49ee353cso30028995ad.2; Mon, 30 Sep 2024 11:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727720313; x=1728325113; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4DAUKH2ZXJLhuZ+tX0oV+9biDNj8096e3CTTAZ5iFsE=; b=mc36TKCetb60aPzMfqD6cAx9CLEI/OpMjofxRA6OaP5R43O5jRh0Un0ctLbvcILyai yKxNO7g0bQImQe9pM1T0HM/PtvyeM/Gur+yDR2ThvEvF2QKwRoPKekKtT0iSqWJ6hIjc sPyVJRE/EoBqdswP7y1veqGgxGKXOiTXucaJQDadcZnda1mC3EyaY4LdVTQ8GYhQbhyX oMkPpxzetwV356zab+DDLFI8f7m55Tfo2Auy6h8HLfQ613vhojSct8xUKHgqkoVEuqCO jGV0ljD9INd8ClfimTOkhGXc21DvkaEqVSd9rUVs/knm9nUSo7rjVtx4bWLvxN2ppGIR AqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727720313; x=1728325113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4DAUKH2ZXJLhuZ+tX0oV+9biDNj8096e3CTTAZ5iFsE=; b=ggABeLHLXSrPBIjx2KC5OsBjaNFOxgq9eqhdkkrV6jm63iX7fznVDLoAvgQZjCPD0Q sPfHCY2gCektqU2Vv87vbmQN7fKf0cNCXmvbDylQRby2Kla7fuJxxeryFtAonx/UEaH3 1LRAZlWsNwzfMDna+BX70h9ibQGZUiPXuLzO+0Cja3MMV6zVfgzUDoha+a/76MPMZ6Aq 5ovWVQUC4oIlaD+ad8rGgrznB/jZNQb53mcfsi2xpp/BZh7sKjZaUNtraKITalK0bYmq +QM/W/W63eIQm0iCN5LQac6mJsEX/1zo6SReRipyWz/Sv+P3RkX/EmOu3hgfSkbSXNo4 mD8g== X-Forwarded-Encrypted: i=1; AJvYcCXBGDfKt7yTxaWKwDvlsMpePNqymeqCg+AKy9cEKKoDYJoM105x3TyIaZqzfGzjcfPGkfIUZ/hcmUCYQoY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5k4c8tRYdRUVCxl7Y2lFIvOXUEN8PYtDvVa5ddFJZ+dw9g4lw 18iVk/R8YYps9OugfkuKuT6OH296FT32grEcxYddYxMuWKVGpjuu/0wMKqhp X-Google-Smtp-Source: AGHT+IHRyoXm2w1i4wRSyxqf/mX3BHtcGkAhICsB2tppE65ITKEBjN6tq6zcq3o93oysyKUAWKBQXQ== X-Received: by 2002:a17:903:1c7:b0:206:bdb7:7637 with SMTP id d9443c01a7336-20b37b9b923mr228502125ad.48.1727720313367; Mon, 30 Sep 2024 11:18:33 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37db029csm57444365ad.106.2024.09.30.11.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:18:32 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, p.zabel@pengutronix.de Subject: [PATCH net-next 5/5] net: ag71xx: move assignment into main loop Date: Mon, 30 Sep 2024 11:18:23 -0700 Message-ID: <20240930181823.288892-6-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240930181823.288892-1-rosenp@gmail.com> References: <20240930181823.288892-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Effectively what's going on here is there's a main loop and an identical one below with a single assignment. Simpler to move it up. Signed-off-by: Rosen Penev --- drivers/net/ethernet/atheros/ag71xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/a= theros/ag71xx.c index 067a012a5799..3d4c3d8698e2 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1646,6 +1646,7 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int l= imit) =20 skb->dev =3D ndev; skb->ip_summed =3D CHECKSUM_NONE; + skb->protocol =3D eth_type_trans(skb, ndev); list_add_tail(&skb->list, &rx_list); =20 next: @@ -1657,8 +1658,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int l= imit) =20 ag71xx_ring_rx_refill(ag); =20 - list_for_each_entry(skb, &rx_list, list) - skb->protocol =3D eth_type_trans(skb, ndev); netif_receive_skb_list(&rx_list); =20 netif_dbg(ag, rx_status, ndev, "rx finish, curr=3D%u, dirty=3D%u, done=3D= %d\n", --=20 2.46.2