On Tue, Mar 1, 2016 at 10:41 AM, Sowmini Varadhan <sowmini.varad...@oracle.com> wrote: > On (03/01/16 10:23), Cong Wang wrote: >> > The compiler error is for fields within the union which lacks >> > both a tag and a union-name. So I'm not sure how the above will >> > help. >> > >> >> Come on.. we have plenty of such anonymous unions in skbuff.h... > > I realize that, even netdevice.h itself has other instances. > Thus I dont understand why this one generated a compiler error > for me. Thus I was wondering why others had not run into this > and not suggesting it should be patched. > > However, changing the way we set up type etc. doesnt seem relevant > to what the compiler is flagging. >
Clearly the compiler indicates something is wrong in the initializer. I don't know why you don't want to try the way I suggest or maybe the following: diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index f9947d1..77743e8 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -142,7 +142,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt) */ if (qopt->hw) { struct tc_to_netdev tc = {.type = TC_SETUP_MQPRIO, - .tc = qopt->num_tc}; + {.tc = qopt->num_tc} }; priv->hw_owned = 1; err = dev->netdev_ops->ndo_setup_tc(dev, sch->handle, 0, &tc);