Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp358967pxk; Thu, 3 Sep 2020 01:17:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+pQE6HLYLxql8db6a4XbnossHPblXqLmpuPzipeRv1aZ9PLMorzUMhIdlQPJpqyAG6jJC X-Received: by 2002:a50:d4ce:: with SMTP id e14mr1937409edj.126.1599121043483; Thu, 03 Sep 2020 01:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599121043; cv=none; d=google.com; s=arc-20160816; b=ztD7DPB19GHxA6+eZpTui9CbR9FtgYTD9O98mldFN2d0ppqBVdkdg9t3wlkOntMI4k OFL8ilscYps/s2Qh82gBz7HtvdH+VWH2hOGpMeOSjPsLyfGzd9xufk1LRqK+jXwU7nLP jgV5zk+9Z9qGYW9A60/v3UH2UxAu9Nf6+SuA9qE/D005US6FeMDHJan3v8xpphbT048S jMZyDfi037ipwH6yJGGViaaAie6lh43BhkKsGyQ8Wm5ENoO0Pt9RgG8kS5A30hZpsiZC H15yG89PtTVPMZHkdMmb/WFNqGJ6Wcl7ZdveAQGaNUlx85K0bZFq+N7SJHqMr2jQm6xQ 5t/Q== 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=M0Dn+2UUv01J5F3y1OP5d190GyV7YwZGCEdvIt2XjSwMKCg/tIdibXlPgZkfF8KVDB MafNUmb2dxSAhNNBKL6Vt6NsYteYYhvPJzfi8NflXBzVivfDbJycoiSm/nshyzZ2klAH 63t+FmRri9irVqr2OlMKZApNV9SQV4PLhvbEZ490KNWTQ2cp2rvTTHsdDDolp/fUOEO6 IhmOVTvxXETwtn44mY6orWRcmh2/vhR0RexaIRHid1+MF61UUszS2CQyOb+3AG9ide6l VhFGpleZpxrUszSMkXYUn02cobQTQGBAbC6MP0+tAsgy56PNsc+MzlsjiZAZXV40vY7v m8xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="tjsiLJ/4"; 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 v5si1223442edr.49.2020.09.03.01.17.00; Thu, 03 Sep 2020 01:17:23 -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="tjsiLJ/4"; 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 S1728288AbgICIOt (ORCPT + 99 others); Thu, 3 Sep 2020 04:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728266AbgICIBj (ORCPT ); Thu, 3 Sep 2020 04:01:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6382C061244; 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=B9nqgl0BizoCFTSZ0GvnyJ44eULa8ACIMrdc+XZNiS8=; b=tjsiLJ/42vQ0JOAtgixQhgUqn0 WtrjjJky4JCaffqwjO709FpZCONklHjF0B0FQUZ3wtEJiU2vJAL/idMw0XK0vCf73t4ahJmpb7wUx Sb0F9THKCJGaCp5OarG0d3ygdhmIwMEoVe8gnwkfbfwYKfOufvgV5iump5I0ZtQso4MYArl0Z2u5V fqfwCdfDr5laybHPSMVhBctMcd2u0JdmQ9P9jY5Wk42cxnBp3q3EgN1mqqtIuFCb16uVtiDbeXNDG vYK8hc8U9xtUq5DmPkQcwkTULvCjNb8AzE63FE2aV7T+30HYMxHudXedDa3fHO+N3C9ZnYdgGRjQz uEXOODtw==; 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 1kDkBY-0006bU-9M; Thu, 03 Sep 2020 08:01:32 +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 Subject: [PATCH 08/19] swim: don't call blk_register_region Date: Thu, 3 Sep 2020 10:01:08 +0200 Message-Id: <20200903080119.441674-9-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 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