From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andi Kleen <ak@suse.de>,
Trent Waddington <trent.waddington@gmail.com>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH][5/5] floppy.c: Fix device_create_file() warning
Date: Tue, 6 Feb 2007 00:30:33 +0100 [thread overview]
Message-ID: <200702060030.33671.jesper.juhl@gmail.com> (raw)
This fixes the warning
warning: ignoring return value of `device_create_file', declared with attribute warn_unused_result
in function `floppy_init'. It does this by checking the return value and
printing a warning message in case of no success.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
floppy.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.20/drivers/block/floppy.c.patch4 2007-02-05 23:22:26.000000000 +0100
+++ linux-2.6.20/drivers/block/floppy.c 2007-02-05 23:32:42.000000000 +0100
@@ -4302,7 +4302,12 @@
if (err)
goto out_flush_work;
- device_create_file(&floppy_device[drive].dev,&dev_attr_cmos);
+ err = device_create_file(&floppy_device[drive].dev, &dev_attr_cmos);
+ if (err)
+ printk(KERN_WARNING "Unable to create sysfs attribute "
+ "file for floppy device: %s\n",
+ floppy_device[drive].name);
+
/* to be cleaned up... */
disks[drive]->private_data = (void *)(long)drive;
disks[drive]->queue = floppy_queue;
next reply other threads:[~2007-02-05 23:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 23:30 Jesper Juhl [this message]
2007-02-06 5:59 ` [PATCH][5/5] floppy.c: Fix device_create_file() warning Gene Heskett
2007-02-06 6:32 ` H. Peter Anvin
2007-02-06 16:15 ` Gene Heskett
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=200702060030.33671.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trent.waddington@gmail.com \
/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