Re: [PATCH v2 28/84] dc395x: Call scsi_done() directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/30/21 3:26 AM, Oliver Neukum wrote:
On 30.09.21 00:05, Bart Van Assche wrote:
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

as you are doing this to multiple drivers, is there really a need to
pass the the function pointer at all?


Hi Oliver,

Thanks for having taken a look. I think the 'done' argument of the queue_command_lck()
functions is already superfluous today. The definition of the DEF_SCSI_QCMD() function
is as follows (without this patch series applied):

#define DEF_SCSI_QCMD(func_name) \
	int func_name(struct Scsi_Host *shost, struct scsi_cmnd *cmd)	\
	{								\
		unsigned long irq_flags;				\
		int rc;							\
		spin_lock_irqsave(shost->host_lock, irq_flags);		\
		rc = func_name##_lck (cmd, cmd->scsi_done);			\
		spin_unlock_irqrestore(shost->host_lock, irq_flags);	\
		return rc;						\
	}

In other words, the 'done' argument can be derived easily from the SCSI command pointer.
Do you want me to include a patch in this series that removes the 'done' argument from
the queue_command_lck() functions?

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux