public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org
Subject: [bug report] net: airoha: Move DSA tag in DMA descriptor
Date: Thu, 6 Mar 2025 12:49:04 +0300	[thread overview]
Message-ID: <46c1790a-0860-4907-894e-2d8ec4622147@stanley.mountain> (raw)

Hello Lorenzo Bianconi,

Commit af3cf757d5c9 ("net: airoha: Move DSA tag in DMA descriptor")
from Feb 28, 2025 (linux-next), leads to the following Smatch static
checker warning:

	drivers/net/ethernet/airoha/airoha_eth.c:1722 airoha_get_dsa_tag()
	warn: 'dp' isn't an ERR_PTR

drivers/net/ethernet/airoha/airoha_eth.c
    1710 static u32 airoha_get_dsa_tag(struct sk_buff *skb, struct net_device *dev)
    1711 {
    1712 #if IS_ENABLED(CONFIG_NET_DSA)
    1713         struct ethhdr *ehdr;
    1714         struct dsa_port *dp;
    1715         u8 xmit_tpid;
    1716         u16 tag;
    1717 
    1718         if (!netdev_uses_dsa(dev))
    1719                 return 0;
    1720 
    1721         dp = dev->dsa_ptr;
--> 1722         if (IS_ERR(dp))

Why would this be an error pointer?  Is this supposed to be a check for
NULL?

    1723                 return 0;
    1724 
    1725         if (dp->tag_ops->proto != DSA_TAG_PROTO_MTK)
    1726                 return 0;
    1727 
    1728         if (skb_cow_head(skb, 0))
    1729                 return 0;
    1730 

regards,
dan carpenter

             reply	other threads:[~2025-03-06  9:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  9:49 Dan Carpenter [this message]
2025-03-06 10:21 ` [bug report] net: airoha: Move DSA tag in DMA descriptor Lorenzo Bianconi

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=46c1790a-0860-4907-894e-2d8ec4622147@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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