From: Greg KH <gregkh@linuxfoundation.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-kernel@vger.kernel.org, nicholas.johnson-opensource@outlook.com.au
Subject: Re: [PATCH v2 2/2] nvmem: core: use is_bin_visible for permissions
Date: Wed, 25 Mar 2020 11:53:06 +0100 [thread overview]
Message-ID: <20200325105306.GA3146321@kroah.com> (raw)
In-Reply-To: <e1e768dd-7e6f-b917-dfb6-cf2e1fc6114a@linaro.org>
On Wed, Mar 25, 2020 at 10:40:10AM +0000, Srinivas Kandagatla wrote:
>
>
> On 25/03/2020 10:21, Greg KH wrote:
> > > -
> > > const struct attribute_group **nvmem_sysfs_get_groups(
> > > struct nvmem_device *nvmem,
> > > const struct nvmem_config *config)
> > You no longer need any parameters for this function, right?
> no we do not need that, I can update that in next version.
Ok.
> > Also, you really don't even need the function, just point to the
> > variable instead.
> We have a use case where in the user can chose to not have sysfs entry,
> specially if we have hypervisor trapping access to some range of entries in
> nvmem. This is enforced using CONFIG_NVMEM_SYSFS option.
>
> Currently in upstream we have a stub function when CONFIG_NVMEM_SYSFS is not
> selected returning NULL.
>
> If we want to remove this function and subsequently the nvmem-sysfs.c file
> then we have to have #ifdef in the code which am okay to do if that is
> something that you are keen on.
You can still do it in the .h file, defining the variable as NULL if
that config option is not enabled.
thanks,
greg k-h
prev parent reply other threads:[~2020-03-25 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 10:01 [PATCH v2 0/2] nvmem: use is_bin_visible callback Srinivas Kandagatla
2020-03-25 10:01 ` [PATCH v2 1/2] nvmem: core: add root_only member to nvmem device struct Srinivas Kandagatla
2020-03-25 10:01 ` [PATCH v2 2/2] nvmem: core: use is_bin_visible for permissions Srinivas Kandagatla
2020-03-25 10:21 ` Greg KH
2020-03-25 10:40 ` Srinivas Kandagatla
2020-03-25 10:53 ` Greg KH [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=20200325105306.GA3146321@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicholas.johnson-opensource@outlook.com.au \
--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
Powered by JetHome