Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp358623pxk; Thu, 3 Sep 2020 01:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGhBcbkzaZZxpF/Ip37zrFHbfPgN1pn5JKNJtq6h8L4YjEhvGPue2XG7TP/otaz+k3MNcv X-Received: by 2002:a05:6402:176e:: with SMTP id da14mr1851048edb.349.1599120994422; Thu, 03 Sep 2020 01:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599120994; cv=none; d=google.com; s=arc-20160816; b=LZQ+mg6LFgIvsraAZWSVNH3s9fdSWL2A7BsRb3WXxLEY9ZopxIkRUIOpiguqGtHj6G 73gt/ZMRZNrrwBtkkH+/80q43uKedVLyJFK752Q6HvEKzofmQHuDlohmitfir48Qpn2f uLlhmlXxL1Z09/J0AQeShaUq2wHbVQ0N0E+Bbc1Ks9U4rq6ln13K7TPSC80TID5yt9Aw Ud4SR4GKdWRA7JSXBYDvfPevxzLmqX5Hl6KAroJbCGiIMfzgRGGxwWvd3sG6UWkhLhlC 7CKaBZ2cq//JTLlUrJB4atF3+tUM65cCpXs2jQI1aR7GXqqfXb8194ri9T9wV5Bn0Qcz QLxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O5kxaoNfuWYD/r3zIuYk6jhw3GIKgkKxiecYTnoQ+yQ=; b=RZsfgtCgFZRRkO5ix9wNslT9Uxw6yCr9bMNO3iv7cQeon7Bp2bU1rdlz11ilgQ4q1A Y20e7etxAKtDYLCOPendkVxkQF+gH9/AVnQHObA76Ke/LAAf6qN2iXbc9n9rzPqvejQ0 HWd6HFuDeqqnu9tVzD/HuReFbfwQY+MVy1cho0oT6ctlZ0VzVMQ4du5yp+VK74sDDgc1 vK10vYRmW2Fr0wvNUK/RX4tYPuLfBA204iGGWrPkEQt65R/437b++7OgPvB+JhEsuVQh CU6QwGHeTGlHZWdpcV22VCCALQbLuP5veW0lpkkNlYUhEubnudMdzLMtf7IT8j85Dlfx GpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Z3zq4Zdm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox7si1401050ejb.336.2020.09.03.01.16.10; Thu, 03 Sep 2020 01:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Z3zq4Zdm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbgICIPa (ORCPT + 99 others); Thu, 3 Sep 2020 04:15:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728073AbgICIBi (ORCPT ); Thu, 3 Sep 2020 04:01:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0302DC061244; Thu, 3 Sep 2020 01:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=O5kxaoNfuWYD/r3zIuYk6jhw3GIKgkKxiecYTnoQ+yQ=; b=Z3zq4ZdmxKan/1dFcAY0JXiu+R ACjLeO1G+TtdQ4L3y7SZeSrNKiCY9VjSm91OeuWNL5H4MKRQHVyQiolMSm3F+PMjHN1YlA3xgM0JV yVSXecevS42IeGuU7GY0eq94F9JLawFGTlRLmQMRUaiTgcGkBC6ZRMzXSmiH/nzYorBN04nfP1pcF nK18kjrn+MgempCgu58FZWcVE7evxQy2WPUuOFqwN9YRhK6rYIIiD8yZNVBL/6eytVG17s2DUIL4h Y43fw4GxrYxMgXKY/B6b3SGRzz5nk8+uwwFz0kpLmEhZ+VNnQkD7IoSlhB3rr6UFnIqFcqFMgxzQF wfb3zcmQ==; Received: from [2001:4bb8:184:af1:c70:4a89:bc61:2] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDkBW-0006bF-Vm; Thu, 03 Sep 2020 08:01:31 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Denis Efremov , "David S. Miller" , Song Liu , Al Viro , Finn Thain , Michael Schmitz , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Hannes Reinecke Subject: [PATCH 07/19] ide: remove ide_{,un}register_region Date: Thu, 3 Sep 2020 10:01:07 +0200 Message-Id: <20200903080119.441674-8-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200903080119.441674-1-hch@lst.de> References: <20200903080119.441674-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to ever register the fake gendisk used for ide-tape. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/ide/ide-probe.c | 32 -------------------------------- drivers/ide/ide-tape.c | 2 -- include/linux/ide.h | 3 --- 3 files changed, 37 deletions(-) diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 1ddc45a04418cd..076d34b381720f 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -929,38 +929,6 @@ static struct kobject *ata_probe(dev_t dev, int *part, void *data) return NULL; } -static struct kobject *exact_match(dev_t dev, int *part, void *data) -{ - struct gendisk *p = data; - *part &= (1 << PARTN_BITS) - 1; - return &disk_to_dev(p)->kobj; -} - -static int exact_lock(dev_t dev, void *data) -{ - struct gendisk *p = data; - - if (!get_disk_and_module(p)) - return -1; - return 0; -} - -void ide_register_region(struct gendisk *disk) -{ - blk_register_region(MKDEV(disk->major, disk->first_minor), - disk->minors, NULL, exact_match, exact_lock, disk); -} - -EXPORT_SYMBOL_GPL(ide_register_region); - -void ide_unregister_region(struct gendisk *disk) -{ - blk_unregister_region(MKDEV(disk->major, disk->first_minor), - disk->minors); -} - -EXPORT_SYMBOL_GPL(ide_unregister_region); - void ide_init_disk(struct gendisk *disk, ide_drive_t *drive) { ide_hwif_t *hwif = drive->hwif; diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 6f26634b22bbec..88b96437b22e62 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -1822,7 +1822,6 @@ static void ide_tape_remove(ide_drive_t *drive) ide_proc_unregister_driver(drive, tape->driver); device_del(&tape->dev); - ide_unregister_region(tape->disk); mutex_lock(&idetape_ref_mutex); put_device(&tape->dev); @@ -2026,7 +2025,6 @@ static int ide_tape_probe(ide_drive_t *drive) "n%s", tape->name); g->fops = &idetape_block_ops; - ide_register_region(g); return 0; diff --git a/include/linux/ide.h b/include/linux/ide.h index a254841bd3156d..cfa9e4b0c325a4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1495,9 +1495,6 @@ static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} #endif -void ide_register_region(struct gendisk *); -void ide_unregister_region(struct gendisk *); - void ide_check_nien_quirk_list(ide_drive_t *); void ide_undecoded_slave(ide_drive_t *); -- 2.28.0