diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/sclp.h | 6 | ||||
-rw-r--r-- | drivers/s390/char/sclp_early_core.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index e4e2df7a478e..fe85f9aaf359 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -417,7 +417,7 @@ sclp_dispatch_evbufs(struct sccb_header *sccb) reg = NULL; list_for_each(l, &sclp_reg_list) { reg = list_entry(l, struct sclp_register, list); - if (reg->receive_mask & (1 << (32 - evbuf->type))) + if (reg->receive_mask & SCLP_EVTYP_MASK(evbuf->type)) break; else reg = NULL; @@ -748,7 +748,7 @@ EXPORT_SYMBOL(sclp_remove_processed); /* Prepare init mask request. Called while sclp_lock is locked. */ static inline void -__sclp_make_init_req(u32 receive_mask, u32 send_mask) +__sclp_make_init_req(sccb_mask_t receive_mask, sccb_mask_t send_mask) { struct init_sccb *sccb; @@ -761,7 +761,7 @@ __sclp_make_init_req(u32 receive_mask, u32 send_mask) sclp_init_req.callback = NULL; sclp_init_req.callback_data = NULL; sclp_init_req.sccb = sccb; - sccb->header.length = sizeof(struct init_sccb); + sccb->header.length = sizeof(*sccb); sccb->mask_length = sizeof(sccb_mask_t); sccb->receive_mask = receive_mask; sccb->send_mask = send_mask; diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index 9b10f12d3f53..e31aaf266154 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -18,7 +18,7 @@ #define MAX_KMEM_PAGES (sizeof(unsigned long) << 3) #define SCLP_CONSOLE_PAGES 6 -#define SCLP_EVTYP_MASK(T) (1U << (32 - (T))) +#define SCLP_EVTYP_MASK(T) (1UL << (sizeof(sccb_mask_t) * BITS_PER_BYTE - (T))) #define EVTYP_OPCMD 0x01 #define EVTYP_MSG 0x02 @@ -230,8 +230,8 @@ void sclp_early_wait_irq(void); int sclp_early_cmd(sclp_cmdw_t cmd, void *sccb); unsigned int sclp_early_con_check_linemode(struct init_sccb *sccb); int sclp_early_set_event_mask(struct init_sccb *sccb, - unsigned long receive_mask, - unsigned long send_mask); + sccb_mask_t receive_mask, + sccb_mask_t send_mask); /* useful inlines */ diff --git a/drivers/s390/char/sclp_early_core.c b/drivers/s390/char/sclp_early_core.c index 17b0c67f3e8d..e33d8be518d1 100644 --- a/drivers/s390/char/sclp_early_core.c +++ b/drivers/s390/char/sclp_early_core.c @@ -142,8 +142,8 @@ static void sclp_early_print_vt220(const char *str, unsigned int len) } int sclp_early_set_event_mask(struct init_sccb *sccb, - unsigned long receive_mask, - unsigned long send_mask) + sccb_mask_t receive_mask, + sccb_mask_t send_mask) { memset(sccb, 0, sizeof(*sccb)); sccb->header.length = sizeof(*sccb); |