All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	netdev@vger.kernel.org, Anil Samal <anil.samal@intel.com>,
	Simon Horman <horms@kernel.org>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Subject: Re: [PATCH net-next 2/3] ice: Implement driver functionality to dump fec statistics
Date: Wed, 3 Jul 2024 19:55:57 -0700	[thread overview]
Message-ID: <20240703195557.4b643f90@kernel.org> (raw)
In-Reply-To: <20240702180710.2606969-3-anthony.l.nguyen@intel.com>

On Tue,  2 Jul 2024 11:07:06 -0700 Tony Nguyen wrote:
> +	pf = np->vsi->back;
> +	hw = &pf->hw;
> +	pi = np->vsi->port_info;
> +
> +	if (!hw || !pi)
> +		return;

nit: hw can't possibly be NULL, it's pf + offset, even if pf is null hw
won't be; maybe also combine the pi check with the type check below?
to make it look less like defensive programming..

next patch has the same isse

> +	/* Serdes parameters are not supported if not the PF VSI */
> +	if (np->vsi->type != ICE_VSI_PF)
> +		return;
> +
> +	err = ice_get_port_topology(hw, pi->lport, &port_topology);
> +	if (err) {
> +		netdev_info(netdev, "Extended register dump failed Lport %d\n",
> +			    pi->lport);
> +		return;
> +	}
> +
> +	/* Get FEC correctable, uncorrectable counter */
> +	err = ice_get_port_fec_stats(hw, port_topology.pcs_quad_select,
> +				     port_topology.pcs_port, fec_stats);
> +	if (err) {
> +		netdev_info(netdev, "FEC stats get failed Lport %d Err %d\n",
> +			    pi->lport, err);
> +	}

unnecessary brackets
-- 
pw-bot: cr

  reply	other threads:[~2024-07-04  2:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 18:07 [PATCH net-next 0/3][pull request] ice: Support to dump PHY config, FEC Tony Nguyen
2024-07-02 18:07 ` [PATCH net-next 1/3] ice: Extend Sideband Queue command to support flags Tony Nguyen
2024-07-02 18:07 ` [PATCH net-next 2/3] ice: Implement driver functionality to dump fec statistics Tony Nguyen
2024-07-04  2:55   ` Jakub Kicinski [this message]
2024-07-08 22:46     ` Tony Nguyen
2024-07-02 18:07 ` [PATCH net-next 3/3] ice: Implement driver functionality to dump serdes equalizer values Tony Nguyen

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=20240703195557.4b643f90@kernel.org \
    --to=kuba@kernel.org \
    --cc=anil.samal@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=himasekharx.reddy.pucha@intel.com \
    --cc=horms@kernel.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --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 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.