From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@lists.linux-m68k.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Petr Stehlik <pstehlik@sophics.cz>
Subject: [PATCH 2/4] m68k/atari: ARAnyM - Prepare nfblock for submission
Date: Sun, 23 Jan 2011 17:31:32 +0100 [thread overview]
Message-ID: <1295800294-13216-2-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1295800294-13216-1-git-send-email-geert@linux-m68k.org>
- Make needlessly global functions static,
- Make struct block_device_operations const,
- Use pr_*(),
- Propagate error code from register_blkdev().
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Petr Stehlik <pstehlik@sophics.cz>
---
arch/m68k/emu/nfblock.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c
index fed2883..48e50f8 100644
--- a/arch/m68k/emu/nfblock.c
+++ b/arch/m68k/emu/nfblock.c
@@ -79,7 +79,7 @@ static int nfhd_make_request(struct request_queue *queue, struct bio *bio)
return 0;
}
-int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
+static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
struct nfhd_device *dev = bdev->bd_disk->private_data;
@@ -90,7 +90,7 @@ int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}
-static struct block_device_operations nfhd_ops = {
+static const struct block_device_operations nfhd_ops = {
.owner = THIS_MODULE,
.getgeo = nfhd_getgeo,
};
@@ -100,11 +100,11 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
struct nfhd_device *dev;
int dev_id = id - NFHD_DEV_OFFSET;
- printk(KERN_INFO "nfhd%u: found device with %u blocks (%u bytes)\n",
- dev_id, blocks, bsize);
+ pr_info("nfhd%u: found device with %u blocks (%u bytes)\n", dev_id,
+ blocks, bsize);
if (bsize < 512 || (bsize & (bsize - 1))) {
- printk(KERN_WARNING "nfhd%u: invalid block size\n", dev_id);
+ pr_warn("nfhd%u: invalid block size\n", dev_id);
return -EINVAL;
}
@@ -162,8 +162,8 @@ static int __init nfhd_init(void)
major_num = register_blkdev(major_num, "nfhd");
if (major_num <= 0) {
- printk(KERN_WARNING "nfhd: unable to get major number\n");
- return -ENODEV;
+ pr_warn("nfhd: unable to get major number\n");
+ return major_num;
}
for (i = NFHD_DEV_OFFSET; i < 24; i++) {
--
1.7.0.4
next prev parent reply other threads:[~2011-01-23 16:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 16:31 [PATCH 1/4] m68k/atari: ARAnyM - Remove bogus line from Kconfig help Geert Uytterhoeven
2011-01-23 16:31 ` Geert Uytterhoeven [this message]
2011-01-23 16:31 ` [PATCH 3/4] m68k/atari: ARAnyM - Prepare nfcon for submission Geert Uytterhoeven
2011-01-23 16:31 ` [PATCH 4/4] m68k/atari: ARAnyM - Prepare nfeth " Geert Uytterhoeven
2011-02-05 15:35 ` Geert Uytterhoeven
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=1295800294-13216-2-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=pstehlik@sophics.cz \
/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