lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240601050601.1782063-3-mika.westerberg@linux.intel.com>
Date: Sat,  1 Jun 2024 08:06:01 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: "David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Corinna Vinschen <vinschen@...hat.com>,
	Hariprasad Kelam <hkelam@...vell.com>,
	Vinicius Costa Gomes <vinicius.gomes@...el.com>,
	Naama Meir <naamax.meir@...ux.intel.com>,
	netdev@...r.kernel.org,
	Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: [PATCH 2/2] igc: Use PCI device pointer in logging in igc_ptp_init()

As described in the commit 86167183a17e ("igc: fix a log entry using
uninitialized netdev"), the netdev has not yet been registered so we get
weird log entry like:

[    5.133667] igc 0000:01:00.0 (unnamed net_device) (uninitialized): PHC added

Fix this by using the PCI device pointer instead, that's valid and
available at this point.

Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
---
 drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index 1bb026232efc..c4a5ddbe6f34 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -1169,9 +1169,9 @@ void igc_ptp_init(struct igc_adapter *adapter)
 						&adapter->pdev->dev);
 	if (IS_ERR(adapter->ptp_clock)) {
 		adapter->ptp_clock = NULL;
-		netdev_err(netdev, "ptp_clock_register failed\n");
+		dev_err(&adapter->pdev->dev, "ptp_clock_register failed\n");
 	} else if (adapter->ptp_clock) {
-		netdev_info(netdev, "PHC added\n");
+		dev_info(&adapter->pdev->dev, "PHC added\n");
 		adapter->ptp_flags |= IGC_PTP_ENABLED;
 	}
 }
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ