Re: [PATCH v2] backports: add spatch to handle IFF_NO_QUEUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 14 Sep 2015, Johannes Berg wrote:

> On Mon, 2015-09-14 at 01:25 -0700, Luis R. Rodriguez wrote:
> 
> > > ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
> > > + E->priv_flags |= IFF_NO_QUEUE;
> > > ++#else
> > > ++E->tx_queue_len = 0;
> > > ++#endif
> > 
> > Interesting so although priv_flags may be a member name prevalent in
> > *many* data structures the SmPL rule here is very specific about the
> > use of IFF_NO_QUEUE as a flag, and since we know that is unique to one
> > use case we take the liberty over using expression here. Replying just
> > to annotate this practice and Cc Julia on her thoughts.

I'm OK with the above reasoning for using expression.  If you don't use 
expression, you need to be sure that adequate type information is 
available.  So if the context is unambiguous for some reason, then 
expression is better.

julia

> > 
> 
> Yeah I thought about this for a while - it doesn't even cover all cases
> (there might be drivers that don't use |=, for example).
> 
> However, for now this seemed sufficient since very few places in the
> code actually use this.
> 
> That said, there are cases where E really needs to be an expression
> since it's not just "dev->..." but something like "foo->dev->...".
> 
> johannes
> 
--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux