Message ID | 20210921173436.3533078-2-bvanassche@acm.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | None | expand |
On Tue, Sep 21, 2021 at 10:34:32AM -0700, Bart Van Assche wrote: > Conditional statements are faster than indirect calls. Hence call > scsi_done() directly. > > Signed-off-by: Bart Van Assche <bvanassche@acm.org> > --- > drivers/staging/rts5208/rtsx.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index 898add4d1fc8..f1136f6bcee2 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -140,7 +140,6 @@ static int queuecommand_lck(struct scsi_cmnd *srb, > } > > /* enqueue the command and wake up the control thread */ > - srb->scsi_done = done; > chip->srb = srb; > complete(&dev->cmnd_ready); > > @@ -423,7 +422,7 @@ static int rtsx_control_thread(void *__dev) > > /* indicate that the command is done */ > else if (chip->srb->result != DID_ABORT << 16) { > - chip->srb->scsi_done(chip->srb); > + scsi_done(chip->srb); > } else { > skip_for_abort: > dev_err(&dev->pci->dev, "scsi command aborted\n"); > @@ -635,7 +634,7 @@ static void quiesce_and_remove_host(struct rtsx_dev *dev) > if (chip->srb) { > chip->srb->result = DID_NO_CONNECT << 16; > scsi_lock(host); > - chip->srb->scsi_done(dev->chip->srb); > + scsi_done(dev->chip->srb); > chip->srb = NULL; > scsi_unlock(host); > } I do not see the whole thread of this series on any mailing list (or lore.kernel.org), so I do not know if you are wanting these to go through the individual subsystem trees, or if they have to go through the scsi tree as one large series due to dependancies. thanks, greg k-h
On 9/21/21 11:30 PM, Greg Kroah-Hartman wrote: > I do not see the whole thread of this series on any mailing list (or > lore.kernel.org), so I do not know if you are wanting these to go > through the individual subsystem trees, or if they have to go through > the scsi tree as one large series due to dependancies. Hi Greg, Apparently the email service I'm using (gmail) does not support patch series with more than 78 patches. These six patches are my (failed) attempt to amend the remaining patches to the original patch series. Anyway, the entire patch series is available here: https://lore.kernel.org/linux-scsi/20210918000607.450448-1-bvanassche@acm.org/ Patch 84/84 depends on the previous patches in that series. Hence my request for Martin to queue this series via the SCSI tree. Thanks, Bart.
diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 898add4d1fc8..f1136f6bcee2 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -140,7 +140,6 @@ static int queuecommand_lck(struct scsi_cmnd *srb, } /* enqueue the command and wake up the control thread */ - srb->scsi_done = done; chip->srb = srb; complete(&dev->cmnd_ready); @@ -423,7 +422,7 @@ static int rtsx_control_thread(void *__dev) /* indicate that the command is done */ else if (chip->srb->result != DID_ABORT << 16) { - chip->srb->scsi_done(chip->srb); + scsi_done(chip->srb); } else { skip_for_abort: dev_err(&dev->pci->dev, "scsi command aborted\n"); @@ -635,7 +634,7 @@ static void quiesce_and_remove_host(struct rtsx_dev *dev) if (chip->srb) { chip->srb->result = DID_NO_CONNECT << 16; scsi_lock(host); - chip->srb->scsi_done(dev->chip->srb); + scsi_done(dev->chip->srb); chip->srb = NULL; scsi_unlock(host); }
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/staging/rts5208/rtsx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)