netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sfc: an enumeration is not a bitmask
@ 2011-05-17 18:14 David Miller
  2011-05-17 18:18 ` Ben Hutchings
  2011-05-17 18:57 ` sfc: an enumeration is not a bitmask Jeff Garzik
  0 siblings, 2 replies; 22+ messages in thread
From: David Miller @ 2011-05-17 18:14 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev


Ben can you please get rid of "enum efx_fc_type"?

drivers/net/sfc/mcdi_mac.c: In function ‘efx_mcdi_set_mac’:
drivers/net/sfc/mcdi_mac.c:36:2: warning: case value ‘3’ not in enumerated type ‘enum efx_fc_type’

An enumeration is not a bitmask, instead it means one out of the set
of enumerated values will be used.  This means that the warning
here about:

	switch (efx->wanted_fc) {
	case EFX_FC_RX | EFX_FC_TX:

is completely legitimate.

Thanks.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-05-18  2:59 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 18:14 sfc: an enumeration is not a bitmask David Miller
2011-05-17 18:18 ` Ben Hutchings
2011-05-17 18:23   ` David Miller
2011-05-17 18:48     ` [PATCH net-next-2.6] sfc: Suppress warning about combining enum flags by gcc 4.5 Ben Hutchings
2011-05-17 19:26       ` David Miller
2011-05-17 21:06         ` [PATCH net-next-2.6] sfc: Replace enum efx_fc_type with a 'bitwise' type Ben Hutchings
2011-05-17 21:14           ` David Miller
2011-05-17 21:22             ` Joe Perches
2011-05-17 21:28               ` David Miller
2011-05-17 21:30               ` Michał Mirosław
2011-05-17 21:36               ` Eric Dumazet
2011-05-17 21:43                 ` Joe Perches
2011-05-17 21:43             ` [PATCH net-next-2.6] sfc: Replace enum efx_fc_type with macros and type alias Ben Hutchings
2011-05-17 21:45               ` David Miller
2011-05-18  2:01             ` [PATCH net-next-2.6] sfc: Replace enum efx_fc_type with a 'bitwise' type Jeff Garzik
2011-05-18  2:23               ` David Miller
2011-05-18  2:59                 ` Jeff Garzik
2011-05-17 18:57 ` sfc: an enumeration is not a bitmask Jeff Garzik
2011-05-17 19:09   ` Michał Mirosław
2011-05-17 19:22     ` Ben Hutchings
2011-05-17 22:00     ` Jeff Garzik
2011-05-17 23:19       ` Michał Mirosław

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).