mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Jeff Garzik <jeff@garzik.org>
Cc: bcollins@debian.org, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] firewire: handle sysfs errors
Date: Tue, 10 Oct 2006 10:38:06 +0200	[thread overview]
Message-ID: <452B5BEE.4050407@s5r6.in-berlin.de> (raw)
In-Reply-To: <20061010064805.GA21310@havoc.gtf.org>

Jeff Garzik wrote:
> Handle sysfs, driver core errors.
> 
> Signed-off-by: Jeff Garzik <jeff@garzik.org>
> 
> ---
> 
>  drivers/ieee1394/nodemgr.c         |   36 ++++++++++++++++++++++++++++--------
> 
> diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
> index 8e7b83f..8628e3f 100644
> --- a/drivers/ieee1394/nodemgr.c
> +++ b/drivers/ieee1394/nodemgr.c
> @@ -414,9 +414,11 @@ static BUS_ATTR(destroy_node, S_IWUSR | 
>  
>  static ssize_t fw_set_rescan(struct bus_type *bus, const char *buf, size_t count)
>  {
> +	int rc;
> +
>  	if (simple_strtoul(buf, NULL, 10) == 1)
> -		bus_rescan_devices(&ieee1394_bus_type);
> -	return count;
> +		rc = bus_rescan_devices(&ieee1394_bus_type);
> +	return rc < 0 ? rc : count;
>  }

gcc 3.4.1-4mdk says:

drivers/ieee1394/nodemgr.c: In function `fw_set_rescan':
drivers/ieee1394/nodemgr.c:417: warning: 'rc' might be used
uninitialized in this function

The rest of the patch looks OK.

I get a lot more warn_unused_result warnings at other places in
ieee1394/nodemgr.c and ieee1394/hosts.c though. I could fix them all up
and fix this new warning in fw_set_rescan too if you don't mind...
-- 
Stefan Richter
-=====-=-==- =-=- -=-=-
http://arcgraph.de/sr/

  reply	other threads:[~2006-10-10  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10  6:48 Jeff Garzik
2006-10-10  8:38 ` Stefan Richter [this message]
2006-10-10 12:52   ` Jeff Garzik
2006-10-10 19:11     ` [PATCH 2.6.19-rc1 1/3] ieee1394: lock smaller region by host_num_alloc mutex Stefan Richter
2006-10-10 19:12       ` [PATCH 2.6.19-rc1 2/3] ieee1394: coding style in hosts.c Stefan Richter
2006-10-10 19:19         ` [PATCH 2.6.19-rc1 3/3] ieee1394: handle sysfs errors Stefan Richter

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=452B5BEE.4050407@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=akpm@osdl.org \
    --cc=bcollins@debian.org \
    --cc=jeff@garzik.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

all inboxes | Powered by JetHome®