From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH] nvmem: core: fix the return value check when calling the notifier chain
Date: Fri, 15 Feb 2019 10:26:02 +0000 [thread overview]
Message-ID: <2ef927a7-0698-3d2f-797f-b9f742bce905@linaro.org> (raw)
In-Reply-To: <CAMRc=MdW47YspeOv+9U6h9Ps35S0As2yBVXPdiwJFXNg_hMZZg@mail.gmail.com>
On 15/02/2019 09:41, Bartosz Golaszewski wrote:
>> rval will be masked with STOP MASK, so the above statement could be
>> false even if we have error.
>> So you should consider returning an errono which can be understood by user:
>>
>> may be something like this:
>>
>> if (rval & NOTIFY_STOP_MASK) {
>> rval = notifier_to_errno(rval);
>> goto err_remove_cells
>> }
>>
> Actually I'm now thinking we can remove this check at all - most users
> never check the return values of notifier chain calls. This function
> cannot fail in itself. What do you think?
Thats even better, I was about to suggest the same on the fact that we
should allow nvmem provider to register to be successful irrespective of
the notifier callback failures.
--srini
next prev parent reply other threads:[~2019-02-15 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 16:23 [PATCH] nvmem: core: fix the return value check when calling the notifier chain Bartosz Golaszewski
2019-02-15 9:28 ` Srinivas Kandagatla
2019-02-15 9:41 ` Bartosz Golaszewski
2019-02-15 10:26 ` Srinivas Kandagatla [this message]
2019-02-15 10:43 ` Bartosz Golaszewski
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=2ef927a7-0698-3d2f-797f-b9f742bce905@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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).