From: Dan Carpenter <dan.carpenter@oracle.com>
To: l.stelmach@samsung.com
Cc: kernel-janitors@vger.kernel.org
Subject: [bug report] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver
Date: Thu, 11 Nov 2021 16:35:08 +0300 [thread overview]
Message-ID: <20211111133508.GA22045@kili> (raw)
Hello Łukasz Stelmach,
The patch a97c69ba4f30: "net: ax88796c: ASIX AX88796C SPI Ethernet
Adapter Driver" from Oct 20, 2021, leads to the following Smatch
static checker warning:
drivers/net/ethernet/asix/ax88796c_main.c:926 ax88796c_set_features()
warn: duplicate check 'changed & ((1 << (40)) | (1 << (3)))' (previous on line 921)
drivers/net/ethernet/asix/ax88796c_main.c
915 static int
916 ax88796c_set_features(struct net_device *ndev, netdev_features_t features)
917 {
918 struct ax88796c_device *ax_local = to_ax88796c_device(ndev);
919 netdev_features_t changed = features ^ ndev->features;
920
921 if (!(changed & (NETIF_F_RXCSUM | NETIF_F_HW_CSUM)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
922 return 0;
923
924 ndev->features = features;
925
--> 926 if (changed & (NETIF_F_RXCSUM | NETIF_F_HW_CSUM))
We know this condition is true. Was something else intended?
927 ax88796c_set_csums(ax_local);
928
929 return 0;
930 }
regards,
dan carpenter
next reply other threads:[~2021-11-11 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20211115132037eucas1p1ff59893ece466fbc5123513d355cb361@eucas1p1.samsung.com>
2021-11-11 13:35 ` Dan Carpenter [this message]
2021-11-15 13:20 ` [bug report] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver Lukasz Stelmach
[not found] <CGME20211116004339eucas1p14e377393256e09c0e04e3da92ad0accb@eucas1p1.samsung.com>
2021-11-12 12:36 ` Dan Carpenter
2021-11-16 0:43 ` Lukasz Stelmach
2021-11-16 6:34 ` Dan Carpenter
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=20211111133508.GA22045@kili \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=l.stelmach@samsung.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