netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk,
	netdev@vger.kernel.org, mengyuanlou@net-swift.com
Subject: Re: [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices
Date: Fri, 10 Jan 2025 12:03:57 +0000	[thread overview]
Message-ID: <20250110120357.GD7706@kernel.org> (raw)
In-Reply-To: <20250110084249.2129839-1-jiawenwu@trustnetic.com>

On Fri, Jan 10, 2025 at 04:42:48PM +0800, Jiawen Wu wrote:
> There is a new 25/10 Gigabit Ethernet device.
> 
> To support basic functions, PHYLINK is temporarily skipped as it is
> intended to implement these configurations in the firmware. And the
> associated link IRQ is also skipped.
> 
> And Implement the new SW-FW interaction interface, which use 64 Byte
> message buffer.
> 
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>

...

> @@ -2719,7 +2730,7 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features)
>  
>  	netdev->features = features;
>  
> -	if (wx->mac.type == wx_mac_sp && changed & NETIF_F_HW_VLAN_CTAG_RX)
> +	if (changed & NETIF_F_HW_VLAN_CTAG_RX && wx->do_reset)
>  		wx->do_reset(netdev);

Hi Jiawen Wu,

Here it is assumed that wx->do_reset may be NULL.  But there is an existing
call to wx->do_reset(), near the end of this function, that is not
conditional on wx->do_reset being non-NULL.  This does not seem consistent.

Flagged by Smatch.

>  	else if (changed & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER))
>  		wx_set_rx_mode(netdev);

...

-- 
pw-bot: changes-requested

  parent reply	other threads:[~2025-01-10 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  8:42 [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices Jiawen Wu
2025-01-10  8:42 ` [PATCH net-next 2/2] net: wangxun: Replace the judgement of MAC type with flags Jiawen Wu
2025-01-10 12:03 ` Simon Horman [this message]
2025-01-13  1:59   ` [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices Jiawen Wu

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=20250110120357.GD7706@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).