aic94xx: fix bit masking
PATCH v2 8/8 aic94xx: fix bit masking
Bit masking should happen before casting (u16), thus parentheses are necessary in order to fix the following sparse warning:
drivers/scsi/aic94xx/aic94xx_seq.c:748:35: warning: cast truncates bits from constant value (93ef7f becomes ef7f)
Signed-off-by Jingoo Han <[email protected]>
---
No changes since v1:
drivers/scsi/aic94xx/aic94xx_seq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/aic94xx/aic94xx_seq.c +1 -1
@@ -745,7 +745,7 @@ static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha, int lseq)asd_write_reg_word (asd_ha,LmSEQ_INTEN_SAVE (lseq), (u16) ((LmM0INTEN_MASK &0xFFFF0000 ) >>16 ));asd_write_reg_word (asd_ha,LmSEQ_INTEN_SAVE (lseq) +2 , - (u16 ) LmM0INTEN_MASK &0xFFFF ); + (u16) (LmM0INTEN_MASK &0xFFFF ));asd_write_reg_byte (asd_ha,LmSEQ_LINK_RST_FRM_LEN (lseq),0 );asd_write_reg_byte (asd_ha,LmSEQ_LINK_RST_PROTOCOL (lseq),0 );asd_write_reg_byte (asd_ha,LmSEQ_RESP_STATUS (lseq),0 );
Signature · 1 line
1.7.10.4