From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91260C432BE for ; Tue, 31 Aug 2021 20:49:16 +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 461A860ED4 for ; Tue, 31 Aug 2021 20:49:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 461A860ED4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=glQTPniBaHT3A/avc2Ra56ROlFcIefocQV9to+ym6CQ=; b=PkydR+sm4Uwxsk D5Xxh3ZdVlYjrWQ3+LVp3/srtDld2DKBM9R6kJTk7IMiEw0ZhI0Gmo02qCew61+kUr/I70BUqWZof V7FbBk/N7hs2TJCAKpbYrIOHGqdd1B2vp172LdTVY2q1bYd1Xq9ALtNOlNfx/yuhUtSDU2e1uScLY 1cB0bv02h3viDJsecpEL1x9CLlFGsLxz7Eak5Sv7dwDUn51/ayPMxnwOtlvRPik5TuCixz4OAFu6P LNhrBSS/zUuGixF0tDdthsiVtwqdw6PQAspnN9N9FQxK4M36LkSVDOjXH1wenb2Me/wVst9CWvZjx mjV5E3fMvKTxyFVDJYFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLAcK-0038b6-Gt; Tue, 31 Aug 2021 20:44:24 +0000 Received: from mail-oo1-f53.google.com ([209.85.161.53]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLAcE-0038aQ-FS for linux-arm-kernel@lists.infradead.org; Tue, 31 Aug 2021 20:44:22 +0000 Received: by mail-oo1-f53.google.com with SMTP id y16-20020a4ad6500000b0290258a7ff4058so142011oos.10 for ; Tue, 31 Aug 2021 13:44:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KoxDg3lbpSnQr151KkbKM1S89BPuY4KcLMeYH+F7S4g=; b=UAtGSMvGOvF258C1qowcyV3i1HxdPVLJa2J1FuiL5mXYOM4y/n+1RIvRwzuHHiNtD9 dQOdxcBVYgtxx+AUpD3DDJCiOJzgZV0y3BZeBin6W/C4nvPSZXBC0RNdRGaV+4PToIyt Bl5PH5CtTCK+rjYOUclbEkVlHtuCiyxlJ82qh/KUDsEtgDY6oRlul3n3N4Ywn/hEKT60 KThmj8ypwKuoT++LbPiyKZks9MAxbngtvawVZbro5tl5LTrFxDl9cyxHzn3WnEZ8PnSY ATQYsuWwIXTjDOIYiOI9VqSyR97PPVz7Gco6Sw5kxJvACQZ1/gESRJi7HoSqNm+8hkzq ia1g== X-Gm-Message-State: AOAM530rHViFLjCoDFyJDCOeyZYpajdjgnu4R24Dl/TieXDwJxdtsiiD 9lRHCysx6khDLVDYE5h+hw== X-Google-Smtp-Source: ABdhPJyCwqoJD64/OVZ9UksTIfmo8qABQUUobE6qLsVAuKciKCKfZStkt7bUri6+JebZlVMM/kVxwQ== X-Received: by 2002:a4a:3e58:: with SMTP id t85mr15965286oot.81.1630442657489; Tue, 31 Aug 2021 13:44:17 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id g10sm3877928oof.37.2021.08.31.13.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 13:44:16 -0700 (PDT) Received: (nullmailer pid 617941 invoked by uid 1000); Tue, 31 Aug 2021 20:44:15 -0000 Date: Tue, 31 Aug 2021 15:44:15 -0500 From: Rob Herring To: Kefeng Wang Cc: linux-kernel@vger.kernel.org, frowand.list@gmail.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, saravanak@google.com, linus.walleij@linaro.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 3/4] amba: Kill sysfs attribute file of irq Message-ID: References: <20210827150600.78811-1-wangkefeng.wang@huawei.com> <20210827150600.78811-4-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210827150600.78811-4-wangkefeng.wang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210831_134418_565252_9D73F493 X-CRM114-Status: GOOD ( 19.72 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 27, 2021 at 11:05:59PM +0800, Kefeng Wang wrote: > 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 > > Signed-off-by: Kefeng Wang > --- > drivers/amba/bus.c | 18 ++---------------- > 1 file changed, 2 insertions(+), 16 deletions(-) Acked-by: Rob Herring > diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c > index 37fcd5592c6f..4d3a565ca079 100644 > --- a/drivers/amba/bus.c > +++ b/drivers/amba/bus.c > @@ -20,8 +20,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. */ > @@ -135,8 +133,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", Might want to get rid of this too. It's available thru other means (DT). That can be another patch. > (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, > dev->res.flags); > @@ -463,20 +459,10 @@ 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; > > -- > 2.18.0.huawei.25 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B19EDC432BE for ; Tue, 31 Aug 2021 20:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9376161053 for ; Tue, 31 Aug 2021 20:44:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232398AbhHaUpQ (ORCPT ); Tue, 31 Aug 2021 16:45:16 -0400 Received: from mail-oo1-f51.google.com ([209.85.161.51]:34597 "EHLO mail-oo1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241086AbhHaUpN (ORCPT ); Tue, 31 Aug 2021 16:45:13 -0400 Received: by mail-oo1-f51.google.com with SMTP id g4-20020a4ab044000000b002900bf3b03fso160049oon.1; Tue, 31 Aug 2021 13:44:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KoxDg3lbpSnQr151KkbKM1S89BPuY4KcLMeYH+F7S4g=; b=DmObCyvMEFhQPKH0AO7cykKic7aOgyCy4oPuaDpJWhUjm9w0QiRnucTW4ndpvH87Dz vJhFlTJUzGqOGJUxdKGSV54GhxeE0oL1ypVuVHNarhxmwqSPevXkchIkM8fhtAWlJvwA yiZ7d61zvqlx9pzDogbD6My5xM9eTUpQTcLlZC57iBnn89J48xHu1EwGeE2JGRgQZL+7 d0WGjyab/n37IbjPLjpyv0v6DcTaOwUca8oIGqXBnH2iVmUM3/OJtq3ZBju3nN089mi2 DTR70/yKK8CbochMH/EAsX6RGj/qcEoxzMWtFyeTUaO1rz13xtvFg5nubngX50fs7EdL pgZw== X-Gm-Message-State: AOAM530v9RHOQ7HmApBJU2DAIIbSvtOyxUz5HuZQphUgoe4NbBG2VYuI 1Tww1PqDO9aA6SJKon0CWQ== X-Google-Smtp-Source: ABdhPJyCwqoJD64/OVZ9UksTIfmo8qABQUUobE6qLsVAuKciKCKfZStkt7bUri6+JebZlVMM/kVxwQ== X-Received: by 2002:a4a:3e58:: with SMTP id t85mr15965286oot.81.1630442657489; Tue, 31 Aug 2021 13:44:17 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id g10sm3877928oof.37.2021.08.31.13.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 13:44:16 -0700 (PDT) Received: (nullmailer pid 617941 invoked by uid 1000); Tue, 31 Aug 2021 20:44:15 -0000 Date: Tue, 31 Aug 2021 15:44:15 -0500 From: Rob Herring To: Kefeng Wang Cc: linux-kernel@vger.kernel.org, frowand.list@gmail.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, saravanak@google.com, linus.walleij@linaro.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 3/4] amba: Kill sysfs attribute file of irq Message-ID: References: <20210827150600.78811-1-wangkefeng.wang@huawei.com> <20210827150600.78811-4-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210827150600.78811-4-wangkefeng.wang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Aug 27, 2021 at 11:05:59PM +0800, Kefeng Wang wrote: > 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 > > Signed-off-by: Kefeng Wang > --- > drivers/amba/bus.c | 18 ++---------------- > 1 file changed, 2 insertions(+), 16 deletions(-) Acked-by: Rob Herring > diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c > index 37fcd5592c6f..4d3a565ca079 100644 > --- a/drivers/amba/bus.c > +++ b/drivers/amba/bus.c > @@ -20,8 +20,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. */ > @@ -135,8 +133,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", Might want to get rid of this too. It's available thru other means (DT). That can be another patch. > (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, > dev->res.flags); > @@ -463,20 +459,10 @@ 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; > > -- > 2.18.0.huawei.25 > >