The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 19/60] struct device - replace bus_id with dev_name(), dev_set_name()
Date: Thu, 27 Nov 2008 11:30:39 +0100	[thread overview]
Message-ID: <20081127103133.084787041@de.ibm.com> (raw)
In-Reply-To: 20081127103020.528516828@de.ibm.com

[-- Attachment #1: 118-bus_id.diff --]
[-- Type: text/plain, Size: 6144 bytes --]

From: Kay Sievers <kay.sievers@vrfy.org>

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/block/dasd_devmap.c |   13 +++++++------
 drivers/s390/block/dcssblk.c     |    5 +++--
 drivers/s390/cio/ccwgroup.c      |    8 +++++---
 drivers/s390/cio/device.c        |    2 +-
 drivers/s390/scsi/zfcp_aux.c     |    6 ++++--
 5 files changed, 20 insertions(+), 14 deletions(-)

Index: quilt-2.6/drivers/s390/block/dasd_devmap.c
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dasd_devmap.c
+++ quilt-2.6/drivers/s390/block/dasd_devmap.c
@@ -23,6 +23,7 @@
 
 /* This is ugly... */
 #define PRINTK_HEADER "dasd_devmap:"
+#define DASD_BUS_ID_SIZE 20
 
 #include "dasd_int.h"
 
@@ -41,7 +42,7 @@ EXPORT_SYMBOL_GPL(dasd_page_cache);
  */
 struct dasd_devmap {
 	struct list_head list;
-	char bus_id[BUS_ID_SIZE];
+	char bus_id[DASD_BUS_ID_SIZE];
         unsigned int devindex;
         unsigned short features;
 	struct dasd_device *device;
@@ -94,7 +95,7 @@ dasd_hash_busid(const char *bus_id)
 	int hash, i;
 
 	hash = 0;
-	for (i = 0; (i < BUS_ID_SIZE) && *bus_id; i++, bus_id++)
+	for (i = 0; (i < DASD_BUS_ID_SIZE) && *bus_id; i++, bus_id++)
 		hash += *bus_id;
 	return hash & 0xff;
 }
@@ -301,7 +302,7 @@ dasd_parse_range( char *parsestring ) {
 	int from, from_id0, from_id1;
 	int to, to_id0, to_id1;
 	int features, rc;
-	char bus_id[BUS_ID_SIZE+1], *str;
+	char bus_id[DASD_BUS_ID_SIZE+1], *str;
 
 	str = parsestring;
 	rc = dasd_busid(&str, &from_id0, &from_id1, &from);
@@ -407,14 +408,14 @@ dasd_add_busid(const char *bus_id, int f
 	devmap = NULL;
 	hash = dasd_hash_busid(bus_id);
 	list_for_each_entry(tmp, &dasd_hashlists[hash], list)
-		if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
+		if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) {
 			devmap = tmp;
 			break;
 		}
 	if (!devmap) {
 		/* This bus_id is new. */
 		new->devindex = dasd_max_devindex++;
-		strncpy(new->bus_id, bus_id, BUS_ID_SIZE);
+		strncpy(new->bus_id, bus_id, DASD_BUS_ID_SIZE);
 		new->features = features;
 		new->device = NULL;
 		list_add(&new->list, &dasd_hashlists[hash]);
@@ -439,7 +440,7 @@ dasd_find_busid(const char *bus_id)
 	devmap = ERR_PTR(-ENODEV);
 	hash = dasd_hash_busid(bus_id);
 	list_for_each_entry(tmp, &dasd_hashlists[hash], list) {
-		if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
+		if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) {
 			devmap = tmp;
 			break;
 		}
Index: quilt-2.6/drivers/s390/block/dcssblk.c
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dcssblk.c
+++ quilt-2.6/drivers/s390/block/dcssblk.c
@@ -21,6 +21,7 @@
 #define DCSSBLK_NAME "dcssblk"
 #define DCSSBLK_MINORS_PER_DISK 1
 #define DCSSBLK_PARM_LEN 400
+#define DCSS_BUS_ID_SIZE 20
 
 #ifdef DCSSBLK_DEBUG
 #define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x)
@@ -50,7 +51,7 @@ static struct block_device_operations dc
 struct dcssblk_dev_info {
 	struct list_head lh;
 	struct device dev;
-	char segment_name[BUS_ID_SIZE];
+	char segment_name[DCSS_BUS_ID_SIZE];
 	atomic_t use_count;
 	struct gendisk *gd;
 	unsigned long start;
@@ -65,7 +66,7 @@ struct dcssblk_dev_info {
 
 struct segment_info {
 	struct list_head lh;
-	char segment_name[BUS_ID_SIZE];
+	char segment_name[DCSS_BUS_ID_SIZE];
 	unsigned long start;
 	unsigned long end;
 	int segment_type;
Index: quilt-2.6/drivers/s390/cio/ccwgroup.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/ccwgroup.c
+++ quilt-2.6/drivers/s390/cio/ccwgroup.c
@@ -19,6 +19,8 @@
 #include <asm/ccwdev.h>
 #include <asm/ccwgroup.h>
 
+#define CCW_BUS_ID_SIZE		20
+
 /* In Linux 2.4, we had a channel device layer called "chandev"
  * that did all sorts of obscure stuff for networking devices.
  * This is another driver that serves as a replacement for just
@@ -172,7 +174,7 @@ static int __get_next_bus_id(const char 
 		len = end - start + 1;
 		end++;
 	}
-	if (len < BUS_ID_SIZE) {
+	if (len < CCW_BUS_ID_SIZE) {
 		strlcpy(bus_id, start, len);
 		rc = 0;
 	} else
@@ -181,7 +183,7 @@ static int __get_next_bus_id(const char 
 	return rc;
 }
 
-static int __is_valid_bus_id(char bus_id[BUS_ID_SIZE])
+static int __is_valid_bus_id(char bus_id[CCW_BUS_ID_SIZE])
 {
 	int cssid, ssid, devno;
 
@@ -213,7 +215,7 @@ int ccwgroup_create_from_string(struct d
 {
 	struct ccwgroup_device *gdev;
 	int rc, i;
-	char tmp_bus_id[BUS_ID_SIZE];
+	char tmp_bus_id[CCW_BUS_ID_SIZE];
 	const char *curr_buf;
 
 	gdev = kzalloc(sizeof(*gdev) + num_devices * sizeof(gdev->cdev[0]),
Index: quilt-2.6/drivers/s390/cio/device.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device.c
+++ quilt-2.6/drivers/s390/cio/device.c
@@ -1723,7 +1723,7 @@ __ccwdev_check_busid(struct device *dev,
 
 	bus_id = id;
 
-	return (strncmp(bus_id, dev_name(dev), BUS_ID_SIZE) == 0);
+	return (strcmp(bus_id, dev_name(dev)) == 0);
 }
 
 
Index: quilt-2.6/drivers/s390/scsi/zfcp_aux.c
===================================================================
--- quilt-2.6.orig/drivers/s390/scsi/zfcp_aux.c
+++ quilt-2.6/drivers/s390/scsi/zfcp_aux.c
@@ -29,6 +29,8 @@
 #include <linux/seq_file.h>
 #include "zfcp_ext.h"
 
+#define ZFCP_BUS_ID_SIZE	20
+
 static char *device;
 
 MODULE_AUTHOR("IBM Deutschland Entwicklung GmbH - linux390@de.ibm.com");
@@ -84,9 +86,9 @@ static int __init zfcp_device_setup(char
 	strcpy(str, devstr);
 
 	token = strsep(&str, ",");
-	if (!token || strlen(token) >= BUS_ID_SIZE)
+	if (!token || strlen(token) >= ZFCP_BUS_ID_SIZE)
 		goto err_out;
-	strncpy(zfcp_data.init_busid, token, BUS_ID_SIZE);
+	strncpy(zfcp_data.init_busid, token, ZFCP_BUS_ID_SIZE);
 
 	token = strsep(&str, ",");
 	if (!token || strict_strtoull(token, 0,

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  parent reply	other threads:[~2008-11-27 10:39 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27 10:30 [patch 00/60] s390 feature patches for 2.6.29 Martin Schwidefsky
2008-11-27 10:30 ` [patch 01/60] vmcp: remove BKL Martin Schwidefsky
2008-11-27 10:30 ` [patch 02/60] arch_setup_additional_pages arguments Martin Schwidefsky
2008-11-27 10:30 ` [patch 03/60] introduce vdso on s390 Martin Schwidefsky
2008-11-27 10:30 ` [patch 04/60] convert etr/stp to stop_machine interface Martin Schwidefsky
2008-11-27 10:30 ` [patch 05/60] serialize stp/etr work Martin Schwidefsky
2008-11-27 10:30 ` [patch 06/60] convert s390 to generic IPI infrastructure Martin Schwidefsky
2008-11-27 10:30 ` [patch 07/60] Move stfle to header file Martin Schwidefsky
2008-11-27 10:30 ` [patch 08/60] zcrypt: Use of Thin Interrupts Martin Schwidefsky
2008-11-27 10:30 ` [patch 09/60] ap: Minor code beautification Martin Schwidefsky
2008-11-27 10:30 ` [patch 10/60] qdio: fix qeth port count detection Martin Schwidefsky
2008-11-27 10:30 ` [patch 11/60] qdio: add eqbs/sqbs instruction counters Martin Schwidefsky
2008-11-27 10:30 ` [patch 12/60] qdio: fix compile warning under 31 bit Martin Schwidefsky
2008-11-27 10:30 ` [patch 13/60] qdio: rework debug feature logging Martin Schwidefsky
2008-11-27 10:30 ` [patch 14/60] qdio: improve error handling for unexpected buffer states Martin Schwidefsky
2008-11-27 10:30 ` [patch 15/60] qdio: improve inbound buffer acknowledgement Martin Schwidefsky
2008-11-27 10:30 ` [patch 16/60] service level interface Martin Schwidefsky
2008-11-27 10:30 ` [patch 17/60] zfcp: Report microcode level through " Martin Schwidefsky
2008-11-27 10:30 ` [patch 18/60] dasd: improve dasd statistics proc interface Martin Schwidefsky
2008-11-27 10:30 ` Martin Schwidefsky [this message]
2008-11-27 10:30 ` [patch 20/60] iucv: Locking free version of iucv_message_(receive|send) Martin Schwidefsky
2008-11-27 10:30 ` [patch 21/60] s390/hvc_console: z/VM IUCV hypervisor console support Martin Schwidefsky
2008-11-27 10:30 ` [patch 22/60] ftrace: function tracer backend for s390 Martin Schwidefsky
2008-11-27 10:30 ` [patch 23/60] __page_to_pfn warnings Martin Schwidefsky
2008-11-27 10:30 ` [patch 24/60] remove ptrace warning on 31 bit Martin Schwidefsky
2008-11-27 10:30 ` [patch 25/60] cio: get rid of compile warning Martin Schwidefsky
2008-11-27 10:30 ` [patch 26/60] mark disabled_wait as noreturn function Martin Schwidefsky
2008-11-27 10:30 ` [patch 27/60] remove warnings with functions ending in BUG Martin Schwidefsky
2008-11-27 10:30 ` [patch 28/60] sclp vt220: fix compile warning Martin Schwidefsky
2008-11-27 10:30 ` [patch 29/60] Add processor type march=z10 and a processor type safety check Martin Schwidefsky
2008-11-27 10:30 ` [patch 30/60] dasd: Use accessors instead of using driver_data directly Martin Schwidefsky
2008-11-27 10:30 ` [patch 31/60] cio: update sac values Martin Schwidefsky
2008-11-27 10:30 ` [patch 32/60] Remove initial kernel stack backchain initialization Martin Schwidefsky
2008-11-27 10:30 ` [patch 33/60] cio: move irritating comment Martin Schwidefsky
2008-11-27 10:30 ` [patch 34/60] add new machine types to setup_hwcaps Martin Schwidefsky
2008-11-27 10:30 ` [patch 35/60] convert xpram printks to pr_xxx macros Martin Schwidefsky
2008-11-27 10:30 ` [patch 36/60] convert vmcp " Martin Schwidefsky
2008-11-27 10:30 ` [patch 37/60] convert lcs printks to dev_xxx and " Martin Schwidefsky
2008-11-27 10:30 ` [patch 38/60] convert cpcmd printks to " Martin Schwidefsky
2008-11-27 10:30 ` [patch 39/60] convert vmur " Martin Schwidefsky
2008-11-27 10:31 ` [patch 40/60] convert cio " Martin Schwidefsky
2008-11-27 10:31 ` [patch 41/60] convert cpacf " Martin Schwidefsky
2008-11-27 10:31 ` [patch 42/60] convert time " Martin Schwidefsky
2008-11-27 10:31 ` [patch 43/60] convert hypfs " Martin Schwidefsky
2008-11-27 10:31 ` [patch 44/60] convert setup " Martin Schwidefsky
2008-11-27 10:31 ` [patch 45/60] convert appldata " Martin Schwidefsky
2008-11-27 10:31 ` [patch 46/60] convert monreader " Martin Schwidefsky
2008-11-27 10:31 ` [patch 47/60] convert s390 debug feature " Martin Schwidefsky
2008-11-27 10:31 ` [patch 48/60] convert monwriter " Martin Schwidefsky
2008-11-27 10:31 ` [patch 49/60] convert dcssblk and extmem printks messages " Martin Schwidefsky
2008-11-27 10:31 ` [patch 50/60] convert ap_bus printks " Martin Schwidefsky
2008-11-27 10:31 ` [patch 51/60] convert iucv printks to dev_xxx and " Martin Schwidefsky
2008-11-27 10:31 ` [patch 52/60] convert sclp printks to " Martin Schwidefsky
2008-11-27 10:31 ` [patch 53/60] convert qeth printks to dev_xxx and " Martin Schwidefsky
2008-11-27 10:31 ` [patch 54/60] convert cpu related printks to " Martin Schwidefsky
2008-11-27 10:31 ` [patch 55/60] convert zfcp dumper " Martin Schwidefsky
2008-11-27 10:31 ` [patch 56/60] convert vmlogrdr " Martin Schwidefsky
2008-11-27 10:31 ` [patch 57/60] convert zfcp " Martin Schwidefsky
2008-11-27 10:31 ` [patch 58/60] convert ctcm printks to dev_xxx and " Martin Schwidefsky
2008-11-27 10:31 ` [patch 59/60] provide documentation for hvc_iucv printk & kernel parameter Martin Schwidefsky
2008-11-27 10:31 ` [patch 60/60] tape message cleanup Martin Schwidefsky

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=20081127103133.084787041@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=gregkh@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox