From: Adrian Bunk <bunk@stusta.de>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Cornelia Huck <cohuck@de.ibm.com>,
Martin Schwidesky <schwidefsky@de.ibm.com>,
Frank Pavlic <pavlic@de.ibm.com>
Subject: [2.6 patch] fix drivers/s390/net/ compilation
Date: Mon, 8 Aug 2005 00:12:18 +0200 [thread overview]
Message-ID: <20050807221218.GD4006@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0508071136020.3258@g5.osdl.org>
Looking at Jan Dittmer's crosscompile site [1], one of the two
architectures where defconfig compiled in 2.6.12.4 but does no longer
compile in 2.6.13-rc6 is s390.
Looking at the build error, it seems s390-use-klist-in-qeth-driver.patch
from -mm was intended to fix this compile error.
I haven't tested whether it is actually enough for getting the s390
defconfig compiling, but it can't make things worse.
[1] http://l4x.org/k/
<-- snip -->
From: Cornelia Huck <cohuck@de.ibm.com>
From: Martin Schwidesky <schwidefsky@de.ibm.com>
Convert qeth to the new klist interface and make it compiling again.
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/s390/net/qeth_main.c | 24 ++++----
drivers/s390/net/qeth_proc.c | 126 +++++++++++++++++++++++--------------------
2 files changed, 82 insertions(+), 68 deletions(-)
diff -puN drivers/s390/net/qeth_main.c~s390-use-klist-in-qeth-driver drivers/s390/net/qeth_main.c
--- devel/drivers/s390/net/qeth_main.c~s390-use-klist-in-qeth-driver 2005-07-28 19:20:53.000000000 -0700
+++ devel-akpm/drivers/s390/net/qeth_main.c 2005-07-28 19:20:53.000000000 -0700
@@ -8120,20 +8120,22 @@ static struct notifier_block qeth_ip6_no
#endif
static int
-qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+__qeth_reboot_event_card(struct device *dev, void *data)
{
-
- struct device *entry;
struct qeth_card *card;
- down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
- list_for_each_entry(entry, &qeth_ccwgroup_driver.driver.devices,
- driver_list) {
- card = (struct qeth_card *) entry->driver_data;
- qeth_clear_ip_list(card, 0, 0);
- qeth_qdio_clear_card(card, 0);
- }
- up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
+ card = (struct qeth_card *) dev->driver_data;
+ qeth_clear_ip_list(card, 0, 0);
+ qeth_qdio_clear_card(card, 0);
+ return 0;
+}
+
+static int
+qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+{
+
+ driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+ __qeth_reboot_event_card);
return NOTIFY_DONE;
}
diff -puN drivers/s390/net/qeth_proc.c~s390-use-klist-in-qeth-driver drivers/s390/net/qeth_proc.c
--- devel/drivers/s390/net/qeth_proc.c~s390-use-klist-in-qeth-driver 2005-07-28 19:20:53.000000000 -0700
+++ devel-akpm/drivers/s390/net/qeth_proc.c 2005-07-28 19:20:53.000000000 -0700
@@ -27,23 +27,33 @@ const char *VERSION_QETH_PROC_C = "$Revi
#define QETH_PROCFILE_NAME "qeth"
static struct proc_dir_entry *qeth_procfile;
+static int
+qeth_procfile_seq_match(struct device *dev, void *data)
+{
+ return 1;
+}
+
static void *
qeth_procfile_seq_start(struct seq_file *s, loff_t *offset)
{
- struct list_head *next_card = NULL;
- int i = 0;
+ struct device *dev;
+ loff_t nr;
down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
- if (*offset == 0)
+ nr = *offset;
+ if (nr == 0)
return SEQ_START_TOKEN;
- /* get card at pos *offset */
- list_for_each(next_card, &qeth_ccwgroup_driver.driver.devices)
- if (++i == *offset)
- return next_card;
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL,
+ NULL, qeth_procfile_seq_match);
- return NULL;
+ /* get card at pos *offset */
+ nr = *offset;
+ while (nr-- > 1 && dev)
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
+ NULL, qeth_procfile_seq_match);
+ return (void *) dev;
}
static void
@@ -55,23 +65,21 @@ qeth_procfile_seq_stop(struct seq_file *
static void *
qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
{
- struct list_head *next_card = NULL;
- struct list_head *current_card;
+ struct device *prev, *next;
if (it == SEQ_START_TOKEN) {
- next_card = qeth_ccwgroup_driver.driver.devices.next;
- if (next_card->next == next_card) /* list empty */
- return NULL;
- (*offset)++;
- } else {
- current_card = (struct list_head *)it;
- if (current_card->next == &qeth_ccwgroup_driver.driver.devices)
- return NULL; /* end of list reached */
- next_card = current_card->next;
- (*offset)++;
+ next = driver_find_device(&qeth_ccwgroup_driver.driver,
+ NULL, NULL, qeth_procfile_seq_match);
+ if (next)
+ (*offset)++;
+ return (void *) next;
}
-
- return next_card;
+ prev = (struct device *) it;
+ next = driver_find_device(&qeth_ccwgroup_driver.driver,
+ prev, NULL, qeth_procfile_seq_match);
+ if (next)
+ (*offset)++;
+ return (void *) next;
}
static inline const char *
@@ -126,7 +134,7 @@ qeth_procfile_seq_show(struct seq_file *
"-------------- ---- ------ ---------- ---- "
"---- ----- -----\n");
} else {
- device = list_entry(it, struct device, driver_list);
+ device = (struct device *) it;
card = device->driver_data;
seq_printf(s, "%s/%s/%s x%02X %-10s %-14s %-4i ",
CARD_RDEV_ID(card),
@@ -180,17 +188,20 @@ static struct proc_dir_entry *qeth_perf_
static void *
qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset)
{
- struct list_head *next_card = NULL;
- int i = 0;
+ struct device *dev = NULL;
+ int nr;
down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
/* get card at pos *offset */
- list_for_each(next_card, &qeth_ccwgroup_driver.driver.devices){
- if (i == *offset)
- return next_card;
- i++;
- }
- return NULL;
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+ qeth_procfile_seq_match);
+
+ /* get card at pos *offset */
+ nr = *offset;
+ while (nr-- > 1 && dev)
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
+ NULL, qeth_procfile_seq_match);
+ return (void *) dev;
}
static void
@@ -202,12 +213,14 @@ qeth_perf_procfile_seq_stop(struct seq_f
static void *
qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
{
- struct list_head *current_card = (struct list_head *)it;
+ struct device *prev, *next;
- if (current_card->next == &qeth_ccwgroup_driver.driver.devices)
- return NULL; /* end of list reached */
- (*offset)++;
- return current_card->next;
+ prev = (struct device *) it;
+ next = driver_find_device(&qeth_ccwgroup_driver.driver, prev,
+ NULL, qeth_procfile_seq_match);
+ if (next)
+ (*offset)++;
+ return (void *) next;
}
static int
@@ -216,7 +229,7 @@ qeth_perf_procfile_seq_show(struct seq_f
struct device *device;
struct qeth_card *card;
- device = list_entry(it, struct device, driver_list);
+ device = (struct device *) it;
card = device->driver_data;
seq_printf(s, "For card with devnos %s/%s/%s (%s):\n",
CARD_RDEV_ID(card),
@@ -318,8 +331,8 @@ static struct proc_dir_entry *qeth_ipato
static void *
qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset)
{
- struct list_head *next_card = NULL;
- int i = 0;
+ struct device *dev;
+ loff_t nr;
down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
/* TODO: finish this */
@@ -328,13 +341,16 @@ qeth_ipato_procfile_seq_start(struct seq
* output driver settings then;
* else output setting for respective card
*/
+
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+ qeth_procfile_seq_match);
+
/* get card at pos *offset */
- list_for_each(next_card, &qeth_ccwgroup_driver.driver.devices){
- if (i == *offset)
- return next_card;
- i++;
- }
- return NULL;
+ nr = *offset;
+ while (nr-- > 1 && dev)
+ dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
+ NULL, qeth_procfile_seq_match);
+ return (void *) dev;
}
static void
@@ -346,18 +362,14 @@ qeth_ipato_procfile_seq_stop(struct seq_
static void *
qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
{
- struct list_head *current_card = (struct list_head *)it;
+ struct device *prev, *next;
- /* TODO: finish this */
- /*
- * maybe SEQ_SATRT_TOKEN can be returned for offset 0
- * output driver settings then;
- * else output setting for respective card
- */
- if (current_card->next == &qeth_ccwgroup_driver.driver.devices)
- return NULL; /* end of list reached */
- (*offset)++;
- return current_card->next;
+ prev = (struct device *) it;
+ next = driver_find_device(&qeth_ccwgroup_driver.driver, prev,
+ NULL, qeth_procfile_seq_match);
+ if (next)
+ (*offset)++;
+ return (void *) next;
}
static int
@@ -372,7 +384,7 @@ qeth_ipato_procfile_seq_show(struct seq_
* output driver settings then;
* else output setting for respective card
*/
- device = list_entry(it, struct device, driver_list);
+ device = (struct device *) it;
card = device->driver_data;
return 0;
_
next prev parent reply other threads:[~2005-08-07 22:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-07 18:47 Linux-2.6.13-rc6: aic7xxx testers please Linus Torvalds
2005-08-07 20:23 ` Heikki Orsila
2005-08-07 20:38 ` Lee Revell
2005-08-07 20:50 ` Linus Torvalds
2005-08-07 20:52 ` Lee Revell
2005-08-07 21:14 ` Dumitru Ciobarcianu
2005-08-08 14:17 ` Theodore Ts'o
2005-08-07 22:12 ` Adrian Bunk [this message]
2005-08-08 8:31 ` [2.6 patch] fix drivers/s390/net/ compilation Martin Schwidefsky
2005-08-08 12:59 ` Linux-2.6.13-rc6: aic7xxx testers please John Stoffel
2005-08-08 15:08 ` Danny ter Haar
2005-08-08 17:54 ` Jesper Juhl
2005-08-09 19:35 ` John Stoffel
2005-08-09 19:58 ` James Bottomley
2005-08-09 20:12 ` John Stoffel
2005-08-10 0:50 ` James Bottomley
2005-08-10 15:28 ` John Stoffel
2005-08-10 15:46 ` James Bottomley
2005-08-10 16:27 ` John Stoffel
2005-08-11 2:30 ` John Stoffel
2005-08-11 6:34 ` Philipp Matthias Hahn
2005-08-11 6:42 ` Philipp Matthias Hahn
2005-08-11 9:54 ` Johannes Stezenbach
2005-08-11 12:37 ` hunold
2005-08-11 14:51 ` Gene Heskett
2005-08-11 15:38 ` cx88 teletext not yet implemented -was- " Michael Krufky
2005-08-11 21:53 ` Gene Heskett
2005-08-11 15:30 ` Philipp Matthias Hahn
[not found] ` <20050815071723.GB8524@titan.lahn.de>
[not found] ` <20050815215855.GB5860@linuxtv.org>
[not found] ` <E1E4vSG-0005r7-KG@allen.werkleitz.de>
2005-08-24 6:59 ` [PATCH] saa7146_i2c device model integration Philipp Matthias Hahn
2005-08-31 12:14 ` Johannes Stezenbach
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=20050807221218.GD4006@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=cohuck@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavlic@de.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@osdl.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