netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Paolo Abeni <pabeni@redhat.com>, 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:06:37 +0100	[thread overview]
Message-ID: <2cae6633-ee5c-48f1-a546-8b334a3e8f39@linux.dev> (raw)
In-Reply-To: <e767ec8e-e25d-4880-86be-d23e1875a428@redhat.com>

On 03/09/2024 11:35, Paolo Abeni wrote:
> 
> 
> 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?
> 

Hi Paolo!

Yes, I would like to preserve the format used with old symlink option.

Thanks,
Vadim

  reply	other threads:[~2024-09-03 11:06 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
2024-09-03 11:06     ` Vadim Fedorenko [this message]
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=2cae6633-ee5c-48f1-a546-8b334a3e8f39@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@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).