On 2019-05-26 11:46 a.m., Bart Van Assche wrote:
On 5/24/19 11:47 AM, Douglas Gilbert wrote:
Move code around so it has the basic ordering: open(), close(),
write(), read(), ioctl(), other system calls (e.g. mmap()),
support code and finally debug code. The change was to put the
write() associated code before the read() code. The write()
system call is associated with submitting SCSI commands (i.e.
writing metadata to the device). The read() system call is
associated with receiving the responses of earlier submitted
commands.
Helper functions are often placed above their caller to reduce
the number of forward function declarations needed.
Moving helper functions in front of their caller is useful but random
reordering of functions not. Such a random reordering of code pollutes
the git history. Please don't do that.
Another reviewer accepted that open,close,submit,receive was a more
logical order than what was there previously. He suggested containing
the moves in a single patch within the patchset. It seemed best to
do that first, hence this patch (i.e. 1/19).
Over time, patches by others have blurred what started as a
coherent ordering of functions, IMO. There needs to be a way to
re-mediate that. git could have better ways of notating that
a function has moved within a source file, or to another file.
There is a drastic alternative: two patches, one to remove the
driver, another to add the rewrite.
Please rephrase artless expressions like:
- "What makes you think that ...", (in another post) and
- "random reordering of code pollutes"
and use more professional language. Thanks.
Douglas Gilbert