From patchwork Mon Nov 15 13:51:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 12692582 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9C3C433EF for ; Mon, 15 Nov 2021 13:42:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2A2761B27 for ; Mon, 15 Nov 2021 13:42:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D2A2761B27 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WpcZfVQPzuku2RQ37EY1b0PF0JxRhwjWaM+ypRaA4Dk=; b=DzJ0qi2WjWfo+t KJudPb6JSZ4aHe7ZSLJD1tb/7FbN69eL/9+WX0KTOC7E5ecF016TRvjOpwgUduVXwQCzPqu6SYDo5 TcLv1RsRWm8sBSNjZMfwkDHfBP1xrnnW1kGjiSwr5YPKSPWJGPASx3IXnCBriehn91RSYrrBnd/eE KT9+cZVO+n/13vwdwg4nApAq/njSQPiItlRiVUq/FDYND2oSziG6ZwT32o3hu8XnpZgu/Vd+t1Fk4 55CFZ9hwBCaiM1MHGdn7xk29pi1LwcckRtSELfDaaIHsbZDw5eSRWJzsXD+T8w33BgoL0/KABeM9k NaZsZnzzOAGgjDmNaqjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmcEB-00Fhh0-MF; Mon, 15 Nov 2021 13:40:55 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmcDh-00Fhag-BB for linux-arm-kernel@lists.infradead.org; Mon, 15 Nov 2021 13:40:27 +0000 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ht9HZ5L3HzZd42; Mon, 15 Nov 2021 21:38:02 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 15 Nov 2021 21:40:23 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 15 Nov 2021 21:40:23 +0800 From: Kefeng Wang To: , , CC: , , Kefeng Wang , Rob Herring Subject: [PATCH Resend 1/2] amba: Kill sysfs attribute file of irq Date: Mon, 15 Nov 2021 21:51:47 +0800 Message-ID: <20211115135148.171786-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211115135148.171786-1-wangkefeng.wang@huawei.com> References: <20211115135148.171786-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211115_054025_599523_435325DF X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As Rob said[1], there doesn't seem to be any users about the sysfs attribute file of irq[0] and irq[1]. And we don't need to include as NO_IRQ has gone. Let's kill both of them. [1] https://lkml.org/lkml/2021/8/25/461 Acked-by: Rob Herring Signed-off-by: Kefeng Wang --- drivers/amba/bus.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 720aa6cdd402..16d3c009505b 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -21,8 +21,6 @@ #include #include -#include - #define to_amba_driver(d) container_of(d, struct amba_driver, drv) /* called on periphid match and class 0x9 coresight device. */ @@ -136,8 +134,6 @@ static ssize_t name##_show(struct device *_dev, \ static DEVICE_ATTR_RO(name) amba_attr_func(id, "%08x\n", dev->periphid); -amba_attr_func(irq0, "%u\n", dev->irq[0]); -amba_attr_func(irq1, "%u\n", dev->irq[1]); amba_attr_func(resource, "\t%016llx\t%016llx\t%016lx\n", (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, dev->res.flags); @@ -488,20 +484,9 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent) skip_probe: ret = device_add(&dev->dev); - if (ret) - goto err_release; - - if (dev->irq[0]) - ret = device_create_file(&dev->dev, &dev_attr_irq0); - if (ret == 0 && dev->irq[1]) - ret = device_create_file(&dev->dev, &dev_attr_irq1); - if (ret == 0) - return ret; - - device_unregister(&dev->dev); - err_release: - release_resource(&dev->res); + if (ret) + release_resource(&dev->res); err_out: return ret;