On 7/27/19 5:37 AM, Douglas Gilbert wrote: > Move main entry point functions around so submission code comes > before completion code. Prior to this, the driver used the > traditional open(), close(), read(), write(), ioctl() ordering > however in this case that places completion code (i.e. > sg_read()) before submission code (i.e. sg_write()). The main > driver entry points are considered to be those named in struct > file_operations sg_fops' definition. > > Helper functions are often placed above their caller to reduce > the number of forward function declarations needed. > > Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx> > --- > drivers/scsi/sg.c | 499 ++++++++++++++++++++++++---------------------- > 1 file changed, 261 insertions(+), 238 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg)