non-unique constant/macro identifiers.
Subsystems (4)
From: Ursula Braun <[email protected]>
[S390] non-unique constant/macro identifiers.
Add some prefixes to constands defined in drivers/s390/net/qdio.h and drivers/s390/lcs.h to make it possible to include the three header files drivers/s390/net/qeth.h, drivers/s390/net/qdio.h and drivers/net/s390/lcs.h in one C file. This is required for the patch that generates the kerntypes.o file for use by lcrash.
Signed-off-by Ursula Braun <[email protected]>
Signed-off-by Martin Schwidefsky <[email protected]>
---
drivers/s390/cio/qdio.c | 8 ++-- drivers/s390/cio/qdio.h | 4 -- drivers/s390/net/lcs.c | 78 ++++++++++++++++++++++--------------------- drivers/s390/net/lcs.h | 25 +++++-------- drivers/s390/net/qeth.h | 2 - drivers/s390/net/qeth_main.c | 6 +-- 6 files changed, 58 insertions(+), 65 deletions(-)
drivers/s390/cio/qdio.c +4 -4
@@ -481,7 +481,7 @@ qdio_stop_polling(struct qdio_q *q)unsigned char state =0 ;struct qdio_irq *irq = (struct qdio_irq *) q->irq_ptr; -if (!atomic_swap (&q->polling,0 )) +if (!atomic_xchg (&q->polling,0 ))return 1 ;QDIO_DBF_TEXT4 (0 ,trace,"stoppoll" );
@@ -1964,8 +1964,8 @@ qdio_irq_check_sense(struct subchannel_iQDIO_DBF_HEX0 (0 ,sense,irb,QDIO_DBF_SENSE_LEN );QDIO_PRINT_WARN ("sense data available on qdio channel.\n" ); -HEXDUMP16 (WARN ,"irb: " ,irb); -HEXDUMP16 (WARN ,"sense data: " ,irb->ecw); +QDIO_HEXDUMP16 (WARN ,"irb: " ,irb); +QDIO_HEXDUMP16 (WARN ,"sense data: " ,irb->ecw); } }
@@ -3425,7 +3425,7 @@ do_qdio_handle_inbound(struct qdio_q *q,if ((used_elements+count==QDIO_MAX_BUFFERS_PER_Q )&& (callflags&QDIO_FLAG_UNDER_INTERRUPT )) -atomic_swap (&q->polling,0 ); +atomic_xchg (&q->polling,0 );if (used_elements)return ;
drivers/s390/cio/qdio.h +1 -3
@@ -236,7 +236,7 @@ enum qdio_irq_states { #define QDIO_PRINT_EMERG(x...) do { } while (0)#endif -#define HEXDUMP16 (importance,header,ptr) \ +#define QDIO_HEXDUMP16 (importance,header,ptr) \ QDIO_PRINT_##importance(header "%02x %02x %02x %02x " \ "%02x %02x %02x %02x %02x %02x %02x %02x " \ "%02x %02x %02x %02x\n",*(((char*)ptr)), \
@@ -429,8 +429,6 @@ struct qdio_perf_stats { };#endif /* QDIO_PERFORMANCE_STATS */ -#define atomic_swap (a,b) xchg((int*)a.counter,b) -/* unlikely as the later the better */ #define SYNC_MEMORY if (unlikely(q->siga_sync)) qdio_siga_sync_q(q)#define SYNC_MEMORY_ALL if (unlikely(q->siga_sync)) \
drivers/s390/net/lcs.c +40 -38
240 lines not on this page · raw message
drivers/s390/net/lcs.h +10 -15
@@ -23,11 +23,6 @@ do { }while (0 )/** -* some more definitions for debug or output stuff - */ -#define PRINTK_HEADER " lcs: " - -/** * sysfs related stuff */ #define CARD_FROM_DEV(cdev) \
@@ -127,22 +122,22 @@ do {* LCS Buffer states */ enum lcs_buffer_states { -BUF_STATE_EMPTY ,/* buffer is empty */ -BUF_STATE_LOCKED ,/* buffer is locked, don't touch */ -BUF_STATE_READY ,/* buffer is ready for read/write */ -BUF_STATE_PROCESSED , +LCS_BUF_STATE_EMPTY ,/* buffer is empty */ +LCS_BUF_STATE_LOCKED ,/* buffer is locked, don't touch */ +LCS_BUF_STATE_READY ,/* buffer is ready for read/write */ +LCS_BUF_STATE_PROCESSED , };/** * LCS Channel State Machine declarations */ enum lcs_channel_states { -CH_STATE_INIT , -CH_STATE_HALTED , -CH_STATE_STOPPED , -CH_STATE_RUNNING , -CH_STATE_SUSPENDED , -CH_STATE_CLEARED , +LCS_CH_STATE_INIT , +LCS_CH_STATE_HALTED , +LCS_CH_STATE_STOPPED , +LCS_CH_STATE_RUNNING , +LCS_CH_STATE_SUSPENDED , +LCS_CH_STATE_CLEARED , };/**
drivers/s390/net/qeth.h +0 -2
@@ -151,8 +151,6 @@ qeth_hex_dump(unsigned char *buf, size_t#define SENSE_RESETTING_EVENT_BYTE 1#define SENSE_RESETTING_EVENT_FLAG 0x80 -#define atomic_swap (a,b) xchg((int *)a.counter, b) -/* * Common IO related definitions */
drivers/s390/net/qeth_main.c +3 -3
@@ -2982,7 +2982,7 @@ qeth_check_outbound_queue(struct qeth_qd*/ if ((atomic_read (&queue->used_buffers) <=QETH_LOW_WATERMARK_PACK ) || !atomic_read (&queue->set_pci_flags_count)){ -if (atomic_swap (&queue->state,QETH_OUT_Q_LOCKED_FLUSH ) == +if (atomic_xchg (&queue->state,QETH_OUT_Q_LOCKED_FLUSH ) ==QETH_OUT_Q_UNLOCKED ) {/* * If we get in here, there was no action in
@@ -3245,7 +3245,7 @@ qeth_free_qdio_buffers(struct qeth_cardint i, j;QETH_DBF_TEXT (trace,2 ,"freeqdbf" ); -if (atomic_swap (&card->qdio.state,QETH_QDIO_UNINITIALIZED ) == +if (atomic_xchg (&card->qdio.state,QETH_QDIO_UNINITIALIZED ) ==QETH_QDIO_UNINITIALIZED )return ;kfree (card->qdio.in_q);
@@ -4366,7 +4366,7 @@ out:if (flush_count)qeth_flush_buffers (queue,0 , start_index, flush_count);else if (!atomic_read (&queue->set_pci_flags_count)) -atomic_swap (&queue->state,QETH_OUT_Q_LOCKED_FLUSH ); +atomic_xchg (&queue->state,QETH_OUT_Q_LOCKED_FLUSH );/* * queue->state will go from LOCKED -> UNLOCKED or from * LOCKED_FLUSH -> LOCKED if output_handler wanted to 'notify' us