From: Simon Horman <horms@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: TRINH THAI Florent <florent.trinh-thai@cs-soprasteria.com>,
CASAUBON Jean Michel <jean-michel.casaubon@cs-soprasteria.com>,
Herve Codina <herve.codina@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: wan: framer: Add version sysfs attribute for the Lantiq PEF2256 framer
Date: Mon, 15 Sep 2025 19:46:12 +0100 [thread overview]
Message-ID: <20250915184612.GU224143@horms.kernel.org> (raw)
In-Reply-To: <f9aaa89946f1417dc0a5e852702410453e816dbc.1757754689.git.christophe.leroy@csgroup.eu>
On Sat, Sep 13, 2025 at 11:13:26AM +0200, Christophe Leroy wrote:
> Lantiq PEF2256 framer has some little differences in behaviour
> depending on its version.
>
> Add a sysfs attribute to allow user applications to know the
> version.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
...
> @@ -114,6 +115,14 @@ enum pef2256_version pef2256_get_version(struct pef2256 *pef2256)
> }
> EXPORT_SYMBOL_GPL(pef2256_get_version);
>
> +static ssize_t version_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> + struct pef2256 *pef2256 = dev_get_drvdata(dev);
> +
> + return sysfs_emit(buf, "%s\n", pef2256->version_txt);
> +}
> +DEVICE_ATTR_RO(version);
Hi Christophe,
I think this can be: static DEVICE_ATTR_RO(version);
Flagged by Sparse.
> +
> enum pef2256_gcm_config_item {
> PEF2256_GCM_CONFIG_1544000 = 0,
> PEF2256_GCM_CONFIG_2048000,
...
prev parent reply other threads:[~2025-09-15 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 9:13 [PATCH net-next] net: wan: framer: Add version sysfs attribute for the Lantiq PEF2256 framer Christophe Leroy
2025-09-15 18:46 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250915184612.GU224143@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florent.trinh-thai@cs-soprasteria.com \
--cc=herve.codina@bootlin.com \
--cc=jean-michel.casaubon@cs-soprasteria.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).