linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fixup null q->dev checking in both block and scsi layer
@ 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stanley Chu @ 2019-09-12  8:35 UTC (permalink / raw)
  To: linux-scsi, linux-block, martin.petersen, axboe, jejb, matthias.bgg
  Cc: linux-mediatek, linux-arm-kernel, kuohong.wang, peter.wang,
	chun-hung.wu, andy.teng, Stanley Chu

Some devices may skip blk_pm_runtime_init() and have null pointer in its request_queue->dev. For example, SCSI devices of UFS Well-Known LUNs.

Currently the null pointer is checked by the user of blk_set_runtime_active(), i.e., scsi_dev_type_resume(). It is better to check it by blk_set_runtime_active() itself instead of by its users.

v1 => v2:
- Change if style in blk_set_runtime_active() (Jens)

Stanley Chu (2):
  block: bypass blk_set_runtime_active for uninitialized q->dev
  scsi: core: remove dummy q->dev check

 block/blk-pm.c         | 12 +++++++-----
 drivers/scsi/scsi_pm.c |  3 +--
 2 files changed, 8 insertions(+), 7 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-12 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 1/2] block: bypass blk_set_runtime_active for uninitialized q->dev Stanley Chu
2019-09-12  8:35 ` [PATCH v2 2/2] scsi: core: remove dummy q->dev check Stanley Chu
2019-09-12 13:12 ` [PATCH v2] fixup null q->dev checking in both block and scsi layer Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).