Re: [PATCH 3/3] scsi_debug: simplify offset calculation for dif_storep

2013-04-24 Thread Martin K. Petersen
Akinobu == Akinobu Mita akinobu.m...@gmail.com writes: + sector += len / sizeof(*dif_storep); I'd rather see sizeof(struct scsi_dif_tuple) here. But that's just personal preference. Otherwise ok. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this

[PATCH 3/3] scsi_debug: simplify offset calculation for dif_storep

2013-04-21 Thread Akinobu Mita
dif_storep is declared as pointer to unsigned char type. But it is actually used to store vmalloced array of struct sd_dif_tuple. This changes the type of dif_storep to the pointer to struct sd_dif_tuple. It simplifies offset calculation for dif_storep and enables to remove hardcoded size of