mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [net-next PATCH v5 3/3] leds: trigger: netdev: expose hw_control status via sysfs
Date: Tue, 20 Jun 2023 15:21:09 +0200	[thread overview]
Message-ID: <71dfdbf0-09a3-4079-954f-cb87fe9b1817@lunn.ch> (raw)
In-Reply-To: <CAH-L+nO12Gn4OGepr7KcCjLzMmisNYjYbFp13Aqu2Q14Rc77RA@mail.gmail.com>

>     +static ssize_t hw_control_show(struct device *dev,
>     +                              struct device_attribute *attr, char *buf)
>     +{
>     +       struct led_netdev_data *trigger_data = led_trigger_get_drvdata
>     (dev);
>     +
>     +       return sprintf(buf, "%d\n", trigger_data->hw_control);
> 
> [Kalesh]: How about using sysfs_emit? 

Currently, there are zero instances of sysfs_emit() in ledtrig-netdev,
and in any files in drivers/leds/trigger/, or even drivers/leds.

So i think it would be better to keep this consistent with the rest of
the code in this file, and have a follow up patchset which reviews and
converts the 52 sprintf() in drivers/leds.

	 Andrew

  parent reply	other threads:[~2023-06-20 14:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19 20:46 [net-next PATCH v5 0/3] leds: trigger: netdev: add additional modes Christian Marangi
2023-06-19 20:46 ` [net-next PATCH v5 1/3] leds: trigger: netdev: add additional specific link speed mode Christian Marangi
2023-06-21 14:54   ` Lee Jones
2023-06-19 20:46 ` [net-next PATCH v5 2/3] leds: trigger: netdev: add additional specific link duplex mode Christian Marangi
2023-06-21 14:55   ` Lee Jones
2023-06-19 20:47 ` [net-next PATCH v5 3/3] leds: trigger: netdev: expose hw_control status via sysfs Christian Marangi
     [not found]   ` <CAH-L+nO12Gn4OGepr7KcCjLzMmisNYjYbFp13Aqu2Q14Rc77RA@mail.gmail.com>
2023-06-20 13:21     ` Andrew Lunn [this message]
2023-06-21 14:55   ` Lee Jones
2023-06-21 22:10 ` [net-next PATCH v5 0/3] leds: trigger: netdev: add additional modes 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=71dfdbf0-09a3-4079-954f-cb87fe9b1817@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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

all inboxes | Powered by JetHome®