Skip to content

Commit

Permalink
[S390] smsgiucv: declare char pointers as "const"
Browse files Browse the repository at this point in the history
Declare the smsgiucv prefix char pointer as "const" and use
use const char pointers in callback functions.

Signed-off-by: Hendrik Brueckner <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
hbrueckner authored and Martin Schwidefsky committed Mar 8, 2010
1 parent 33b62a3 commit 09003ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion arch/s390/mm/cmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static struct ctl_table cmm_dir_table[] = {
#ifdef CONFIG_CMM_IUCV
#define SMSG_PREFIX "CMM"
static void
cmm_smsg_target(char *from, char *msg)
cmm_smsg_target(const char *from, char *msg)
{
long nr, seconds;

Expand Down
13 changes: 7 additions & 6 deletions drivers/s390/net/smsgiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

struct smsg_callback {
struct list_head list;
char *prefix;
const char *prefix;
int len;
void (*callback)(char *from, char *str);
void (*callback)(const char *from, char *str);
};

MODULE_AUTHOR
Expand Down Expand Up @@ -100,8 +100,8 @@ static void smsg_message_pending(struct iucv_path *path,
kfree(buffer);
}

int smsg_register_callback(char *prefix,
void (*callback)(char *from, char *str))
int smsg_register_callback(const char *prefix,
void (*callback)(const char *from, char *str))
{
struct smsg_callback *cb;

Expand All @@ -117,8 +117,9 @@ int smsg_register_callback(char *prefix,
return 0;
}

void smsg_unregister_callback(char *prefix,
void (*callback)(char *from, char *str))
void smsg_unregister_callback(const char *prefix,
void (*callback)(const char *from,
char *str))
{
struct smsg_callback *cb, *tmp;

Expand Down
6 changes: 4 additions & 2 deletions drivers/s390/net/smsgiucv.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Author(s): Martin Schwidefsky ([email protected])
*/

int smsg_register_callback(char *, void (*)(char *, char *));
void smsg_unregister_callback(char *, void (*)(char *, char *));
int smsg_register_callback(const char *,
void (*)(const char *, char *));
void smsg_unregister_callback(const char *,
void (*)(const char *, char *));

0 comments on commit 09003ed

Please sign in to comment.