On Mon, Aug 29, 2016 at 09:44:36PM +0000, Don Brace wrote: > > -----Original Message----- > > From: Johannes Thumshirn [mailto:jthumshirn@xxxxxxx] [...] > > > + while (1) { > > > > Is there any compelling reason why you didn't use scsi_for_each_sg() > > here? I don't see a reason for the while (1) construct. > > > The PQI chaining makes using scsi_for_each_sg a little more difficult to > maintain. We would prefer to leave the code as is. Hmmm OK. The only other thing that springs to my mind is this: for (i = 0; i <= sg_count; i++) { pqi_set_sg_descriptor(sg_descriptor, sg); if (!chained) num_sg_in_iu++; if (i == sg_count) break; which isn't neccesserily better to read... > > > > > > + pqi_set_sg_descriptor(sg_descriptor, sg); > > > + if (!chained) > > > + num_sg_in_iu++; > > > + i++; > > > + if (i == sg_count) > > > + break; I guess we'll have to live with it then. Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx> -- Johannes Thumshirn Storage jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html