On Wed, 2018-08-01 at 11:04 +-0300, Avri Altman wrote: +AD4- +- if (qr-+AD4-opcode +ACEAPQ- UPIU+AF8-QUERY+AF8-OPCODE+AF8-WRITE+AF8-DESC +AHwAfA- +AD4- +- desc+AF8-size +ADwAPQ- 0) +AD4- +- return -EINVAL+ADs- Please use the full line length and don't split lines if that is not necessary. +AD4- +- ret +AD0- ufshcd+AF8-map+AF8-desc+AF8-id+AF8-to+AF8-length(bsg+AF8-host-+AD4-hba, desc+AF8-id, buff+AF8-len)+ADs- +AD4- +- +AD4- +- if (ret +AHwAfA- +ACE-buff+AF8-len) +AD4- +- return -EINVAL+ADs- Why is buff+AF8-len only tested after it has been passed as an argument to ufshcd+AF8-map+AF8-desc+AF8-id+AF8-to+AF8-length()? That seems weird to me. +AD4- +-static int ufs+AF8-bsg+AF8-verify+AF8-query+AF8-size(unsigned int request+AF8-len, +AD4- +- unsigned int reply+AF8-len, +AD4- +- int rw, int buff+AF8-len) +AD4- +-+AHs- +AD4- +- int min+AF8-req+AF8-len +AD0- sizeof(struct ufs+AF8-bsg+AF8-request)+ADs- +AD4- +- int min+AF8-rsp+AF8-len +AD0- sizeof(struct ufs+AF8-bsg+AF8-reply)+ADs- +AD4- +- +AD4- +- if (rw +AD0APQ- UFS+AF8-BSG+AF8-NOP) +AD4- +- goto null+AF8-buff+ADs- +AD4- +- +AD4- +- if (rw +AD0APQ- WRITE) +AD4- +- min+AF8-req+AF8-len +-+AD0- buff+AF8-len+ADs- Can the +ACI-goto+ACI- statement be avoided by using a switch/case on 'rw'? Thanks, Bart.