From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [char-misc-next] mei: bus: add more client attributes to sysfs
Date: Sat, 16 Nov 2019 13:38:51 +0100 [thread overview]
Message-ID: <20191116123851.GA450532@kroah.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9DD16447@hasmsx108.ger.corp.intel.com>
On Sat, Nov 16, 2019 at 12:08:52PM +0000, Winkler, Tomas wrote:
> >
> > On Sat, Nov 16, 2019 at 04:21:36PM +0200, Tomas Winkler wrote:
> > > From: Alexander Usyskin <alexander.usyskin@intel.com>
> > >
> > > Export more client attributes via sysfs that are usually obtained upon
> > > connection. In some cases, for example a monitoring application may
> > > wish to know the attributes without actually performing the connection.
> > > Added attributes:
> > > max number of connections, fixed address, max message length.
> > >
> > > Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> > > ---
> > > Documentation/ABI/testing/sysfs-bus-mei | 21 +++++++++++++++
> > > drivers/misc/mei/bus.c | 33 +++++++++++++++++++++++
> > > drivers/misc/mei/client.h | 36 +++++++++++++++++++++++++
> > > 3 files changed, 90 insertions(+)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-bus-mei
> > > b/Documentation/ABI/testing/sysfs-bus-mei
> > > index 3f8701e8fa24..3d37e2796d5a 100644
> > > --- a/Documentation/ABI/testing/sysfs-bus-mei
> > > +++ b/Documentation/ABI/testing/sysfs-bus-mei
> > > @@ -26,3 +26,24 @@ KernelVersion: 4.3
> > > Contact: Tomas Winkler <tomas.winkler@intel.com>
> > > Description: Stores mei client protocol version
> > > Format: %d
> > > +
> > > +What: /sys/bus/mei/devices/.../max_conn
> > > +Date: Nov 2019
> > > +KernelVersion: 5.5
> > > +Contact: Tomas Winkler <tomas.winkler@intel.com>
> > > +Description: Stores mei client maximum number of connections
> > > + Format: %d
> > > +
> > > +What: /sys/bus/mei/devices/.../fixed
> > > +Date: Nov 2019
> > > +KernelVersion: 5.5
> > > +Contact: Tomas Winkler <tomas.winkler@intel.com>
> > > +Description: Stores mei client fixed address, if any
> > > + Format: %d
> > > +
> > > +What: /sys/bus/mei/devices/.../max_len
> > > +Date: Nov 2019
> > > +KernelVersion: 5.5
> > > +Contact: Tomas Winkler <tomas.winkler@intel.com>
> > > +Description: Stores mei client maximum message length
> > > + Format: %d
> > > diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index
> > > 53bb394ccba6..a0a495c95e3c 100644
> > > --- a/drivers/misc/mei/bus.c
> > > +++ b/drivers/misc/mei/bus.c
> > > @@ -791,11 +791,44 @@ static ssize_t modalias_show(struct device *dev,
> > > struct device_attribute *a, } static DEVICE_ATTR_RO(modalias);
> > >
> > > +static ssize_t max_conn_show(struct device *dev, struct device_attribute
> > *a,
> > > + char *buf)
> > > +{
> > > + struct mei_cl_device *cldev = to_mei_cl_device(dev);
> > > + u8 maxconn = mei_me_cl_max_conn(cldev->me_cl);
> > > +
> > > + return scnprintf(buf, PAGE_SIZE, "%d", maxconn);
> >
> > Nit, you can just do sprintf() for sysfs file attributes as you "know"
> > the buffer is big enough and your variable will fit.
> >
> > Not a bit deal, but something to do in the future.
>
>
> Right, missed that, I can fix it in a follow up patch or resend this one.
follow-up is fine, I've already queued this one up.
thanks,
greg k-h
prev parent reply other threads:[~2019-11-16 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-16 14:21 [char-misc-next] mei: bus: add more client attributes to sysfs Tomas Winkler
2019-11-16 11:58 ` Greg Kroah-Hartman
2019-11-16 12:08 ` Winkler, Tomas
2019-11-16 12:38 ` Greg Kroah-Hartman [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=20191116123851.GA450532@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomas.winkler@intel.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