From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: Fix return value of fb_notifier_call_chain
Date: Tue, 22 Nov 2011 09:58:46 +0900 [thread overview]
Message-ID: <4ECAF3C6.4010507@samsung.com> (raw)
In-Reply-To: <4ECAD9F0.9050508@gmx.de>
11/22/2011 08:08 AM, Florian Tobias Schandinat 쓴 글:
> On 11/21/2011 06:55 AM, Joonyoung Shim wrote:
>> The return value of blocking_notifier_call_chain isn't errno value, it
>> is just notify return value. The ret of fb_notifier_call_chain should is
>> restored to error value from notify return value using
>> notifier_to_errno().
> If I'm not wrong this patch would rather break things than fix them. As I
> understand the notifier_calls would be required to encode the return value with
> notifier_from_errno. This does not happen at the moment for fb clients, for
> example fbcon_event_notify in drivers/video/console/fbcon.c, so this patch would
> screw up the return values, I think.
OK, but it is wrong to return error value than notify value many
callback of fb notify clients and some fb notify clients returns notify
value, please see sh_mobile_lcdc_notify() and sh_hdmi_notify().
We should use only one, notify value or error value, i think it's right
to use notify value.
Thanks.
>
> Best regards,
>
> Florian Tobias Schandinat
>
>> Signed-off-by: Joonyoung Shim<jy0922.shim@samsung.com>
>> ---
>> drivers/video/fb_notify.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/video/fb_notify.c b/drivers/video/fb_notify.c
>> index 74c2da5..49a64a3 100644
>> --- a/drivers/video/fb_notify.c
>> +++ b/drivers/video/fb_notify.c
>> @@ -42,6 +42,8 @@ EXPORT_SYMBOL(fb_unregister_client);
>> */
>> int fb_notifier_call_chain(unsigned long val, void *v)
>> {
>> - return blocking_notifier_call_chain(&fb_notifier_list, val, v);
>> + int ret = blocking_notifier_call_chain(&fb_notifier_list, val, v);
>> +
>> + return notifier_to_errno(ret);
>> }
>> EXPORT_SYMBOL_GPL(fb_notifier_call_chain);
>
next prev parent reply other threads:[~2011-11-22 0:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 6:55 [PATCH] video: Fix return value of fb_notifier_call_chain Joonyoung Shim
2011-11-21 23:08 ` Florian Tobias Schandinat
2011-11-22 0:58 ` Joonyoung Shim [this message]
2011-11-22 1:20 ` Florian Tobias Schandinat
-- strict thread matches above, loose matches on Subject: below --
2011-11-21 6:03 Joonyoung Shim
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=4ECAF3C6.4010507@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=FlorianSchandinat@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@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