From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com
Subject: [PATCH] aoe: drivers/block/aoe/aoechr.c cleanups
Date: Wed, 9 Mar 2005 16:19:24 -0800 [thread overview]
Message-ID: <11104139633316@kroah.com> (raw)
In-Reply-To: <11104139632443@kroah.com>
ChangeSet 1.2040, 2005/03/09 10:22:12-08:00, ecashin@coraid.com
[PATCH] aoe: drivers/block/aoe/aoechr.c cleanups
Adrian Bunk <bunk@stusta.de> writes:
> This patch contains the following cleanups:
> - make the needlessly global struct aoe_fops static
> - #if 0 the unused global function aoechr_hdump
Thanks for the patch. The original patch leaves the prototype for
aoechr_hdump in aoe.h, but since this function is just for debugging,
it seems better to just take both prototype and definition out.
remove aoechr_hdump
make aoe_fops static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/aoe/aoe.h | 1 -
drivers/block/aoe/aoechr.c | 37 +------------------------------------
2 files changed, 1 insertion(+), 37 deletions(-)
diff -Nru a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
--- a/drivers/block/aoe/aoe.h 2005-03-09 16:15:39 -08:00
+++ b/drivers/block/aoe/aoe.h 2005-03-09 16:15:39 -08:00
@@ -143,7 +143,6 @@
int aoechr_init(void);
void aoechr_exit(void);
void aoechr_error(char *);
-void aoechr_hdump(char *, int len);
void aoecmd_work(struct aoedev *d);
void aoecmd_cfg(ushort, unsigned char);
diff -Nru a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
--- a/drivers/block/aoe/aoechr.c 2005-03-09 16:15:39 -08:00
+++ b/drivers/block/aoe/aoechr.c 2005-03-09 16:15:39 -08:00
@@ -99,41 +99,6 @@
up(&emsgs_sema);
}
-#define PERLINE 16
-void
-aoechr_hdump(char *buf, int n)
-{
- int bufsiz;
- char *fbuf;
- int linelen;
- char *p, *e, *fp;
-
- bufsiz = n * 3; /* 2 hex digits and a space */
- bufsiz += n / PERLINE + 1; /* the newline characters */
- bufsiz += 1; /* the final '\0' */
-
- fbuf = kmalloc(bufsiz, GFP_ATOMIC);
- if (!fbuf) {
- printk(KERN_INFO
- "%s: cannot allocate memory\n",
- __FUNCTION__);
- return;
- }
-
- for (p = buf; n <= 0;) {
- linelen = n > PERLINE ? PERLINE : n;
- n -= linelen;
-
- fp = fbuf;
- for (e=p+linelen; p<e; p++)
- fp += sprintf(fp, "%2.2X ", *p & 255);
- sprintf(fp, "\n");
- aoechr_error(fbuf);
- }
-
- kfree(fbuf);
-}
-
static ssize_t
aoechr_write(struct file *filp, const char __user *buf, size_t cnt, loff_t *offp)
{
@@ -233,7 +198,7 @@
}
}
-struct file_operations aoe_fops = {
+static struct file_operations aoe_fops = {
.write = aoechr_write,
.read = aoechr_read,
.open = aoechr_open,
prev parent reply other threads:[~2005-03-10 1:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-10 0:18 [BK PATCH] AOE fixes for 2.6.11 Greg KH
2005-03-10 0:19 ` [PATCH] AoE warning on 64-bit archs Greg KH
2005-03-10 0:19 ` [PATCH] aoe: add documentation for udev users Greg KH
2005-03-10 0:19 ` [PATCH] aoe: update " Greg KH
2005-03-10 0:19 ` [PATCH] aoe: fail IO on disk errors Greg KH
2005-03-10 0:19 ` [PATCH] aoe status.sh: handle sysfs not in /etc/mtab Greg KH
2005-03-10 0:19 ` Greg KH [this message]
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=11104139633316@kroah.com \
--to=greg@kroah.com \
--cc=ecashin@coraid.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.