From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C354C5ACAE for ; Thu, 12 Sep 2019 08:35:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1CCF208C2 for ; Thu, 12 Sep 2019 08:35:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DIN8fNoz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1CCF208C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6151SL0m6MFj1ZLlddGdE/BLmFoayXNYWKLjTp+Whs4=; b=DIN8fNozteQQ4r iynse0xaZejJV/1SWCSyrW1/uMHm5bvVlNzleIwG/AkwKGqB7CVp1n5jPxOY5yJXRtgrTdoLWWLab 2W/HdD6TdS1cnppGVrhshKT3XOoLoHcEFIMuAbD9fr6Le+n+N381kZDmbMUJ7SYYBHDWRO6As58vx dUWOr+1hGyhGwuOya9FVZ2JYHgdr4BGBgriYxY761rRetF2Nlsk+8ghsPfkcAeMrWILTab5A7RBdi 5LBZ7nSV5T+ozwaa+XZ2aXqwZyPU5bNwP74ywnIIQyLUkmJfWl7oqMLfi/zh5U0+Varj7Kz+8H6a8 /Lr4lt5zSnihbHIyXIfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8KZm-0001nZ-0K; Thu, 12 Sep 2019 08:35:38 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8KZi-0001ko-Gg; Thu, 12 Sep 2019 08:35:35 +0000 X-UUID: 953a155539544b96b93b69d940f77909-20190912 X-UUID: 953a155539544b96b93b69d940f77909-20190912 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 360203211; Thu, 12 Sep 2019 00:35:30 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Sep 2019 01:35:29 -0700 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Sep 2019 16:35:28 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Sep 2019 16:35:28 +0800 From: Stanley Chu To: , , , , , Subject: [PATCH v2] fixup null q->dev checking in both block and scsi layer Date: Thu, 12 Sep 2019 16:35:26 +0800 Message-ID: <1568277328-4597-1-git-send-email-stanley.chu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190912_013534_560801_44D5EED0 X-CRM114-Status: UNSURE ( 5.24 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel