From: Paolo Abeni <pabeni@redhat.com>
To: Vadim Fedorenko <vadfed@meta.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Jiri Slaby <jirislaby@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net v7 2/3] ptp: ocp: adjust sysfs entries to expose tty information
Date: Tue, 3 Sep 2024 12:35:44 +0200 [thread overview]
Message-ID: <e767ec8e-e25d-4880-86be-d23e1875a428@redhat.com> (raw)
In-Reply-To: <20240829183603.1156671-3-vadfed@meta.com>
On 8/29/24 20:36, Vadim Fedorenko wrote:
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 46369de8e30b..e7479b9b90cb 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -3361,6 +3361,54 @@ static EXT_ATTR_RO(freq, frequency, 1);
> static EXT_ATTR_RO(freq, frequency, 2);
> static EXT_ATTR_RO(freq, frequency, 3);
>
> +static ssize_t
> +ptp_ocp_tty_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> + struct dev_ext_attribute *ea = to_ext_attr(attr);
> + struct ptp_ocp *bp = dev_get_drvdata(dev);
> +
> + return sysfs_emit(buf, "ttyS%d", bp->port[(uintptr_t)ea->var].line);
Out of sheer ignorance on my side, why a trailing '\n' is not needed
here? do we need to copy the format string from the old link verbatim?
Thanks!
Paolo
next prev parent reply other threads:[~2024-09-03 10:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 18:36 [PATCH net v7 0/3] ptp: ocp: fix serial port information export Vadim Fedorenko
2024-08-29 18:36 ` [PATCH net v7 1/3] ptp: ocp: convert serial ports to array Vadim Fedorenko
2024-08-29 18:36 ` [PATCH net v7 2/3] ptp: ocp: adjust sysfs entries to expose tty information Vadim Fedorenko
2024-09-03 10:35 ` Paolo Abeni [this message]
2024-09-03 11:06 ` Vadim Fedorenko
2024-08-29 18:36 ` [PATCH net v7 3/3] docs: ABI: update OCP TimeCard sysfs entries Vadim Fedorenko
2024-09-03 8:40 ` [PATCH net v7 0/3] ptp: ocp: fix serial port information export Greg Kroah-Hartman
2024-09-03 13:50 ` patchwork-bot+netdevbpf
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=e767ec8e-e25d-4880-86be-d23e1875a428@redhat.com \
--to=pabeni@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vadfed@meta.com \
--cc=vadim.fedorenko@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.