Re: [PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer

2017-07-17 Thread Martin K. Petersen
Johannes, > dxfer_len is an unsigned int and we always assign a value > 0 to it, > so it doesn't make any sense to check if it is < 0. We can't really > check dxferp as well as we have both NULL and not NULL cases in the > possible call paths. > > So just return true for SG_DXFER_FROM_DEV

Re: [PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer

2017-07-17 Thread Martin K. Petersen
Johannes, > dxfer_len is an unsigned int and we always assign a value > 0 to it, > so it doesn't make any sense to check if it is < 0. We can't really > check dxferp as well as we have both NULL and not NULL cases in the > possible call paths. > > So just return true for SG_DXFER_FROM_DEV

[PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer

2017-07-17 Thread Johannes Thumshirn
dxfer_len is an unsigned int and we always assign a value > 0 to it, so it doesn't make any sense to check if it is < 0. We can't really check dxferp as well as we have both NULL and not NULL cases in the possible call paths. So just return true for SG_DXFER_FROM_DEV transfer in

[PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer

2017-07-17 Thread Johannes Thumshirn
dxfer_len is an unsigned int and we always assign a value > 0 to it, so it doesn't make any sense to check if it is < 0. We can't really check dxferp as well as we have both NULL and not NULL cases in the possible call paths. So just return true for SG_DXFER_FROM_DEV transfer in