public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Beau Belgrave <beaub@linux.microsoft.com>
To: sunliming <sunliming@kylinos.cn>
Cc: rostedt@goodmis.org, mhiramat@kernel.org,
	kelulanainsley@gmail.com, linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] tracing/user_events: Fix incorrect return value for writing operation when events are disable
Date: Thu, 22 Jun 2023 20:20:40 +0000	[thread overview]
Message-ID: <ZJStGAVk3fZaAoug@CPC-beaub-VBQ1L.localdomain> (raw)
In-Reply-To: <20230621060827.151564-2-sunliming@kylinos.cn>

On Wed, Jun 21, 2023 at 02:08:24PM +0800, sunliming wrote:
> The writing operation return the count of writes regardless of whether events
> are enabled or disabled. Switch it to return 0 to indicates that the event
> is disabled.
> 
> Signed-off-by: sunliming <sunliming@kylinos.cn>

This looks good to me.

Acked-by: Beau Belgrave <beaub@linux.microsoft.com>

Thanks!

> ---
>  kernel/trace/trace_events_user.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index 1ac5ba5685ed..c085ff829a58 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -1957,7 +1957,8 @@ static ssize_t user_events_write_core(struct file *file, struct iov_iter *i)
>  
>  		if (unlikely(faulted))
>  			return -EFAULT;
> -	}
> +	} else
> +		return 0;
>  
>  	return ret;
>  }
> -- 
> 2.25.1

  reply	other threads:[~2023-06-22 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21  6:08 [PATCH v3 0/3] tracing/user_events: Fix incorrect return value for sunliming
2023-06-21  6:08 ` [PATCH v3 1/3] tracing/user_events: Fix incorrect return value for writing operation when events are disable sunliming
2023-06-22 20:20   ` Beau Belgrave [this message]
2023-06-26  6:15   ` Steven Rostedt

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=ZJStGAVk3fZaAoug@CPC-beaub-VBQ1L.localdomain \
    --to=beaub@linux.microsoft.com \
    --cc=kelulanainsley@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sunliming@kylinos.cn \
    /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