Home
last modified time | relevance | path

Searched hist:e8666130b995a6a1a99c319d33fae2046213c39b (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/net/dsa/
H A Dmaster.cdiff e8666130b995a6a1a99c319d33fae2046213c39b Mon Nov 14 19:18:45 CST 2022 Vladimir Oltean <vladimir.oltean@nxp.com> net: dsa: strip sysfs "tagging" string of trailing newline

Currently, dsa_find_tagger_by_name() uses sysfs_streq() which works both
with strings that contain \n at the end (echo ocelot > .../dsa/tagging)
and with strings that don't (printf ocelot > .../dsa/tagging).

There will be a problem once we'll want to construct the modalias string
based on which we auto-load the protocol kernel module. If the sysfs
buffer ends in a newline, we need to strip it first. This is a
preparatory patch specifically for that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
H A Ddsa.cdiff e8666130b995a6a1a99c319d33fae2046213c39b Mon Nov 14 19:18:45 CST 2022 Vladimir Oltean <vladimir.oltean@nxp.com> net: dsa: strip sysfs "tagging" string of trailing newline

Currently, dsa_find_tagger_by_name() uses sysfs_streq() which works both
with strings that contain \n at the end (echo ocelot > .../dsa/tagging)
and with strings that don't (printf ocelot > .../dsa/tagging).

There will be a problem once we'll want to construct the modalias string
based on which we auto-load the protocol kernel module. If the sysfs
buffer ends in a newline, we need to strip it first. This is a
preparatory patch specifically for that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>