From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 06/11] dasd: Use const in busid functions.
Date: Thu, 15 May 2008 16:57:11 +0200 [thread overview]
Message-ID: <20080515150008.852139975@de.ibm.com> (raw)
In-Reply-To: 20080515145705.188435204@de.ibm.com
[-- Attachment #1: 006-dasd-const.diff --]
[-- Type: text/plain, Size: 2298 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
We should use 'const char *' in the busid functions since the
strings are not modified anyway.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/block/dasd_devmap.c | 10 +++++-----
drivers/s390/block/dasd_int.h | 2 +-
2 files changed, 6 insertions(+), 6 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
@@ -86,10 +86,10 @@ static DEFINE_SPINLOCK(dasd_devmap_lock)
static struct list_head dasd_hashlists[256];
int dasd_max_devindex;
-static struct dasd_devmap *dasd_add_busid(char *, int);
+static struct dasd_devmap *dasd_add_busid(const char *, int);
static inline int
-dasd_hash_busid(char *bus_id)
+dasd_hash_busid(const char *bus_id)
{
int hash, i;
@@ -394,7 +394,7 @@ dasd_parse(void)
* devices.
*/
static struct dasd_devmap *
-dasd_add_busid(char *bus_id, int features)
+dasd_add_busid(const char *bus_id, int features)
{
struct dasd_devmap *devmap, *new, *tmp;
int hash;
@@ -430,7 +430,7 @@ dasd_add_busid(char *bus_id, int feature
* Find devmap for device with given bus_id.
*/
static struct dasd_devmap *
-dasd_find_busid(char *bus_id)
+dasd_find_busid(const char *bus_id)
{
struct dasd_devmap *devmap, *tmp;
int hash;
@@ -452,7 +452,7 @@ dasd_find_busid(char *bus_id)
* Check if busid has been added to the list of dasd ranges.
*/
int
-dasd_busid_known(char *bus_id)
+dasd_busid_known(const char *bus_id)
{
return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0;
}
Index: quilt-2.6/drivers/s390/block/dasd_int.h
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dasd_int.h
+++ quilt-2.6/drivers/s390/block/dasd_int.h
@@ -598,7 +598,7 @@ struct dasd_device *dasd_device_from_cde
struct dasd_device *dasd_device_from_devindex(int);
int dasd_parse(void);
-int dasd_busid_known(char *);
+int dasd_busid_known(const char *);
/* externals in dasd_gendisk.c */
int dasd_gendisk_init(void);
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2008-05-15 14:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
2008-05-15 14:57 ` [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID Martin Schwidefsky
2008-05-15 14:57 ` [patch 02/11] Remove last traces of cio_msg= Martin Schwidefsky
2008-05-15 14:57 ` [patch 03/11] sparsemem vmemmap: initialize memmap Martin Schwidefsky
2008-05-15 14:57 ` [patch 04/11] vmlogrdr: module initialization function should return negative errors Martin Schwidefsky
2008-05-15 14:57 ` [patch 05/11] blacklist.c: removed duplicated include Martin Schwidefsky
2008-05-15 14:57 ` Martin Schwidefsky [this message]
2008-05-15 14:57 ` [patch 07/11] s390dbf: Use const char * for dbf name Martin Schwidefsky
2008-05-15 14:57 ` [patch 08/11] dasd: fix timeout handling in interrupt handler Martin Schwidefsky
2008-05-15 14:57 ` [patch 09/11] tape: Use ccw_dev_id to build cdev_id Martin Schwidefsky
2008-05-15 14:57 ` [patch 10/11] smp: __smp_call_function_map vs cpu_online_map fix Martin Schwidefsky
2008-05-15 14:57 ` [patch 11/11] show_interrupts: prevent cpu hotplug when walking cpu_online_map 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=20080515150008.852139975@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--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 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.