On 8/10/20 10:43 PM, Lukas Wunner wrote:
On Mon, Aug 10, 2020 at 01:44:58PM -0500, Daniel Dadap wrote:
Would it be clearer to write it out as something like 0 << 4 & 1 << 0 for
MUX_STATE_SET_IGPU and 1 << 4 & 1 << 0 for MUX_STATE_SET_DGPU?
BIT(4) | BIT(0) might be clearer, but that gives you an unsigned long
and I'm not sure if gcc accepts that as an enum (=int) initializer.
Ah yes, I forgot the BIT() macro. And it does seem to work just fine for
initializing enum values, and there does seem to be precedent in other
code in the kernel for doing so. And of course I meant | instead of &
earlier. :)
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel