Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp751819pxt; Thu, 5 Aug 2021 10:44:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS28E5IDhemIMHattr++CEKOtbRgbqxplgGGVr7tXdv438lFXcQFcwB7RzDgmpWp6NJb3U X-Received: by 2002:a17:906:abcb:: with SMTP id kq11mr6092003ejb.214.1628185456552; Thu, 05 Aug 2021 10:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628185456; cv=none; d=google.com; s=arc-20160816; b=gjOIpibf36I+QMOAoySv+9mpqa7iYnwtlwBSbLK0EdT+3R7wkbOm3/R5+NE2QpOy9D Yzhg2dAry8yefFF9VyTiJvosPCH5/8ANdKQfv6NAERu4wuS/W+zC+IpG4q8XhCJtMSNq cMbBOMe8j7TBoEfL3Xm5Qd2Ut/apllObXEnyIZTumtvAuF97QIjPnvi9BTRZOAPZirzd dDc7sWC6RBCty9Z6k/X8K4dgAwMbTsXGTA4F9ezo9Job11E1oHZ361MHrHRWwYlFebB5 TOBKlTQLQBkb6vxWH3GoOq7eYMQ+IHII90M1aKm9sL6605MIWh5Vn4r9RVx08Onj6xEL y9mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T3QinWGbwdI1fOVNfZA+4F11HD/iffcYxl4DmG2SdBE=; b=MZ1gxi/PVycgxUO0fVx7ufzyekn36O3lgvWbNrBib4UgkkgHWiR6E8FdPqg3CYVU08 i+xMZvuZ1M47HoNVLfDxh4T102MUEMht4PVyql9+QHMJ718yGFnrtibTeNZY61sjtF+5 UyPAU0RJaoLlvdz9i832T6NRQ/klwGx8JlRLD/PUzzGrf0tes4ft3LWQlMmO7yA8Up3Q g3HgYWoWvh/D3ViYQYOptzkU/CE3yBpzuAzpgQKtsG0NnpoUozRzvWCnNEJUZz26Kyon 6fl0uwdhx0bhXGyYU7ElCqf8u4Yci0ZP2Z8seGu9X+eWRxiXchLzMp734OnzaZH83tBl zuQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iZwoMZWB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq14si7772685ejc.450.2021.08.05.10.43.51; Thu, 05 Aug 2021 10:44:16 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=iZwoMZWB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241338AbhHEMYo (ORCPT + 99 others); Thu, 5 Aug 2021 08:24:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:52618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241334AbhHEMYn (ORCPT ); Thu, 5 Aug 2021 08:24:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A923B61131; Thu, 5 Aug 2021 12:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628166269; bh=xAKsVXMtDsN6WuuEdbzYy00yVMILRU7K1QCm3smm7Yw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iZwoMZWB/JfyLg5LYwLD9usdBVIhng5NbAaXAQh/S9S3Bxtnp8MXRyveVo7+rxMyN oIAIDcrweL4e8P6gCe6/N2gTmwWIojJ8A8qU6DGSWb6qq0+6o66xD18xakiLaD3ARc 07NW3nL8kNWXoMYClP5kv/6fqmp8UW4H1MOqoivc= Date: Thu, 5 Aug 2021 14:24:26 +0200 From: Greg KH To: Sanjay R Mehta Cc: vkoul@kernel.org, dan.j.williams@intel.com, Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v11 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA Message-ID: References: <1627900375-80812-1-git-send-email-Sanju.Mehta@amd.com> <1627900375-80812-4-git-send-email-Sanju.Mehta@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1627900375-80812-4-git-send-email-Sanju.Mehta@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021 at 05:32:55AM -0500, Sanjay R Mehta wrote: > +void ptdma_debugfs_setup(struct pt_device *pt) > +{ > + struct pt_cmd_queue *cmd_q; > + char name[MAX_NAME_LEN + 1]; > + struct dentry *debugfs_q_instance; > + > + if (!debugfs_initialized()) > + return; > + > + debugfs_create_file("info", 0400, pt->dma_dev.dbg_dev_root, pt, > + &pt_debugfs_info_fops); > + > + debugfs_create_file("stats", 0400, pt->dma_dev.dbg_dev_root, pt, > + &pt_debugfs_stats_fops); > + > + cmd_q = &pt->cmd_q; > + > + snprintf(name, MAX_NAME_LEN - 1, "q"); You are calling snprintf() to format a string to be "q"? Why? You can just do: > + > + debugfs_q_instance = > + debugfs_create_dir(name, pt->dma_dev.dbg_dev_root); debugfs_create_dir("q", pt->....) here instead. thanks, greg k-h