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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E456C433FE for ; Tue, 12 Oct 2021 12:53:02 +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 D42DA604DB for ; Tue, 12 Oct 2021 12:53:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D42DA604DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.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:Message-ID:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9IMuhqgCrIZ8ps8Cf6QCgtVJkIOTtCH8BWIS6wRJwnQ=; b=2fDdkbgiMQ+Bsy p2K0WysknhhssN2aoReR1Pb8keQ2R47NDIK86a2J0lUxGO3DqOXB2/xjYVfmsZfEvYGMs5zKuS9yb F1asQLuICeZuv/26YT7suRHKPQMVCaudDyCl7NVVOqduKtbSaLXBSVYx/69eektgDw4DCIYOvH1v+ rcTWfOYl/XUxTfLoyNFGkZ7Nf34NjbuUbxmCiNJ8OawfkgeS22z6Bqty82C3GSmpQtGg/s8ltU+HW nV9Ok040BWx5Tfos0UCSY8On1Y+u5xIjEKxm48hzCTTQroAe6qLvADsB0vFqBfslTuUGY1DfAKHaf /du59m7AQTlXdCYfs4RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1maHF9-00CnGj-2G; Tue, 12 Oct 2021 12:50:55 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1maHF4-00CnEe-Sa; Tue, 12 Oct 2021 12:50:52 +0000 Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 878BEE7; Tue, 12 Oct 2021 14:50:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1634043045; bh=VLomMBmnQc4g3tC66N5dZQVnBN/SyHIeZL2mvS4mRuU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=p7sKXRyxWirW+xJlmGK+r237SFuIMm9HZUIInCKBgEWPPBLzEIjIuIeSkKxk4vc26 jcVB62VS4ryAoGO69Wt849sxV/iqHxZuYgkC64NqwqYonGXSYaJHqupJKQNQcgRxt6 EMHkHu/0CQyvwMaLn/rN69qDwRPO0MNbbam0SZ8c= MIME-Version: 1.0 In-Reply-To: <20211010175457.438627-1-mike.rudenko@gmail.com> References: <20211010175457.438627-1-mike.rudenko@gmail.com> Subject: Re: [PATCH] media: rockchip: rkisp1: use device name for debugfs subdir name From: Kieran Bingham Cc: Mikhail Rudenko , Helen Koike , Dafna Hirschfeld , Mauro Carvalho Chehab , Heiko Stuebner , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Mikhail Rudenko , linux-media@vger.kernel.org Date: Tue, 12 Oct 2021 13:50:43 +0100 Message-ID: <163404304327.2976390.18225391015638170307@Monstersaurus> User-Agent: alot/0.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211012_055051_109182_F21A61DA X-CRM114-Status: GOOD ( 16.22 ) 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 Hi Mikhail, Quoting Mikhail Rudenko (2021-10-10 18:54:57) > While testing Rockchip RK3399 with both ISPs enabled, a dmesg error > was observed: > ``` > [ 15.559141] debugfs: Directory 'rkisp1' with parent '/' already present! > ``` > > Fix it by using the device name for the debugfs subdirectory name > instead of the driver name, thus preventing name collision. > > Signed-off-by: Mikhail Rudenko > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > index 7474150b94ed..560f928c3752 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > @@ -426,7 +426,7 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1) > { > struct rkisp1_debug *debug = &rkisp1->debug; > > - debug->debugfs_dir = debugfs_create_dir(RKISP1_DRIVER_NAME, NULL); > + debug->debugfs_dir = debugfs_create_dir(dev_name(rkisp1->dev), NULL); I would wonder if they should be grouped under a subdir called rkisp1 ... but that would then still keep the same issue that whichever was second to probe would find that /rkisp1 was already present. I suspect debugfs would make it possible to check if the parent was already there and only create it if it exists, but anyway, it would then be harder to clean up too. So separate based on the nodes sounds perfectly reasonable to me. Reviewed-by: Kieran Bingham > debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir, > &debug->data_loss); > debugfs_create_ulong("outform_size_err", 0444, debug->debugfs_dir, > -- > 2.33.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel