Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3440698pxa; Tue, 25 Aug 2020 23:43:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVsBBcwZGC9i6T+o2JP/kT5rmYuqr7nzi2sb+UKqaJ/6vl2aHfciz9oJwE+OihV2DDPcYt X-Received: by 2002:a50:8e14:: with SMTP id 20mr14099073edw.331.1598424192945; Tue, 25 Aug 2020 23:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598424192; cv=none; d=google.com; s=arc-20160816; b=MiqsguUSWxEbxHm952iABV5nbrek26PLGiBU1EjYL662wvHPJZPTNc9SL9/mfyE293 hThYjYaXaKsJoFKcAa7uKmHQmFnTfJduA8dTkfqkub3BppV/7voVq8UHszYm5OesodBq auOlLbA/1hktOwRcQuvDl+IvLTZAtX9OYRBU59mWoTWzF0eg4ONDtbvq8f7vVXg7Kpes JRnz6GL9uJPWtVCN0DiJkAVCpjScgzerv/EevyUHXRNyVw5oBhq8Vjghsg97l0qfBlsi siV/aRwFhmTUJvZk1jbdN8dceWAy2GmTLH9tVGQ/0xOAYlbHiXlN5mC2mtIy7bpRy+0c zemg== 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=bB3iUuDyj+rBjLRpJKX1+Gi+r3rlWaLRaqbsxQSLjQE=; b=RasfW0H5uKAgXuOgIMVBeaeq3i0mJHmZS/KeD23SbMzE9mrgGmCM+5n5ajsyiBQk9b C5RM615lxYAoX+mBCPHD2tBayH6VXRHmHxWJG0oh1vhftl/14B9hVqg6tXOI25RquwL2 L3Av6ffDJHnC/6M4eALYZwcNIh3Jld/A67/fEasLi9b9Qw4o84gNMjq1YOTj1EydBQK5 n3fCDfc6L7eL0BcmHGgldTBJsq3h60ZrAc6ZcW9pFXztT8y1zlei+57moLh2JEXBKkuK vinLzWkxMshO4vLbmK2B5gPNejO4r+lmUq5wwN1SPvNqyOa0Jc7lvhCmsbIuML5aCzfp 3ClQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=lUCvp9xJ; 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 r7si795684edb.20.2020.08.25.23.42.50; Tue, 25 Aug 2020 23:43:12 -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=lUCvp9xJ; 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 S1726753AbgHZGmZ (ORCPT + 99 others); Wed, 26 Aug 2020 02:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbgHZGmV (ORCPT ); Wed, 26 Aug 2020 02:42:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21DE4C061756; Tue, 25 Aug 2020 23:42:20 -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=bB3iUuDyj+rBjLRpJKX1+Gi+r3rlWaLRaqbsxQSLjQE=; b=lUCvp9xJs2EXrw0ejcmACo2yTj dcwpiIzXw0+VFROYI5CakH9uAJcsKrOhmCkNbcvUwWZduFJgaO80F+nFMEaILsJBIlYoJOFySREDz ihS2aBTzfwNmPTTbWSI+EMvTjcygQKy8+e4iDG+7N1nfNRzBV1qx7MLR/M8BBVk0ZOQxJwEBtsaCh IwTWqmguS5CyvHT3YBrCjtly6QRU5TMtPOg6vnEay7rAjudR0FfTyFdxZAvm7P8qhDQK4MQESRr4m 8dqEzuzoVz0SPBLMHyGScmIlRh3l1GBEOxnDCCW5NKWnVqB9HH0Qr+zZW56ady2gJwYETQeX/jDaK w0N3FdZg==; Received: from 213-225-6-196.nat.highway.a1.net ([213.225.6.196] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAp8R-0002PU-2F; Wed, 26 Aug 2020 06:42:15 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Denis Efremov , "David S. Miller" , Song Liu , Al Viro , 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 Subject: [PATCH 07/19] ide: remove ide_{,un}register_region Date: Wed, 26 Aug 2020 08:24:34 +0200 Message-Id: <20200826062446.31860-8-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826062446.31860-1-hch@lst.de> References: <20200826062446.31860-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 --- 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