On 2015-02-25 06:07, Rafał Miłecki wrote: > On 24 February 2015 at 16:29, Álvaro Fernández Rojas <nolt...@gmail.com> > wrote: >> --- a/target/linux/generic/files/drivers/net/phy/swconfig.c >> +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c >> @@ -396,7 +396,12 @@ swconfig_dump_attr(struct swconfig_callback *cb, void >> *arg) >> op->description)) >> goto nla_put_failure; >> >> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) >> return genlmsg_end(msg, hdr); >> +#else >> + genlmsg_end(msg, hdr); >> + return msg->len; >> +#endif >> nla_put_failure: >> genlmsg_cancel(msg, hdr); >> return -EMSGSIZE; > > I need some help there. Wasn't genlmsg_end always returning 0 value > (before 4.0)? If so, should you do "return 0" instead of "return > msg->len;"? Don't you just change the returning value on success? As far as I can see, it was returning skb->len. Anyways, the #if needs to go. It should just use the same code for >= 4.0 and < 4.0 Also, this patch needs to be split up by functionality. Having everything in one big patch is harder to review.
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel