netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ulrich Drepper <drepper@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	davidel@xmailserver.org, mtk.manpages@gmail.com,
	torvalds@linux-foundation.org
Subject: Re: [PATCH 02/18] flag parameters: socket and socketpair
Date: Mon, 5 May 2008 18:58:50 -0700	[thread overview]
Message-ID: <20080505185850.789d870a.akpm@linux-foundation.org> (raw)
In-Reply-To: <200805050342.m453gktl029817@devserv.devel.redhat.com>

On Sun, 4 May 2008 23:42:46 -0400 Ulrich Drepper <drepper@redhat.com> wrote:

> +static const struct flags_rmap sock_file_flags_remap[] = {
> +	{ SOCK_CLOEXEC, O_CLOEXEC },
> +};
> +
>  asmlinkage long sys_socket(int family, int type, int protocol)
>  {
>  	int retval;
>  	struct socket *sock;
> +	int fflags;
> +
> +	type = flags_remap(sock_file_flags_remap,
> +			   ARRAY_SIZE(sock_file_flags_remap),
> +			   type, &fflags);

oh, so that's what it does.

afaict we only ever remap one or two flags.  Would it not be more efficient
to do that inline?  Something along the lines of:

	type = flag_remap(type, &fflags, SOCK_whatever, O_whatever);
	type = flag_remap(type, &fflags, SOCK_whatever2, O_whatever2);

?

  parent reply	other threads:[~2008-05-06  1:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05  3:42 [PATCH 02/18] flag parameters: socket and socketpair Ulrich Drepper
2008-05-05  4:24 ` YOSHIFUJI Hideaki / 吉藤英明
2008-05-05  5:00   ` Ulrich Drepper
2008-05-05  8:11 ` David Miller
2008-05-06  1:58 ` Andrew Morton [this message]
2008-05-06  2:13   ` Davide Libenzi
2008-05-06  2:17     ` Andrew Morton
2008-05-06  2:30       ` Davide Libenzi
2008-05-06 11:43       ` Alan Cox
2008-05-06  2:33   ` Ulrich Drepper
2008-05-06  2:42     ` Andrew Morton
2008-05-06  2:58       ` Ulrich Drepper
2008-05-06  3:05         ` Andrew Morton
2008-05-06  3:10           ` Ulrich Drepper
2008-05-06  3:02       ` Ulrich Drepper

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=20080505185850.789d870a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).