On 03/10/2018 08:38 AM, Andrew Lunn wrote:
+ return 0;
+
+ err = br_switchdev_set_port_flag(p, flags, mask);
+ if (err)
+ return err;
You might want to consider the br_warn() in
br_switchdev_set_port_flag(). Do we want to spam the kernel log? Or
should store_flag() do some validation before calling
br_switchdev_set_port_flag()?
Andrew
Is there any convention for that in Linux? While I would agree that
simply returning a error code is sufficient in this case, another user
of br_switchdev_set_port_flag() is a netlink interface, aren't they
supposed to be an equivalent? That is, if netlink prints into kernel
log, sysfs should do that too?