public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>, Neil Brown <neilb@suse.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Wim Van Sebroeck <wim@iguana.be>,
	Christine Caulfield <ccaulfie@redhat.com>,
	David Teigland <teigland@redhat.com>,
	Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] char: make misc_deregister a void function
Date: Fri, 31 Jul 2015 15:06:06 +0200	[thread overview]
Message-ID: <20150731130606.GJ27985@piout.net> (raw)
In-Reply-To: <20150730225957.GA6760@kroah.com>

Hi,

On 30/07/2015 at 15:59:57 -0700, Greg Kroah-Hartman wrote :
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> With well over 200+ users of this api, there are a mere 12 users that
> actually cheked the return value of this function.  And all of them
             ^
small typo here

> really didn't do anything with that information as the system or module
> was shutting down no matter what.
> 
> So stop pretending like it matters, and just return void from
> misc_deregister().  If something goes wrong in the call, you will get a
> WARNING splat in the syslog so you know how to fix up your driver.
> Other than that, there's nothing that can go wrong.
> 
> Cc: Alasdair Kergon <agk@redhat.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: Neil Brown <neilb@suse.com>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Oleg Drokin <oleg.drokin@intel.com>
> Cc: Andreas Dilger <andreas.dilger@intel.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Christine Caulfield <ccaulfie@redhat.com>
> Cc: David Teigland <teigland@redhat.com>
> Cc: Mark Fasheh <mfasheh@suse.com>
> Cc: Joel Becker <jlbec@evilplan.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

For rtc and at91rm9200_wdt.c:
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

[...]

> --- a/drivers/watchdog/at91rm9200_wdt.c
> +++ b/drivers/watchdog/at91rm9200_wdt.c
> @@ -269,9 +269,8 @@ static int at91wdt_remove(struct platfor
>  	if (res)
>  		dev_warn(dev, "failed to unregister restart handler\n");
>  
> -	res = misc_deregister(&at91wdt_miscdev);
> -	if (!res)
> -		at91wdt_miscdev.parent = NULL;
> +	misc_deregister(&at91wdt_miscdev);
> +	at91wdt_miscdev.parent = NULL;
>  
>  	return res;

That one was actually doing something with the return value ;)


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2015-07-31 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 22:59 [PATCH] char: make misc_deregister a void function Greg Kroah-Hartman
2015-07-30 23:41 ` Mike Snitzer
2015-07-31  9:31 ` [PATCH] " Alessandro Zummo
2015-07-31 13:06 ` Alexandre Belloni [this message]
2015-07-31 19:31 ` Joel Becker

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=20150731130606.GJ27985@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=agk@redhat.com \
    --cc=andreas.dilger@intel.com \
    --cc=ccaulfie@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=mst@redhat.com \
    --cc=neilb@suse.com \
    --cc=oleg.drokin@intel.com \
    --cc=snitzer@redhat.com \
    --cc=teigland@redhat.com \
    --cc=wim@iguana.be \
    /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