Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp189334pxf; Wed, 10 Mar 2021 04:06:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzg+NRiTAlLK5eOyRctFgjZcDC2L0papjrpfi2IkEolugZp0hr0K1TQxOWQAlTZpfIUmAha X-Received: by 2002:a17:907:76b6:: with SMTP id jw22mr3269054ejc.11.1615377985429; Wed, 10 Mar 2021 04:06:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615377985; cv=none; d=google.com; s=arc-20160816; b=tivLzyeNs3VQqNi60WWrUpi/sJqiQJq3UAQMDlRR5ppmObsA5Mr9nuhDV9xToGrvmV ao3v1+LtbMw5p8j+8GyYjLZVgNvYQGnJIyy2Hr3UEXARKoHjveI0C/EhkBq6/NwY4ceL Yu+hAeC2wxyLJMTz+FP1yR/SFC4lF1ZykLLZhuSceQAn+PWewhRz+tYKnbjgQypCFzsR uvEjeA3ByD+wD9MjELuTnKd9q3dbWTRFab8++NsF8nTY4C55mv4dSOuYcBlT2cz7trXi i/nww1c4VCk5qFhCiPisuzM3xjlhLPI9rVcf+8YTDd+nUcLMa1fRZXnw2qg0/8L/7hri 558Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=+5kcsWK/WVbqQgObKTp7w7pv+UBY4CFL1Yl9doKC1BA=; b=Gxyud8MtDJEmgZB1IOC/ZA16QCg/LD+pld07/JIEhCfriGWNMBRbNrvu9kHgBb0EIz jn3xjQFF1S1t3s3TWJ+QibnS/ugwbQqGzGg1bck3ksskgJTtBnBwfdg5m2kXISMxHr3D IkkUq21YyYfCb8a4topBLhBO91bR15GZhKE1/KyiqQ0kZJOHWSte6+dupDmOi+DoJyHW m0R8lhI82GL/G5lu7G7h3idmgiG2au3/2S0wdKE+hgR0uniOUJG/ompjyOWj+GrTvU3+ Jp89533x5LPYI6ugsxif6OkRgMmc9W3gbEO7BUNIsaSRfk+LTCZaFZ7xDhPo5E37Ajir +YHg== ARC-Authentication-Results: i=1; mx.google.com; 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 qo14si11191525ejb.675.2021.03.10.04.05.57; Wed, 10 Mar 2021 04:06:25 -0800 (PST) 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; 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 S232907AbhCJMDx (ORCPT + 99 others); Wed, 10 Mar 2021 07:03:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232880AbhCJMDZ (ORCPT ); Wed, 10 Mar 2021 07:03:25 -0500 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DFD5AC061760; Wed, 10 Mar 2021 04:03:24 -0800 (PST) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 44C769200B3; Wed, 10 Mar 2021 13:03:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 3EBF992009E; Wed, 10 Mar 2021 13:03:24 +0100 (CET) Date: Wed, 10 Mar 2021 13:03:24 +0100 (CET) From: "Maciej W. Rozycki" To: netdev@vger.kernel.org cc: linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/4] FDDI: defxx: Use driver's name with resource requests In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace repeated "defxx" strings with a reference to the DRV_NAME macro and then use the driver's name rather that the bus address with resource requests so as to have contents of /proc/iomem and /proc/ioports more meaningful to the user, in line with what drivers usually do. So rather than say: 5000-50ff : DEC FDDIcontroller/EISA Adapter 5000-503f : 00:05 5040-5043 : 00:05 5400-54ff : DEC FDDIcontroller/EISA Adapter 5800-58ff : DEC FDDIcontroller/EISA Adapter 5c00-5cff : DEC FDDIcontroller/EISA Adapter 5c80-5cbf : 00:05 or: 620c080020000-620c08002007f : 0031:02:04.0 620c080020000-620c08002007f : 0031:02:04.0 620c080030000-620c08003ffff : 0031:02:04.0 or: 1f100000-1f10003f : tc2 we report: 5000-50ff : DEC FDDIcontroller/EISA Adapter 5000-503f : defxx 5040-5043 : defxx 5400-54ff : DEC FDDIcontroller/EISA Adapter 5800-58ff : DEC FDDIcontroller/EISA Adapter 5c00-5cff : DEC FDDIcontroller/EISA Adapter 5c80-5cbf : defxx and: 620c080020000-620c08002007f : 0031:02:04.0 620c080020000-620c08002007f : defxx 620c080030000-620c08003ffff : 0031:02:04.0 and: 1f100000-1f10003f : defxx respectively for the DEFEA (EISA), DEFPA (PCI), and DEFTA (TURBOchannel) adapters. Signed-off-by: Maciej W. Rozycki --- drivers/net/fddi/defxx.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) Index: linux-defxx/drivers/net/fddi/defxx.c =================================================================== --- linux-defxx.orig/drivers/net/fddi/defxx.c +++ linux-defxx/drivers/net/fddi/defxx.c @@ -580,14 +580,15 @@ static int dfx_register(struct device *b if (dfx_use_mmio) { region = request_mem_region(bar_start[0], bar_len[0], - print_name); + bdev->driver->name); if (!region && (dfx_bus_eisa || dfx_bus_pci)) { bp->mmio = false; dfx_get_bars(bp, bar_start, bar_len); } } if (!dfx_use_mmio) - region = request_region(bar_start[0], bar_len[0], print_name); + region = request_region(bar_start[0], bar_len[0], + bdev->driver->name); if (!region) { dfx_register_res_err(print_name, dfx_use_mmio, bar_start[0], bar_len[0]); @@ -595,7 +596,8 @@ static int dfx_register(struct device *b goto err_out_disable; } if (bar_start[1] != 0) { - region = request_region(bar_start[1], bar_len[1], print_name); + region = request_region(bar_start[1], bar_len[1], + bdev->driver->name); if (!region) { dfx_register_res_err(print_name, 0, bar_start[1], bar_len[1]); @@ -604,7 +606,8 @@ static int dfx_register(struct device *b } } if (bar_start[2] != 0) { - region = request_region(bar_start[2], bar_len[2], print_name); + region = request_region(bar_start[2], bar_len[2], + bdev->driver->name); if (!region) { dfx_register_res_err(print_name, 0, bar_start[2], bar_len[2]); @@ -3745,7 +3748,7 @@ static const struct pci_device_id dfx_pc MODULE_DEVICE_TABLE(pci, dfx_pci_table); static struct pci_driver dfx_pci_driver = { - .name = "defxx", + .name = DRV_NAME, .id_table = dfx_pci_table, .probe = dfx_pci_register, .remove = dfx_pci_unregister, @@ -3776,7 +3779,7 @@ MODULE_DEVICE_TABLE(eisa, dfx_eisa_table static struct eisa_driver dfx_eisa_driver = { .id_table = dfx_eisa_table, .driver = { - .name = "defxx", + .name = DRV_NAME, .bus = &eisa_bus_type, .probe = dfx_dev_register, .remove = dfx_dev_unregister, @@ -3797,7 +3800,7 @@ MODULE_DEVICE_TABLE(tc, dfx_tc_table); static struct tc_driver dfx_tc_driver = { .id_table = dfx_tc_table, .driver = { - .name = "defxx", + .name = DRV_NAME, .bus = &tc_bus_type, .probe = dfx_dev_register, .remove = dfx_dev_unregister,