summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-05-27 11:47:56 +0000
committerarybchik <arybchik@FreeBSD.org>2016-05-27 11:47:56 +0000
commitffd500733878ac325a885018a7b20905b1e90597 (patch)
treedb2462e3148b44c7a2f3cad4b50918951924fbcb
parentb92bc60c155a61e3dd84457d2ac47271bef21c0b (diff)
downloadFreeBSD-src-ffd500733878ac325a885018a7b20905b1e90597.zip
FreeBSD-src-ffd500733878ac325a885018a7b20905b1e90597.tar.gz
sfxge(4): cope with lint for EFX_SET_OWORD_BIT() with const bit arg
Found by lint on illumos. Submitted by: Garrett D'Amore <garrett at damore.org> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week
-rw-r--r--sys/dev/sfxge/common/siena_mac.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/sfxge/common/siena_mac.c b/sys/dev/sfxge/common/siena_mac.c
index 6c2c701..2042f06 100644
--- a/sys/dev/sfxge/common/siena_mac.c
+++ b/sys/dev/sfxge/common/siena_mac.c
@@ -158,8 +158,17 @@ siena_mac_reconfigure(
* so we always add bit 0xff to the mask (bit 0x7f in the
* second octword).
*/
- if (epp->ep_brdcst)
+ if (epp->ep_brdcst) {
+ /*
+ * NOTE: due to constant folding, some of this evaluates
+ * to null expressions, giving E_EXPR_NULL_EFFECT during
+ * lint on Illumos. No good way to fix this without
+ * explicit coding the individual word/bit setting.
+ * So just suppress lint for this one line.
+ */
+ /* LINTED */
EFX_SET_OWORD_BIT(multicast_hash[1], 0x7f);
+ }
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_SET_MCAST_HASH;
OpenPOWER on IntegriCloud