public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: sumit.semwal@linaro.org, gustavo@padovan.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: Change to use DEFINE_SHOW_ATTRIBUTE macro
Date: Mon, 24 Dec 2018 11:19:30 +0100	[thread overview]
Message-ID: <20181224101826.GA30772@dvetter-linux.ger.corp.intel.com> (raw)
In-Reply-To: <20181130161101.3413-1-tiny.windzz@gmail.com>

On Fri, Nov 30, 2018 at 11:11:01AM -0500, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Sorry, fell through the cracks, applied for 4.22, thanks for your patch.
For next time around pls ping again after 1-2 weeks already, instead of
1-2 months.

Thanks, Daniel

> ---
>  drivers/dma-buf/dma-buf.c    | 12 +-----------
>  drivers/dma-buf/sync_debug.c | 16 +++-------------
>  2 files changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 02f7f9a89979..7c858020d14b 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1093,17 +1093,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
>  	return 0;
>  }
>  
> -static int dma_buf_debug_open(struct inode *inode, struct file *file)
> -{
> -	return single_open(file, dma_buf_debug_show, NULL);
> -}
> -
> -static const struct file_operations dma_buf_debug_fops = {
> -	.open           = dma_buf_debug_open,
> -	.read           = seq_read,
> -	.llseek         = seq_lseek,
> -	.release        = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(dma_buf_debug);
>  
>  static struct dentry *dma_buf_debugfs_dir;
>  
> diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
> index c4c8ecb24aa9..c0abf37df88b 100644
> --- a/drivers/dma-buf/sync_debug.c
> +++ b/drivers/dma-buf/sync_debug.c
> @@ -147,7 +147,7 @@ static void sync_print_sync_file(struct seq_file *s,
>  	}
>  }
>  
> -static int sync_debugfs_show(struct seq_file *s, void *unused)
> +static int sync_info_debugfs_show(struct seq_file *s, void *unused)
>  {
>  	struct list_head *pos;
>  
> @@ -178,17 +178,7 @@ static int sync_debugfs_show(struct seq_file *s, void *unused)
>  	return 0;
>  }
>  
> -static int sync_info_debugfs_open(struct inode *inode, struct file *file)
> -{
> -	return single_open(file, sync_debugfs_show, inode->i_private);
> -}
> -
> -static const struct file_operations sync_info_debugfs_fops = {
> -	.open           = sync_info_debugfs_open,
> -	.read           = seq_read,
> -	.llseek         = seq_lseek,
> -	.release        = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(sync_info_debugfs);
>  
>  static __init int sync_debugfs_init(void)
>  {
> @@ -218,7 +208,7 @@ void sync_dump(void)
>  	};
>  	int i;
>  
> -	sync_debugfs_show(&s, NULL);
> +	sync_info_debugfs_show(&s, NULL);
>  
>  	for (i = 0; i < s.count; i += DUMP_CHUNK) {
>  		if ((s.count - i) > DUMP_CHUNK) {
> -- 
> 2.17.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      parent reply	other threads:[~2018-12-24 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 16:11 [PATCH] dma-buf: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-12-23 15:38 ` Frank Lee
2018-12-24 10:19 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181224101826.GA30772@dvetter-linux.ger.corp.intel.com \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tiny.windzz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox