On Mon, 31 Jan 2022, Bart Van Assche wrote: > On 1/31/22 14:39, Finn Thain wrote: > > Regarding code style, this is legacy code i.e. it pre-dates the ban on > > mixed letter case. (I'm using the word legacy after the dictionary > > definition and not as a kind of weasel word intended to mean deprecated.) > > > > Mixed case names like "BAZ5000_cmd" would be frowned upon for new code but > > this is not new code. So why not just use the name SCp for variables which > > serve the same purpose that the SCp struct did? > > > > IOW, I would prefer to read the following, because SCp presumably means > > "Scsi Command Private data" whereas "scsi_pointer" means nothing to me. > > Changing the struct member name "scsi_pointer" back into "SCp" in this driver > is fine with me. In case this wouldn't be clear: I think the name "SCSI > pointer" refers to a section in the SCSI-II standard. From the SCSI-II > standard: "6.4 SCSI pointers > Consider the system shown in figure 17 in which an initiator and target > communicate on the SCSI bus in order to execute an I/O process. The SCSI > architecture provides for a set of three pointers for each I/O process, called > the saved pointers. The set of three pointers consist of one for the command, > one for the data, and one for the status. When an I/O process becomes active, > its three saved pointers are copied into the initiator’s set of three current > pointers. There is only one set of current pointers in each initiator. The > current pointers point to the next command, data, or status byte to be > transferred between the initiator’s memory and the target. The saved and > current pointers reside in the initiator. The saved command pointer always > points to the start of the command descriptor block (see 7.2) for the I/O > process. The saved status pointer always points to the start of the status > area for the I/O process. The saved data pointer points to the start of the > data area until the target sends a SAVE DATA POINTER message (see 6.6.20) for > the I/O process." > > I think the above quote shows that the contents of struct scsi_pointer has > been derived directly from the SCSI-II specification. > But only acornscsi.c and fas216.c actually use the SCp.ptr field in the way that you describe. While I agree that struct scsi_pointer was probably somehow intended to mean "saved data pointer", that just proves my point as to the poor choice of name. Anyway, I'm not interested in bikeshedding variable names. I'll let the maintainer make the call rather than attempt to veto these patches.