On 10/5/22 10:00, Mike Christie wrote:
On 10/4/22 6:42 PM, Bart Van Assche wrote:
On 10/3/22 10:53, Mike Christie wrote:
+ cmd[0] = READ_CAPACITY;
+ memset(&cmd[1], 0, 9);
Please remove the above code and change the cmd[] declaration into something like
static const u8 cmd[10] = { READ_CAPACITY };
Would you be ok if I made these types of changes in a separate patchset?
This patcheset tried to only remove the loop/goto logic since it was
focused on retries.
Besides the ones you pointed out, I think I can make maybe 5-10 more
scsi_execute* users use static const or at least do:
unsigned char cmd[6] = { CMD } or { }
and remove some extra memsets so we end up doing it more or less the same
in all the users.
It seemed more like a cleanup patchset so I didn't want to mix it up as
this one was getting big.
Hi Mike,
Patch 32/35 already changes the code that initializes cmd[] so I think
it is fine to make the change I suggested and to rework error handling
in a single patch. However, I agree that if reworking the initialization
of cmd[] would be done as separate patches that it would make this
series too big.
Thanks,
Bart.