From: "Rafał Miłecki" <zajec5@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Dan Williams" <dan.j.williams@intel.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH 2/2] nvmem: expose NVMEM cells in sysfs
Date: Tue, 21 Dec 2021 16:33:18 +0100 [thread overview]
Message-ID: <e6167555-6425-4457-254d-8cba61153b1a@gmail.com> (raw)
In-Reply-To: <YcHwPt2Uc8KSy3lG@kroah.com>
On 21.12.2021 16:18, Greg Kroah-Hartman wrote:
> On Tue, Dec 21, 2021 at 04:09:13PM +0100, Rafał Miłecki wrote:
>> So both: kernel and user space need to access U-Boot environment
>> variables (NVMEM cells). Each for its own purposes.
>>
>> Kernel goes first so it needs its own parser of NVMEM content (data).
>>
>> User space can either: get NVMEM cells exposed by kernel OR parse NVMEM
>> content on its own. I thought it'd be nice to avoid parsing code
>> duplication in user space and let kernel expose NVMEM cells.
>
> Ah, so you already have the data parsed, and you just want to also
> expose it to userspace. That makes more sense (sorry, it's been a long
> day of reviewing crappy patches, not yours of course...)
>
> So sure, you can dynamically create attributes and then add them to the
> device before you register it with the driver core. Be sure to
> initialize them properly with the call I pointed out previously and you
> should be good to go. You will have to keep a list of them around and
> then free them yourself when the device is cleaned up, so watch out for
> that.
>
> And again, don't use a binary attribute, that's not what it is for.
Thanks for review & discussing this! I really appreciate you getting
this patch details out of me so it's clear how to proceed.
Lesson learnt: spend more time on describing my commits.
next prev parent reply other threads:[~2021-12-21 15:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 6:47 [PATCH 1/2] sysfs: add sysfs_add_bin_file_to_group() Rafał Miłecki
2021-12-20 6:47 ` [PATCH 2/2] nvmem: expose NVMEM cells in sysfs Rafał Miłecki
2021-12-20 8:00 ` Greg Kroah-Hartman
2021-12-20 20:39 ` Rafał Miłecki
2021-12-21 6:33 ` Greg Kroah-Hartman
2021-12-21 6:39 ` Rafał Miłecki
2021-12-21 6:45 ` Greg Kroah-Hartman
2021-12-21 6:53 ` Rafał Miłecki
2021-12-21 7:13 ` Greg Kroah-Hartman
2021-12-21 12:24 ` Rafał Miłecki
2021-12-21 12:56 ` Greg Kroah-Hartman
2021-12-21 13:05 ` Rafał Miłecki
2021-12-21 13:27 ` Greg Kroah-Hartman
2021-12-21 13:52 ` Rafał Miłecki
2021-12-21 14:27 ` Greg Kroah-Hartman
2021-12-21 15:09 ` Rafał Miłecki
2021-12-21 15:18 ` Greg Kroah-Hartman
2021-12-21 15:33 ` Rafał Miłecki [this message]
2021-12-22 0:11 ` John Thomson
2021-12-20 8:01 ` [PATCH 1/2] sysfs: add sysfs_add_bin_file_to_group() Greg Kroah-Hartman
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=e6167555-6425-4457-254d-8cba61153b1a@gmail.com \
--to=zajec5@gmail.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=kw@linux.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rafal@milecki.pl \
--cc=srinivas.kandagatla@linaro.org \
/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).