aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c13
-rw-r--r--drivers/char/random.c2
-rw-r--r--drivers/char/sysrq.c4
-rw-r--r--drivers/char/tpm/tpm_bios.c3
4 files changed, 12 insertions, 10 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index aa83a0865ec1..09050797c76a 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
2856 /* Assume a single IPMB channel at zero. */ 2856 /* Assume a single IPMB channel at zero. */
2857 intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; 2857 intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB;
2858 intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; 2858 intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB;
2859 intf->curr_channel = IPMI_MAX_CHANNELS;
2859 } 2860 }
2860 2861
2861 if (rv == 0) 2862 if (rv == 0)
@@ -3648,13 +3649,13 @@ static int handle_new_recv_msg(ipmi_smi_t intf,
3648 } 3649 }
3649 3650
3650 /* 3651 /*
3651 ** We need to make sure the channels have been initialized. 3652 * We need to make sure the channels have been initialized.
3652 ** The channel_handler routine will set the "curr_channel" 3653 * The channel_handler routine will set the "curr_channel"
3653 ** equal to or greater than IPMI_MAX_CHANNELS when all the 3654 * equal to or greater than IPMI_MAX_CHANNELS when all the
3654 ** channels for this interface have been initialized. 3655 * channels for this interface have been initialized.
3655 */ 3656 */
3656 if (intf->curr_channel < IPMI_MAX_CHANNELS) { 3657 if (intf->curr_channel < IPMI_MAX_CHANNELS) {
3657 requeue = 1; /* Just put the message back for now */ 3658 requeue = 0; /* Throw the message away */
3658 goto out; 3659 goto out;
3659 } 3660 }
3660 3661
diff --git a/drivers/char/random.c b/drivers/char/random.c
index b2ced39d76b2..8c7444857a4b 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1673,7 +1673,7 @@ unsigned int get_random_int(void)
1673 int ret; 1673 int ret;
1674 1674
1675 keyptr = get_keyptr(); 1675 keyptr = get_keyptr();
1676 hash[0] += current->pid + jiffies + get_cycles() + (int)(long)&ret; 1676 hash[0] += current->pid + jiffies + get_cycles();
1677 1677
1678 ret = half_md4_transform(hash, keyptr->secret); 1678 ret = half_md4_transform(hash, keyptr->secret);
1679 put_cpu_var(get_random_int_hash); 1679 put_cpu_var(get_random_int_hash);
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index b0a6a3e51924..d6a807f4077d 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -406,7 +406,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
406 &sysrq_showlocks_op, /* d */ 406 &sysrq_showlocks_op, /* d */
407 &sysrq_term_op, /* e */ 407 &sysrq_term_op, /* e */
408 &sysrq_moom_op, /* f */ 408 &sysrq_moom_op, /* f */
409 /* g: May be registered by ppc for kgdb */ 409 /* g: May be registered for the kernel debugger */
410 NULL, /* g */ 410 NULL, /* g */
411 NULL, /* h - reserved for help */ 411 NULL, /* h - reserved for help */
412 &sysrq_kill_op, /* i */ 412 &sysrq_kill_op, /* i */
@@ -431,7 +431,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
431 &sysrq_sync_op, /* s */ 431 &sysrq_sync_op, /* s */
432 &sysrq_showstate_op, /* t */ 432 &sysrq_showstate_op, /* t */
433 &sysrq_mountro_op, /* u */ 433 &sysrq_mountro_op, /* u */
434 /* v: May be registered at init time by SMP VOYAGER */ 434 /* v: May be registered for frame buffer console restore */
435 NULL, /* v */ 435 NULL, /* v */
436 &sysrq_showstate_blocked_op, /* w */ 436 &sysrq_showstate_blocked_op, /* w */
437 /* x: May be registered on ppc/powerpc for xmon */ 437 /* x: May be registered on ppc/powerpc for xmon */
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
index ed306eb1057f..0c2f55a38b95 100644
--- a/drivers/char/tpm/tpm_bios.c
+++ b/drivers/char/tpm/tpm_bios.c
@@ -212,7 +212,8 @@ static int get_event_name(char *dest, struct tcpa_event *event,
212 unsigned char * event_entry) 212 unsigned char * event_entry)
213{ 213{
214 const char *name = ""; 214 const char *name = "";
215 char data[40] = ""; 215 /* 41 so there is room for 40 data and 1 nul */
216 char data[41] = "";
216 int i, n_len = 0, d_len = 0; 217 int i, n_len = 0, d_len = 0;
217 struct tcpa_pc_event *pc_event; 218 struct tcpa_pc_event *pc_event;
218 219