Received: by 10.223.176.46 with SMTP id f43csp4419387wra; Tue, 23 Jan 2018 09:10:14 -0800 (PST) X-Google-Smtp-Source: AH8x227qwhplJOL+2QqKoB4XldsHcqif6WqGo64RueCjFvVvBhNeumUFl9egU7ow58PS4Ygh0puN X-Received: by 10.36.184.133 with SMTP id m127mr4614731ite.150.1516727401285; Tue, 23 Jan 2018 09:10:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516727401; cv=none; d=google.com; s=arc-20160816; b=aOnJGUASGravmXbW70CXkBl35CzEcuD5bJ98Gh9uBqb+d/dXzOyZR8WdswqBZ3VWmU pWKPsKKnHraqKJAbrlcvpT6TBAuNglTdG+/Dw2PLESFBZWzQEyL3fh4tb79GtvZuZkkg XkMCG3auYIp6VYx/i4iEEOfzRTYZN1eFPfGPlZ582cQpRs5bB2Gz03H19pIZ7tCeDXfK 4r6zS8HcosRYNaqyRzx1JRPZ+58N38Y23ODBLvyCcl7F6d9oHqWB5dveLJO9WluinbNt fDen4ILe4++4VwAmebYAG2n9ESDsr8aurK3k3eBFr5UrddjabUzpYEPRZ2/OaqUhv6Wv TyeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=UzvhBM00E91koamkn4WjHfnhlrskehc9tYe3WW7clXg=; b=EKDRDDrC1AKFmAndvKzTx28XVfJfQezEn4Zn6ZGfsNPVmcS/viCLWYm5PaoUqg21Qr P4S5HfeX16KbnviWMzln4LcBSqpOZ9UlGxDAlQukzFJv29uyBkIjVnUJMLSQWlTs6iew 7Ec5QEfHRhvWc1d5aE4BSwrssZY3lS4VURJQvX12tC+BnywouQDpmLfFyIc2Sb983zdf Clznund7TkdvPQIF922A2075WCDb9ZEja3sTuQybdURuhv8gDwv20S6RGYHhyHgVLNmk kXUv4OFb9JUPTptAp73gA8vS9fK4TRkqo5gjjKOHSKoXnPQ+C5FU2x2BWcBSFBcRytxY SNbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oSiiYKTz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t198si8745817itb.135.2018.01.23.09.09.47; Tue, 23 Jan 2018 09:10:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oSiiYKTz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbeAWRIS (ORCPT + 99 others); Tue, 23 Jan 2018 12:08:18 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:34528 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbeAWRIQ (ORCPT ); Tue, 23 Jan 2018 12:08:16 -0500 Received: by mail-qt0-f194.google.com with SMTP id a27so3158408qtd.1 for ; Tue, 23 Jan 2018 09:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UzvhBM00E91koamkn4WjHfnhlrskehc9tYe3WW7clXg=; b=oSiiYKTzpnRaezt+yZAT7gLwHNvJzm372J9MOz/CTh/64enCIveiMuqNw7uFlz0tOS mbewP9W2eSvZ9y3T/XG8QPWU/c4hGkVcd9RvutW6KkQFpM7T7P3RlBHKtA1AU3w+Gcz8 wMV32zKBES0XFYiFuW9qMtxG4VpOczCA5mMZ1bkc7SeSgYJfNenY22NJeTxz/gZSq/I8 URMzzOG0eGav5+NmEY9lzqL4TiP5UbrhPN5G4hij6lq6eXxTRt8YTh638pjAaVrxLXN+ CyLJBeN8Uoqc1b0zrer93b7x1YbA4yUubCS4zkQKq0kjh8VUMMG/mcWWHMWU4bcJkAAp vM4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UzvhBM00E91koamkn4WjHfnhlrskehc9tYe3WW7clXg=; b=jtnutmtCsIFk/DyRv9rp2BlJnRsSyhlb/4u0iBgEB8FgmRHpgZbrgtolAxofkb/Q3Q 4AdU5IHSfBzbNTU73IAnEZcFy4lm0DawNv649w4seTjzEFSsmrCcYlQIucElZsKTY3xf /PlvgMiUHguUd/Re1uqlEOgN8Ucpsw0Q/sYHgyjgOS5fBkIvLdOURFoYJaDC/9RY3inc MRqj1NHpbcgH0Ceg51z7xr6uZLWjKl9VXcUTTVI4bWAgR5j6v2FFXEQnRDL+2v9a7dUC MlR6d42aZCcNBMsA9/we4G0WSOQ04jzt7zTsa/ouPeST4ugsS1cWVZoKUY0pmpUyM6kn ELwA== X-Gm-Message-State: AKwxyteNehwzgCyPkV2HhXTtfFOx1bHhMPUd039E3zDN3yygJSSKWEVr TPUxgalhnoehF6gNV1HxG+01ReT3WrwUCxomAgfY1fdr X-Received: by 10.55.87.70 with SMTP id l67mr4359028qkb.319.1516727296179; Tue, 23 Jan 2018 09:08:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.175.35 with HTTP; Tue, 23 Jan 2018 09:08:15 -0800 (PST) In-Reply-To: <20180118053126.22082-1-dolinux.peng@gmail.com> References: <20180118053126.22082-1-dolinux.peng@gmail.com> From: Andy Shevchenko Date: Tue, 23 Jan 2018 19:08:15 +0200 Message-ID: Subject: Re: [PATCH v2] ASoC: use seq_file to dump the contents of dai_list,platform_list and codec_list To: Donglin Peng Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , ALSA Development Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 7:31 AM, Donglin Peng wrote: > Now the debugfs files dais/platforms/codecs have a size limit PAGE_SIZE and > the user can not see the whole contents of dai_list/platform_list/codec_list > when they are larger than this limit. > > This patch uses seq_file instead to make sure dais/platforms/codecs show the > full contents of dai_list/platform_list/codec_list. If it's not critical, I would suggest to wait till v4.16-rc1, where I would like to push [1], and switch to DEFINE_SHOW_ATTRIBUTE() macro. > +static int codec_list_seq_open(struct inode *inode, struct file *file) > +{ > + return single_open(file, codec_list_seq_show, NULL); > } > > static const struct file_operations codec_list_fops = { > + .open = codec_list_seq_open, > + .read = seq_read, > + .llseek = seq_lseek, > + .release = single_release, > }; This will be just DEFINE_SHOW_ATTRIBUTE(codec_list_seq); > +static int dai_list_seq_open(struct inode *inode, struct file *file) > +{ > + return single_open(file, dai_list_seq_show, NULL); > } > > static const struct file_operations dai_list_fops = { > + .open = dai_list_seq_open, > + .read = seq_read, > + .llseek = seq_lseek, > + .release = single_release, > }; Ditto. > +static int platform_list_seq_open(struct inode *inode, struct file *file) > +{ > + return single_open(file, platform_list_seq_show, NULL); > } > > static const struct file_operations platform_list_fops = { > + .open = platform_list_seq_open, > + .read = seq_read, > + .llseek = seq_lseek, > + .release = single_release, > }; Ditto. [1]: https://patchwork.kernel.org/patch/10178813/ -- With Best Regards, Andy Shevchenko