All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sfc: Don't use netif_info before net_device setup
@ 2021-10-19 22:40 Erik Ekman
  2021-10-21 10:07 ` Martin Habets
  2021-10-21 23:33 ` Jesse Brandeburg
  0 siblings, 2 replies; 3+ messages in thread
From: Erik Ekman @ 2021-10-19 22:40 UTC (permalink / raw)
  To: Edward Cree, Martin Habets, David S. Miller, Jakub Kicinski
  Cc: Erik Ekman, netdev, linux-kernel

Use pci_info instead to avoid unnamed/uninitialized noise:

[197088.688729] sfc 0000:01:00.0: Solarflare NIC detected
[197088.690333] sfc 0000:01:00.0: Part Number : SFN5122F
[197088.729061] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no SR-IOV VFs probed
[197088.729071] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no PTP support

Inspired by fa44821a4ddd ("sfc: don't use netif_info et al before
net_device is registered") from Heiner Kallweit.

Signed-off-by: Erik Ekman <erik@kryo.se>
---
 drivers/net/ethernet/sfc/ptp.c         | 4 ++--
 drivers/net/ethernet/sfc/siena_sriov.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index a39c5143b386..797e51802ccb 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -648,7 +648,7 @@ static int efx_ptp_get_attributes(struct efx_nic *efx)
 	} else if (rc == -EINVAL) {
 		fmt = MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS;
 	} else if (rc == -EPERM) {
-		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
+		pci_info(efx->pci_dev, "no PTP support\n");
 		return rc;
 	} else {
 		efx_mcdi_display_error(efx, MC_CMD_PTP, sizeof(inbuf),
@@ -824,7 +824,7 @@ static int efx_ptp_disable(struct efx_nic *efx)
 	 * should only have been called during probe.
 	 */
 	if (rc == -ENOSYS || rc == -EPERM)
-		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
+		pci_info(efx->pci_dev, "no PTP support\n");
 	else if (rc)
 		efx_mcdi_display_error(efx, MC_CMD_PTP,
 				       MC_CMD_PTP_IN_DISABLE_LEN,
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c
index 83dcfcae3d4b..441e7f3e5375 100644
--- a/drivers/net/ethernet/sfc/siena_sriov.c
+++ b/drivers/net/ethernet/sfc/siena_sriov.c
@@ -1057,7 +1057,7 @@ void efx_siena_sriov_probe(struct efx_nic *efx)
 		return;
 
 	if (efx_siena_sriov_cmd(efx, false, &efx->vi_scale, &count)) {
-		netif_info(efx, probe, efx->net_dev, "no SR-IOV VFs probed\n");
+		pci_info(efx->pci_dev, "no SR-IOV VFs probed\n");
 		return;
 	}
 	if (count > 0 && count > max_vfs)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sfc: Don't use netif_info before net_device setup
  2021-10-19 22:40 [PATCH] sfc: Don't use netif_info before net_device setup Erik Ekman
@ 2021-10-21 10:07 ` Martin Habets
  2021-10-21 23:33 ` Jesse Brandeburg
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Habets @ 2021-10-21 10:07 UTC (permalink / raw)
  To: Erik Ekman
  Cc: Edward Cree, David S. Miller, Jakub Kicinski, netdev, linux-kernel

On Wed, Oct 20, 2021 at 12:40:16AM +0200, Erik Ekman wrote:
> Use pci_info instead to avoid unnamed/uninitialized noise:
> 
> [197088.688729] sfc 0000:01:00.0: Solarflare NIC detected
> [197088.690333] sfc 0000:01:00.0: Part Number : SFN5122F
> [197088.729061] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no SR-IOV VFs probed
> [197088.729071] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no PTP support
> 
> Inspired by fa44821a4ddd ("sfc: don't use netif_info et al before
> net_device is registered") from Heiner Kallweit.
> 
> Signed-off-by: Erik Ekman <erik@kryo.se>

Acked-by: Martin Habets <habetsm.xilinx@gmail.com>

> ---
>  drivers/net/ethernet/sfc/ptp.c         | 4 ++--
>  drivers/net/ethernet/sfc/siena_sriov.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
> index a39c5143b386..797e51802ccb 100644
> --- a/drivers/net/ethernet/sfc/ptp.c
> +++ b/drivers/net/ethernet/sfc/ptp.c
> @@ -648,7 +648,7 @@ static int efx_ptp_get_attributes(struct efx_nic *efx)
>  	} else if (rc == -EINVAL) {
>  		fmt = MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS;
>  	} else if (rc == -EPERM) {
> -		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
> +		pci_info(efx->pci_dev, "no PTP support\n");
>  		return rc;
>  	} else {
>  		efx_mcdi_display_error(efx, MC_CMD_PTP, sizeof(inbuf),
> @@ -824,7 +824,7 @@ static int efx_ptp_disable(struct efx_nic *efx)
>  	 * should only have been called during probe.
>  	 */
>  	if (rc == -ENOSYS || rc == -EPERM)
> -		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
> +		pci_info(efx->pci_dev, "no PTP support\n");
>  	else if (rc)
>  		efx_mcdi_display_error(efx, MC_CMD_PTP,
>  				       MC_CMD_PTP_IN_DISABLE_LEN,
> diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c
> index 83dcfcae3d4b..441e7f3e5375 100644
> --- a/drivers/net/ethernet/sfc/siena_sriov.c
> +++ b/drivers/net/ethernet/sfc/siena_sriov.c
> @@ -1057,7 +1057,7 @@ void efx_siena_sriov_probe(struct efx_nic *efx)
>  		return;
>  
>  	if (efx_siena_sriov_cmd(efx, false, &efx->vi_scale, &count)) {
> -		netif_info(efx, probe, efx->net_dev, "no SR-IOV VFs probed\n");
> +		pci_info(efx->pci_dev, "no SR-IOV VFs probed\n");
>  		return;
>  	}
>  	if (count > 0 && count > max_vfs)
> -- 
> 2.31.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sfc: Don't use netif_info before net_device setup
  2021-10-19 22:40 [PATCH] sfc: Don't use netif_info before net_device setup Erik Ekman
  2021-10-21 10:07 ` Martin Habets
@ 2021-10-21 23:33 ` Jesse Brandeburg
  1 sibling, 0 replies; 3+ messages in thread
From: Jesse Brandeburg @ 2021-10-21 23:33 UTC (permalink / raw)
  To: Erik Ekman, Edward Cree, Martin Habets, David S. Miller, Jakub Kicinski
  Cc: netdev, linux-kernel

On 10/19/2021 3:40 PM, Erik Ekman wrote:
> Use pci_info instead to avoid unnamed/uninitialized noise:
> 
> [197088.688729] sfc 0000:01:00.0: Solarflare NIC detected
> [197088.690333] sfc 0000:01:00.0: Part Number : SFN5122F
> [197088.729061] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no SR-IOV VFs probed
> [197088.729071] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no PTP support
> 
> Inspired by fa44821a4ddd ("sfc: don't use netif_info et al before
> net_device is registered") from Heiner Kallweit.
> 
> Signed-off-by: Erik Ekman <erik@kryo.se>

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-21 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 22:40 [PATCH] sfc: Don't use netif_info before net_device setup Erik Ekman
2021-10-21 10:07 ` Martin Habets
2021-10-21 23:33 ` Jesse Brandeburg

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.