All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-scsi@vger.kernel.org>, <linux-block@vger.kernel.org>,
	<martin.petersen@oracle.com>, <axboe@kernel.dk>,
	<jejb@linux.ibm.com>, <matthias.bgg@gmail.com>
Cc: <linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<kuohong.wang@mediatek.com>, <peter.wang@mediatek.com>,
	<chun-hung.wu@mediatek.com>, <andy.teng@mediatek.com>,
	Stanley Chu <stanley.chu@mediatek.com>
Subject: [PATCH v2 2/2] scsi: core: remove dummy q->dev check
Date: Thu, 12 Sep 2019 16:35:28 +0800	[thread overview]
Message-ID: <1568277328-4597-3-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1568277328-4597-1-git-send-email-stanley.chu@mediatek.com>

Currently blk_set_runtime_active() is checking if q->dev is null by
itself, thus remove the same checking in its user: scsi_dev_type_resume().

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/scsi_pm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 74ded5f3c236..3717eea37ecb 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -94,8 +94,7 @@ static int scsi_dev_type_resume(struct device *dev,
 		if (!err && scsi_is_sdev_device(dev)) {
 			struct scsi_device *sdev = to_scsi_device(dev);
 
-			if (sdev->request_queue->dev)
-				blk_set_runtime_active(sdev->request_queue);
+			blk_set_runtime_active(sdev->request_queue);
 		}
 	}
 
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Stanley Chu <stanley.chu@mediatek.com>
To: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	martin.petersen@oracle.com, axboe@kernel.dk, jejb@linux.ibm.com,
	matthias.bgg@gmail.com
Cc: andy.teng@mediatek.com, chun-hung.wu@mediatek.com,
	kuohong.wang@mediatek.com, linux-mediatek@lists.infradead.org,
	peter.wang@mediatek.com, Stanley Chu <stanley.chu@mediatek.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] scsi: core: remove dummy q->dev check
Date: Thu, 12 Sep 2019 16:35:28 +0800	[thread overview]
Message-ID: <1568277328-4597-3-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1568277328-4597-1-git-send-email-stanley.chu@mediatek.com>

Currently blk_set_runtime_active() is checking if q->dev is null by
itself, thus remove the same checking in its user: scsi_dev_type_resume().

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/scsi_pm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 74ded5f3c236..3717eea37ecb 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -94,8 +94,7 @@ static int scsi_dev_type_resume(struct device *dev,
 		if (!err && scsi_is_sdev_device(dev)) {
 			struct scsi_device *sdev = to_scsi_device(dev);
 
-			if (sdev->request_queue->dev)
-				blk_set_runtime_active(sdev->request_queue);
+			blk_set_runtime_active(sdev->request_queue);
 		}
 	}
 
-- 
2.18.0

WARNING: multiple messages have this Message-ID (diff)
From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-scsi@vger.kernel.org>, <linux-block@vger.kernel.org>,
	<martin.petersen@oracle.com>, <axboe@kernel.dk>,
	<jejb@linux.ibm.com>, <matthias.bgg@gmail.com>
Cc: andy.teng@mediatek.com, chun-hung.wu@mediatek.com,
	kuohong.wang@mediatek.com, linux-mediatek@lists.infradead.org,
	peter.wang@mediatek.com, Stanley Chu <stanley.chu@mediatek.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] scsi: core: remove dummy q->dev check
Date: Thu, 12 Sep 2019 16:35:28 +0800	[thread overview]
Message-ID: <1568277328-4597-3-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1568277328-4597-1-git-send-email-stanley.chu@mediatek.com>

Currently blk_set_runtime_active() is checking if q->dev is null by
itself, thus remove the same checking in its user: scsi_dev_type_resume().

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/scsi_pm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 74ded5f3c236..3717eea37ecb 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -94,8 +94,7 @@ static int scsi_dev_type_resume(struct device *dev,
 		if (!err && scsi_is_sdev_device(dev)) {
 			struct scsi_device *sdev = to_scsi_device(dev);
 
-			if (sdev->request_queue->dev)
-				blk_set_runtime_active(sdev->request_queue);
+			blk_set_runtime_active(sdev->request_queue);
 		}
 	}
 
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-09-12  8:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  8:35 [PATCH v2] fixup null q->dev checking in both block and scsi layer Stanley Chu
2019-09-12  8:35 ` Stanley Chu
2019-09-12  8:35 ` Stanley Chu
2019-09-12  8:35 ` [PATCH v2 1/2] block: bypass blk_set_runtime_active for uninitialized q->dev Stanley Chu
2019-09-12  8:35   ` Stanley Chu
2019-09-12  8:35   ` Stanley Chu
2019-09-12  8:35 ` Stanley Chu [this message]
2019-09-12  8:35   ` [PATCH v2 2/2] scsi: core: remove dummy q->dev check Stanley Chu
2019-09-12  8:35   ` Stanley Chu
2019-09-12 13:12 ` [PATCH v2] fixup null q->dev checking in both block and scsi layer Jens Axboe
2019-09-12 13:12   ` Jens Axboe
2019-09-12 13:12   ` Jens Axboe

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=1568277328-4597-3-git-send-email-stanley.chu@mediatek.com \
    --to=stanley.chu@mediatek.com \
    --cc=andy.teng@mediatek.com \
    --cc=axboe@kernel.dk \
    --cc=chun-hung.wu@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=peter.wang@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.