From: Russell King <rmk@arm.linux.org.uk>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] [3/6] Remove "fn" argument from read_cb_mem()
Date: Sun, 23 Feb 2003 15:20:23 +0000 [thread overview]
Message-ID: <20020223151803@raistlin.arm.linux.org.uk> (raw)
In-Reply-To: <20020223151802@raistlin.arm.linux.org.uk>
This patch appears not to be in 2.5.62, but applies cleanly.
Subject: [3/6] Remove "fn" argument from read_cb_mem()
read_cb_mem is only ever called with its "fn" argument set to zero.
We therefore do not need to pass it.
drivers/pcmcia/cardbus.c | 5 ++---
drivers/pcmcia/cistpl.c | 4 ++--
drivers/pcmcia/cs_internal.h | 3 +--
3 files changed, 5 insertions, 7 deletions
diff -ur -x sa11* -x Kconfig -x Makefile orig/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c
--- orig/drivers/pcmcia/cardbus.c Sun Feb 23 12:41:54 2003
+++ linux/drivers/pcmcia/cardbus.c Sun Feb 23 12:43:55 2003
@@ -175,8 +175,7 @@
=====================================================================*/
-int read_cb_mem(socket_info_t * s, u_char fn, int space,
- u_int addr, u_int len, void *ptr)
+int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr)
{
struct pci_dev *dev;
struct resource *res;
@@ -186,7 +185,7 @@
if (!s->cb_config)
goto fail;
- dev = &s->cb_config[fn].dev;
+ dev = &s->cb_config[0].dev;
/* Config space? */
if (space == 0) {
diff -ur -x sa11* -x Kconfig -x Makefile orig/drivers/pcmcia/cistpl.c linux/drivers/pcmcia/cistpl.c
--- orig/drivers/pcmcia/cistpl.c Sun Nov 24 10:12:25 2002
+++ linux/drivers/pcmcia/cistpl.c Sun Feb 23 10:23:58 2003
@@ -327,7 +327,7 @@
}
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS)
- ret = read_cb_mem(s, 0, attr, addr, len, ptr);
+ ret = read_cb_mem(s, attr, addr, len, ptr);
else
#endif
ret = read_cis_mem(s, attr, addr, len, ptr);
@@ -358,7 +358,7 @@
for (i = 0; i < s->cis_used; i++) {
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS)
- read_cb_mem(s, 0, s->cis_table[i].attr, s->cis_table[i].addr,
+ read_cb_mem(s, s->cis_table[i].attr, s->cis_table[i].addr,
s->cis_table[i].len, buf);
else
#endif
diff -ur -x sa11* -x Kconfig -x Makefile orig/drivers/pcmcia/cs_internal.h linux/drivers/pcmcia/cs_internal.h
--- orig/drivers/pcmcia/cs_internal.h Sun Feb 23 12:39:27 2003
+++ linux/drivers/pcmcia/cs_internal.h Sun Feb 23 11:39:32 2003
@@ -200,8 +200,7 @@
void cb_free(socket_info_t *s);
void cb_enable(socket_info_t *s);
void cb_disable(socket_info_t *s);
-int read_cb_mem(socket_info_t *s, u_char fn, int space,
- u_int addr, u_int len, void *ptr);
+int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr);
void cb_release_cis_mem(socket_info_t *s);
/* In cistpl.c */
next prev parent reply other threads:[~2003-02-23 15:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-23 15:20 [PATCH] [1/6] Remove dummy cb_config() and cb_release() Russell King
2003-02-23 15:20 ` [PATCH] [2/6] Remove unused "dev" argument from cb_setup_cis_mem Russell King
2003-02-23 15:20 ` Russell King [this message]
2003-02-23 15:20 ` [PATCH] [4/6] Remove pci_{read,write}[bwl] Russell King
2003-02-23 15:20 ` [PATCH] [5/6] Remove stack allocation of struct pci_dev Russell King
2003-02-23 15:20 ` [PATCH] [6/6] Always re-read vendor for each function Russell King
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=20020223151803@raistlin.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 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.