From patchwork Fri Mar 4 18:00:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12769716 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7844FC433F5 for ; Fri, 4 Mar 2022 18:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241451AbiCDSCM (ORCPT ); Fri, 4 Mar 2022 13:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241441AbiCDSCH (ORCPT ); Fri, 4 Mar 2022 13:02:07 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69A6C1B989D; Fri, 4 Mar 2022 10:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Cqmk4RGtSaszMnquxc/oyP4l8w/hS4OYdIlhjeA7b+I=; b=U1Rgy9ymsIhudcOwIcRsW6TPER B5aghzwGY4dOoBAG/YwLNPSvd1UX0rCrr0WBkiHyO7In/L5oPLREx9/F71/TXI1ykQ336o6YIQw3w xqfzAIeNd8FW8Wa0I4PUk+SC8DxILJuUVIROwi0vGFxqR2AqqTIK8P/bvBur0VOVMivaxQ2gJtaY9 P+6dLlEIIchOWLolT0/jtRd6YoJf5wKW4xyOa8vZ2qge3gZOvh1H8W8Ewj0ZULAgukcd4idHfhGnj 3R0kGO28E6P+uTeSyKpIDnXDWqQMP/sEB+CpOco6tyimwoK13WeR5lbHBiOFDsNay7h8QAyV27hcU TUB/FbWw==; Received: from [2001:4bb8:180:5296:cded:8d4b:ace6:f3c] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCEt-00BUlR-8F; Fri, 04 Mar 2022 18:01:15 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Song Liu , "Theodore Ts'o" , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 03/10] pktcdvd: remove a pointless debug check in pkt_submit_bio Date: Fri, 4 Mar 2022 19:00:58 +0100 Message-Id: <20220304180105.409765-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220304180105.409765-1-hch@lst.de> References: <20220304180105.409765-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org ->queuedata is set up in pkt_init_queue, so it can't be NULL here. Signed-off-by: Christoph Hellwig --- drivers/block/pktcdvd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 623df4141ff3f..a52bbedd2f33d 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2400,18 +2400,11 @@ static void pkt_make_request_write(struct request_queue *q, struct bio *bio) static void pkt_submit_bio(struct bio *bio) { - struct pktcdvd_device *pd; - char b[BDEVNAME_SIZE]; + struct pktcdvd_device *pd = bio->bi_bdev->bd_disk->queue->queuedata; struct bio *split; blk_queue_split(&bio); - pd = bio->bi_bdev->bd_disk->queue->queuedata; - if (!pd) { - pr_err("%s incorrect request queue\n", bio_devname(bio, b)); - goto end_io; - } - pkt_dbg(2, pd, "start = %6llx stop = %6llx\n", (unsigned long long)bio->bi_iter.bi_sector, (unsigned long long)bio_end_sector(bio));