Message ID | 20230525021219.23638-9-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp56787vqr; Wed, 24 May 2023 19:15:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5cv+c4Oe2dy2Z2uDG1OR6GEvOWiDHMciWZspMrcR4ZR1yJXnp1NWsbeEHMqBHq3c5hDSy0 X-Received: by 2002:a17:90b:887:b0:253:37ef:ce63 with SMTP id bj7-20020a17090b088700b0025337efce63mr1364112pjb.18.1684980935918; Wed, 24 May 2023 19:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684980935; cv=none; d=google.com; s=arc-20160816; b=z1/tTGzspEY9aZsK7dty8nwbJkIrpi/Qch6CNOOtsQ1FEEkeC2WkKNrrN+V3jfDSdg g/MRA6MDnk18WrvnGqw/WpiV3dvekAw4Qcl1DLaN07iqwR2SNV4GJO/n2Oz7i3Kjuur9 sMkWyvxZr9EaD+71uAvlyXbeCun+B6T0Pb0s0GJdf1NNThfe48+vm1H+so/D1KaznzZT 6i/HWFlc1KaK2hS1/EKXKZzUvzTvhOm8E7s2WmMtEjdkYQPpqTCNwt35uKv0GyXJmiJo l30jrmdaL45B5ggxzPANd+qKW9VyWLGptqBcrkeF5GBb8DZNxzG5lj5tezEg4CW3b14a BtEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eCqP2l+Kqdf5yUqoHyrwDaNfrpAvvcfVlREwKoCaOqs=; b=ampVYvvsOJAJ4IGR0FnI3ZNDQTjQIdFTylfF3QanfSLn4o3AvKOPq7tJXjjumNJAmt mJJoJvvNQHjsVllM8F7LSpM7ZOwMnZnwW06gfRM7L3/AO/x5y/SCnCdsKaE5jEo/hLGM 1EZpiM+r+UF94wPaAyGHNtzydI02g+H1M38TSu2ZLy0E801lxPmCmEhWdg1qQpmqJFBe AfniSuxDkmaSxRcHhw9LZztmw3UAn0o6pffzxRP3KsW7ymMCzLYE5qGuAKaPk7torp/R 2x1UD0ml7RazPmJbDORka0iFr6on3se/4pREhDVvhshx9tpByPif7PK+MBVipV+S9q/k 7DDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Qukh1Icz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a17090aca8d00b002533873625dsi1656667pjt.24.2023.05.24.19.14.58; Wed, 24 May 2023 19:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Qukh1Icz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232901AbjEYCND (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 22:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235437AbjEYCMk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 22:12:40 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B19CD3; Wed, 24 May 2023 19:12:36 -0700 (PDT) X-UUID: 9a2c7740faa111ed9cb5633481061a41-20230525 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=eCqP2l+Kqdf5yUqoHyrwDaNfrpAvvcfVlREwKoCaOqs=; b=Qukh1Icz8GtFgzsd5Nfoj8eBlaUkVCe6WR4mBlWd0uehu8iI0QJAyfiJiaTW7Ut7uRZgm49yzJbR9fYenQtOBmien/a79T008xbZDE7TPRDrIGSRPIUUztbzVw2lGU5ZULYbthDZBplPnYJhlG7WhCDoLv9i82EAC/NFiunBgUM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:7c52b6b6-d726-4dbb-856c-680af51c0394,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.25,REQID:7c52b6b6-d726-4dbb-856c-680af51c0394,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:d5b0ae3,CLOUDID:0b2d473c-de1e-4348-bc35-c96f92f1dcbb,B ulkID:230525101232CBEBVDHU,BulkQuantity:0,Recheck:0,SF:48|38|29|28|17|19,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 9a2c7740faa111ed9cb5633481061a41-20230525 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1004778313; Thu, 25 May 2023 10:12:30 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 25 May 2023 10:12:28 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 25 May 2023 10:12:28 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Chen-Yu Tsai <wenst@chromium.org>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, =?utf-8?q?N=C3=ADcolas?= =?utf-8?q?_F_=2E_R_=2E_A_=2E_Prado?= <nfraprado@collabora.com>, Nathan Hebert <nhebert@chromium.org> CC: Yunfei Dong <yunfei.dong@mediatek.com>, Hsin-Yi Wang <hsinyi@chromium.org>, Fritz Koenig <frkoenig@chromium.org>, Daniel Vetter <daniel@ffwll.ch>, Steve Cho <stevecho@chromium.org>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com> Subject: [PATCH v5,8/8] media: mediatek: vcodec: Add dbgfs help function Date: Thu, 25 May 2023 10:12:19 +0800 Message-ID: <20230525021219.23638-9-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230525021219.23638-1-yunfei.dong@mediatek.com> References: <20230525021219.23638-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766830570012957726?= X-GMAIL-MSGID: =?utf-8?q?1766830570012957726?= |
Series |
media: mediatek: vcodec: Add debugfs file for decode and encode
|
|
Commit Message
Yunfei Dong (董云飞)
May 25, 2023, 2:12 a.m. UTC
Getting dbgfs help information with command "echo -help > vdec".
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
.../mediatek/vcodec/mtk_vcodec_dbgfs.c | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
Comments
Il 25/05/23 04:12, Yunfei Dong ha scritto: > Getting dbgfs help information with command "echo -help > vdec". > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 24 ++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > index 237d0dc8a1fc..2372fc449b45 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > @@ -52,6 +52,23 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf > *used += curr_len; > } > > +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int total) > +{ > + int curr_len; > + > + curr_len = snprintf(buf + *used, total - *used, > + "help: (1: echo -'info' > vdec 2: cat vdec)\n"); > + *used += curr_len; > + > + curr_len = snprintf(buf + *used, total - *used, > + "\t-picinfo: get resolution\n"); > + *used += curr_len; > + > + curr_len = snprintf(buf + *used, total - *used, > + "\t-format: get output & capture queue format\n"); > + *used += curr_len; > +} > + > static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const char __user *ubuf, > size_t count, loff_t *ppos) > { > @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf, > if (!buf) > return -ENOMEM; > > + if (strstr(dbgfs->dbgfs_buf, "-help")) { I would print the help strings in two conditions: 1. -help 2. (nothing) ...so that if you don't echo anything to vdec (no params), you get the help text. Otherwise, you would have to know that "-help" is a parameter that gives you help text in the first place. As for this commit "as is", it works as intended and it is useful to retrieve the help text; you can either send a followup commit that extends the help to the corner case that I've explained, or send a v6 adding that to this same commit. I would prefer to see a v6 -- BUT -- since this series was sent a long time ago, you will get my R-b and I will leave the final choice to Hans. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Tue, May 30, 2023 at 6:06 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Il 25/05/23 04:12, Yunfei Dong ha scritto: > > Getting dbgfs help information with command "echo -help > vdec". > > > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > > --- > > .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 24 ++++++++++++++++++- > > 1 file changed, 23 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > > index 237d0dc8a1fc..2372fc449b45 100644 > > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > > @@ -52,6 +52,23 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf > > *used += curr_len; > > } > > > > +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int total) > > +{ > > + int curr_len; > > + > > + curr_len = snprintf(buf + *used, total - *used, > > + "help: (1: echo -'info' > vdec 2: cat vdec)\n"); > > + *used += curr_len; > > + > > + curr_len = snprintf(buf + *used, total - *used, > > + "\t-picinfo: get resolution\n"); > > + *used += curr_len; > > + > > + curr_len = snprintf(buf + *used, total - *used, > > + "\t-format: get output & capture queue format\n"); > > + *used += curr_len; > > +} > > + > > static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const char __user *ubuf, > > size_t count, loff_t *ppos) > > { > > @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf, > > if (!buf) > > return -ENOMEM; > > > > + if (strstr(dbgfs->dbgfs_buf, "-help")) { > > I would print the help strings in two conditions: > 1. -help > 2. (nothing) > > ...so that if you don't echo anything to vdec (no params), you get the help text. > Otherwise, you would have to know that "-help" is a parameter that gives you help > text in the first place. > > As for this commit "as is", it works as intended and it is useful to retrieve > the help text; you can either send a followup commit that extends the help to > the corner case that I've explained, or send a v6 adding that to this same commit. > > I would prefer to see a v6 -- BUT -- since this series was sent a long time ago, > you will get my R-b and I will leave the final choice to Hans. > > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> The help file could just exist as a separate file. You can then use cleaner interfaces for it. ChenYu
On 5/30/23 12:06, AngeloGioacchino Del Regno wrote: > Il 25/05/23 04:12, Yunfei Dong ha scritto: >> Getting dbgfs help information with command "echo -help > vdec". >> >> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> >> --- >> .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 24 ++++++++++++++++++- >> 1 file changed, 23 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c >> index 237d0dc8a1fc..2372fc449b45 100644 >> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c >> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c >> @@ -52,6 +52,23 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf >> *used += curr_len; >> } >> >> +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int total) >> +{ >> + int curr_len; >> + >> + curr_len = snprintf(buf + *used, total - *used, >> + "help: (1: echo -'info' > vdec 2: cat vdec)\n"); >> + *used += curr_len; >> + >> + curr_len = snprintf(buf + *used, total - *used, >> + "\t-picinfo: get resolution\n"); >> + *used += curr_len; >> + >> + curr_len = snprintf(buf + *used, total - *used, >> + "\t-format: get output & capture queue format\n"); >> + *used += curr_len; >> +} >> + >> static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const char __user *ubuf, >> size_t count, loff_t *ppos) >> { >> @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf, >> if (!buf) >> return -ENOMEM; >> >> + if (strstr(dbgfs->dbgfs_buf, "-help")) { > > I would print the help strings in two conditions: > 1. -help > 2. (nothing) > > ...so that if you don't echo anything to vdec (no params), you get the help text. > Otherwise, you would have to know that "-help" is a parameter that gives you help > text in the first place. > > As for this commit "as is", it works as intended and it is useful to retrieve > the help text; you can either send a followup commit that extends the help to > the corner case that I've explained, or send a v6 adding that to this same commit. > > I would prefer to see a v6 -- BUT -- since this series was sent a long time ago, > you will get my R-b and I will leave the final choice to Hans. > > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > I prefer a v6, rebased on top of the media_stage tree. Regards, Hans
Hi Hans, On Tue, 2023-05-30 at 12:33 +0200, Hans Verkuil wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 5/30/23 12:06, AngeloGioacchino Del Regno wrote: > > Il 25/05/23 04:12, Yunfei Dong ha scritto: > >> Getting dbgfs help information with command "echo -help > vdec". > >> > >> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > >> --- > >> .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 24 > ++++++++++++++++++- > >> 1 file changed, 23 insertions(+), 1 deletion(-) > >> > >> diff --git > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > >> index 237d0dc8a1fc..2372fc449b45 100644 > >> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > >> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c > >> @@ -52,6 +52,23 @@ static void > mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf > >> *used += curr_len; > >> } > >> > >> +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int > total) > >> +{ > >> +int curr_len; > >> + > >> +curr_len = snprintf(buf + *used, total - *used, > >> + "help: (1: echo -'info' > vdec 2: cat vdec)\n"); > >> +*used += curr_len; > >> + > >> +curr_len = snprintf(buf + *used, total - *used, > >> + "\t-picinfo: get resolution\n"); > >> +*used += curr_len; > >> + > >> +curr_len = snprintf(buf + *used, total - *used, > >> + "\t-format: get output & capture queue format\n"); > >> +*used += curr_len; > >> +} > >> + > >> static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const > char __user *ubuf, > >> size_t count, loff_t *ppos) > >> { > >> @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file > *filp, char __user *ubuf, > >> if (!buf) > >> return -ENOMEM; > >> > >> +if (strstr(dbgfs->dbgfs_buf, "-help")) { > > > > I would print the help strings in two conditions: > > 1. -help > > 2. (nothing) > > > > ...so that if you don't echo anything to vdec (no params), you get > the help text. > > Otherwise, you would have to know that "-help" is a parameter that > gives you help > > text in the first place. > > > > As for this commit "as is", it works as intended and it is useful > to retrieve > > the help text; you can either send a followup commit that extends > the help to > > the corner case that I've explained, or send a v6 adding that to > this same commit. > > > > I would prefer to see a v6 -- BUT -- since this series was sent a > long time ago, > > you will get my R-b and I will leave the final choice to Hans. > > > > Reviewed-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > > > > > > I prefer a v6, rebased on top of the media_stage tree. > > Regards, > > Hans I already have sent patch v6 to review. Best Regards, Yunfei Dong
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c index 237d0dc8a1fc..2372fc449b45 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c @@ -52,6 +52,23 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf *used += curr_len; } +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int total) +{ + int curr_len; + + curr_len = snprintf(buf + *used, total - *used, + "help: (1: echo -'info' > vdec 2: cat vdec)\n"); + *used += curr_len; + + curr_len = snprintf(buf + *used, total - *used, + "\t-picinfo: get resolution\n"); + *used += curr_len; + + curr_len = snprintf(buf + *used, total - *used, + "\t-format: get output & capture queue format\n"); + *used += curr_len; +} + static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const char __user *ubuf, size_t count, loff_t *ppos) { @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf, if (!buf) return -ENOMEM; + if (strstr(dbgfs->dbgfs_buf, "-help")) { + mtk_vdec_dbgfs_get_help(buf, &used_len, total_len); + goto read_buffer; + } + if (strstr(dbgfs->dbgfs_buf, "-picinfo")) dbgfs_index[MTK_VDEC_DBGFS_PICINFO] = true; @@ -110,7 +132,7 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf, mtk_vdec_dbgfs_get_format_type(ctx, buf, &used_len, total_len); } mutex_unlock(&dbgfs->dbgfs_lock); - +read_buffer: ret = simple_read_from_buffer(ubuf, count, ppos, buf, used_len); kfree(buf); return ret;