mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Tsai <ed.tsai@mediatek.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: remove reduntant assignment when alloc sdev
Date: Tue, 22 Jun 2021 09:27:05 +0800	[thread overview]
Message-ID: <9bbe52d3f21b91eadf7ba30be5054cf64ba47739.camel@mediatek.com> (raw)
In-Reply-To: <9e1d5f1f-b51e-8f1a-d052-d6debed116e6@acm.org>

On Tue, 2021-06-22 at 01:21 +0800, Bart Van Assche wrote:
> On 6/20/21 8:45 PM, Ed Tsai wrote:
> > sdev->reqeust_queue and its queuedata have been set up in
> > scsi_mq_alloc_queue(). No need to do that again.
> > 
> > Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
> > ---
> >  drivers/scsi/scsi_scan.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> > index 12f54571b83e..82c1792f1de2 100644
> > --- a/drivers/scsi/scsi_scan.c
> > +++ b/drivers/scsi/scsi_scan.c
> > @@ -266,8 +266,7 @@ static struct scsi_device
> > *scsi_alloc_sdev(struct scsi_target *starget,
> >  	 */
> >  	sdev->borken = 1;
> >  
> > -	sdev->request_queue = scsi_mq_alloc_queue(sdev);
> > -	if (!sdev->request_queue) {
> > +	if (!scsi_mq_alloc_queue(sdev)) {
> >  		/* release fn is set up in
> > scsi_sysfs_device_initialise, so
> >  		 * have to free and put manually here */
> >  		put_device(&starget->dev);
> > @@ -275,7 +274,6 @@ static struct scsi_device
> > *scsi_alloc_sdev(struct scsi_target *starget,
> >  		goto out;
> >  	}
> >  	WARN_ON_ONCE(!blk_get_queue(sdev->request_queue));
> > -	sdev->request_queue->queuedata = sdev;
> >  
> >  	depth = sdev->host->cmd_per_lun ?: 1;
> 
> Since scsi_mq_alloc_queue() only has one caller, please inline
> scsi_mq_alloc_queue() instead of making this change. See also
> 
https://lore.kernel.org/linux-scsi/20201123031749.14912-5-bvanassche@acm.org/
> 
> Thanks,
> 
> Bart.

have planned to re-submit it?

  reply	other threads:[~2021-06-22  1:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  3:45 Ed Tsai
2021-06-21 17:21 ` Bart Van Assche
2021-06-22  1:27   ` Ed Tsai [this message]
2021-06-22  2:47     ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bbe52d3f21b91eadf7ba30be5054cf64ba47739.camel@mediatek.com \
    --to=ed.tsai@mediatek.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®