[OpenWrt-Devel] [PATCH] generic: several linux-4.0 fixes

Rafał Miłecki zajec5 at gmail.com
Tue Feb 24 12:07:18 EST 2015


On 24 February 2015 at 16:29, Álvaro Fernández Rojas <noltari at 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?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list