Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3441505pxa; Tue, 25 Aug 2020 23:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw61zi+oLfggjWz0x3zBDPLXzGMZJHyFYXc63J/1lLFmzdavbUk/JElQAF+dEGFQRWDMFfK X-Received: by 2002:a17:906:ef8c:: with SMTP id ze12mr15443938ejb.500.1598424328822; Tue, 25 Aug 2020 23:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598424328; cv=none; d=google.com; s=arc-20160816; b=UC4qexnp6UNvHoapvMpcMxpAjn2i1ueZoA9CEzoUrq3d2ZG3CcZCaGKtPp76z9ILT+ +FzJJplZCUCmNTWAD5gr4F3Ph+w/mD6rwGYLpqbZ8yUiSBYWMbwtiJjyl4iJsCFvcJfW WtZbqUtKZ76ANlagJOmAZbpe75P3XjLWtX2IGgNLOUJ3GVtu3rsRwm9ZgoeUIt3XuKAt sM+PUqY7xBqBqQMYVRLYt4AnAwq1XUPWiNfzanEX9nwCozo9s7EIFJlmaqpI+kpguFI3 tlTH+e7/y+yt1QJRYTYL8z4wCwR2RcEKHEH+adSouZxp0k17y2bT7YKi+rVgzsncuvzA XelQ== 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=B9nqgl0BizoCFTSZ0GvnyJ44eULa8ACIMrdc+XZNiS8=; b=EHnV/K1elBxsOZL601V+jkHTFp9TNndyvpNe2thjJ2cDeSWzq8ITSjn2YB7jaxKizU CbJjdcFSJiGWgRK7WFlJZZSykBsj+sBK56QVUPxuoeFGM5yYhpwMn433EZK9N+QoAoPa yqYihXVs/uLSq4EYjSoTADVXrBGylXrMlBS9lXLe0vvHXJSnQVKMWFm6RrtVXJCHT3hy IVcKNnPYYwaPsFuixlje37uhsHMmJ4S67J/GVJytERDipMDKq2+z7YjD0QE5WvgX/3EE UQ5BGtRA2G6BnkbXFE/0vr65Q56vmy3RnNpmZ5/mFtJctU3CJfglNBIgFQBqQAq3YnYQ /TLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="ojM/u5Pe"; 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 p19si1071660ejf.159.2020.08.25.23.45.05; Tue, 25 Aug 2020 23:45:28 -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="ojM/u5Pe"; 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 S1726740AbgHZGoc (ORCPT + 99 others); Wed, 26 Aug 2020 02:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbgHZGob (ORCPT ); Wed, 26 Aug 2020 02:44:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7C3C061574; Tue, 25 Aug 2020 23:44:31 -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=B9nqgl0BizoCFTSZ0GvnyJ44eULa8ACIMrdc+XZNiS8=; b=ojM/u5Pe1Md6oAeSatMwQZeSSu O1VohvmotCAyOlhxU1W+snXAhyDEYV1Yg/AjQKFerWaSFMwbr/GlJQ3qKZPW2UqFXP2iN68N4Q38P PfaMwFvYyHj2rG+QLLZqJaJdP99+IwjsUsIF4p7pkA/Vcv+iLGYLxOkp/zOmGWt7bjyh8zWQYfFji KQGOph1s0dc6zOYzQE7uCSJJ+EUBpBZStShjCkWtQA77QA7mmsbNusddScKh6GDi0KOI1KNSzKfyX 2wd2xerGbynZmTvVAGyY1jzkWPtTvDm7H7iOnrBrOzsXU+GTKYHVzpJgbSdwdS2R5D7BXKVOuj2/k 9XH/Qojg==; 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 1kApAY-0002VN-4H; Wed, 26 Aug 2020 06:44:26 +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 08/19] swim: don't call blk_register_region Date: Wed, 26 Aug 2020 08:24:35 +0200 Message-Id: <20200826062446.31860-9-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 The swim driver (unlike various other floppy drivers) doesn't have magic device nodes for certain modes, and already registers a gendisk for each of the floppies supported by a device. Thus the region registered is a no-op and can be removed. Signed-off-by: Christoph Hellwig --- drivers/block/swim.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/block/swim.c b/drivers/block/swim.c index dd34504382e533..5a8f5932f9bde4 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -763,18 +763,6 @@ static const struct block_device_operations floppy_fops = { .revalidate_disk = floppy_revalidate, }; -static struct kobject *floppy_find(dev_t dev, int *part, void *data) -{ - struct swim_priv *swd = data; - int drive = (*part & 3); - - if (drive >= swd->floppy_count) - return NULL; - - *part = 0; - return get_disk_and_module(swd->unit[drive].disk); -} - static int swim_add_floppy(struct swim_priv *swd, enum drive_location location) { struct floppy_state *fs = &swd->unit[swd->floppy_count]; @@ -864,9 +852,6 @@ static int swim_floppy_init(struct swim_priv *swd) add_disk(swd->unit[drive].disk); } - blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE, - floppy_find, NULL, swd); - return 0; exit_put_disks: @@ -950,8 +935,6 @@ static int swim_remove(struct platform_device *dev) int drive; struct resource *res; - blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); - for (drive = 0; drive < swd->floppy_count; drive++) { del_gendisk(swd->unit[drive].disk); blk_cleanup_queue(swd->unit[drive].disk->queue); -- 2.28.0