Skip to content

Commit

Permalink
[S390] qdio: prevent compile warning under CONFIG_32BIT
Browse files Browse the repository at this point in the history
Prevent the following compiler warning if compiling a 31 bit kernel:

drivers/s390/cio/qdio_main.c: In function ‘get_outbound_buffer_frontier’:
drivers/s390/cio/qdio_main.c:646:16: warning: ‘state’ may be used uninitialized in this function
  CC      lib/radix-tree.o
  CC      drivers/s390/scsi/zfcp_cfdc.o
drivers/s390/cio/qdio_main.c: In function ‘qdio_inbound_q_moved’:
drivers/s390/cio/qdio_main.c:479:16: warning: ‘state’ may be used uninitialized in this function
drivers/s390/cio/qdio_main.c:479:16: note: ‘state’ was declared here

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Jan 31, 2011
1 parent 786cca8 commit 6fa1098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static inline void inbound_primed(struct qdio_q *q, int count)
static int get_inbound_buffer_frontier(struct qdio_q *q)
{
int count, stop;
unsigned char state;
unsigned char state = 0;

/*
* Don't check 128 buffers, as otherwise qdio_inbound_q_moved
Expand Down Expand Up @@ -643,7 +643,7 @@ void qdio_inbound_processing(unsigned long data)
static int get_outbound_buffer_frontier(struct qdio_q *q)
{
int count, stop;
unsigned char state;
unsigned char state = 0;

if (need_siga_sync(q))
if (((queue_type(q) != QDIO_IQDIO_QFMT) &&
Expand Down

0 comments on commit 6fa1098

Please sign in to comment.