mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yann Droneaud <ydroneaud@opteya.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Colin Cross <ccross@android.com>,
	John Stultz <john.stultz@linaro.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Masanari Iida <standby24x7@gmail.com>,
	Daeseok Youn <daeseok.youn@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@canonical.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Yann Droneaud <ydroneaud@opteya.com>
Subject: Re: [PATCH 1/1] staging : android : sync : get_unused_fd
Date: Mon, 29 Sep 2014 20:03:53 +0200	[thread overview]
Message-ID: <1412013833.9750.12.camel@localhost.localdomain> (raw)
In-Reply-To: <1411807958-1522-1-git-send-email-xypron.glpk@gmx.de>

Hi,

Le samedi 27 septembre 2014 à 10:52 +0200, Heinrich Schuchardt a écrit :
> sync.h recommends to use get_unused_fd which does not set
> O_CLOEXEC while the rest of the android tree uses
> get_unused_fd_flags and sets O_CLOEXEC.
> 
> The patch adjust the comment.
> 

I'd like to add this patch to my patchset which try to remove
get_unused_fd() in favor of get_unused_fd_flags():

http://lkml.kernel.org/r/cover.1411562410.git.ydroneaud@opteya.com

But having O_CLOEXEC is welcome but not strictly needed,
so I think the patch should be reworked to not require O_CLOEXEC.

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/staging/android/sync.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
> index 66b0f43..a21b79f 100644
> --- a/drivers/staging/android/sync.h
> +++ b/drivers/staging/android/sync.h
> @@ -293,7 +293,8 @@ void sync_fence_put(struct sync_fence *fence);
>   * @fence:	fence to install
>   * @fd:		file descriptor in which to install the fence
>   *
> - * Installs @fence into @fd.  @fd's should be acquired through get_unused_fd().
> + * Installs @fence into @fd.  @fd's should be acquired through
> + * get_unused_fd_flags(O_CLOEXEC).

I think it will be better to have something like:

    get_unused_fd_flags(flags), with flags either provided by userspace
    or set to O_CLOEXEC.


>   */
>  void sync_fence_install(struct sync_fence *fence, int fd);
>  

Regards.

-- 
Yann Droneaud
OPTEYA



  reply	other threads:[~2014-09-29 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-27  8:52 Heinrich Schuchardt
2014-09-29 18:03 ` Yann Droneaud [this message]
2014-09-29 21:19   ` Aw: " Heinrich Schuchardt
2014-09-30 17:15     ` Yann Droneaud

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=1412013833.9750.12.camel@localhost.localdomain \
    --to=ydroneaud@opteya.com \
    --cc=ccross@android.com \
    --cc=daeseok.youn@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@canonical.com \
    --cc=standby24x7@gmail.com \
    --cc=sumit.semwal@linaro.org \
    --cc=xypron.glpk@gmx.de \
    /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

all inboxes | Powered by JetHome®