LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: WANG Cong <xiyou.wangcong@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/16] (Resend) Use get_personality()
Date: Sat, 23 Feb 2008 12:27:10 +0300	[thread overview]
Message-ID: <20080223092710.GD2262@martell.zuzino.mipt.ru> (raw)
In-Reply-To: <20080223.165944.37229792.xiyou.wangcong@gmail.com>

On Sat, Feb 23, 2008 at 04:59:44PM +0800, WANG Cong wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> Subject: Re: [PATCH 00/16] (Resend) Use get_personality()

> > On Sat, Feb 23, 2008 at 04:14:03PM +0800, WANG Cong wrote:
> > > This patchset makes the macro get_personality function alike
> > > and teaches code to use get_personality() instead of explicit
> > > reference.
> > > 
> > > [I am sorry if you've received multiple copied of this, since
> > >  my git-send-email doesn't work well. ]
> > 
> > Yes, but why? "current->personality" is way more understandable than
> > your macro because task subject to dereference is very visible.
> 
> Use get_personality() can hide the task_struct internals a bit.

->personality is going to become something less trivial?
Sorry, but you sound like C++ people writing tons of pointless get/set
wrappers. And your get_personality() is worse -- C++ would write it as

	current->personality()

and again, even here, it's immediately visible that current task is
involved, not some other task.

> And I don't think using the macro to access it is less understandable.
> Since 'current' won't be NULL, whether the dereference is visible is
> not important.

It's not about NULL vs non-NULL at all.

  reply	other threads:[~2008-02-23  9:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-23  8:14 WANG Cong
2008-02-23  8:14 ` [PATCH 01/16] Make the macro get_personality function-like WANG Cong
2008-02-23  8:14   ` [PATCH 02/16] mm: use get_personality() WANG Cong
2008-02-23  8:14     ` [PATCH 03/16] fs: " WANG Cong
2008-02-23  8:14       ` [PATCH 04/16] powerpc: " WANG Cong
2008-02-23  8:14         ` [PATCH 05/16] parisc: " WANG Cong
2008-02-23  8:14           ` [PATCH 06/16] sparc(64): " WANG Cong
2008-02-23  8:14             ` [PATCH 07/16] arm: " WANG Cong
2008-02-23  8:14               ` [PATCH 08/16] x86: " WANG Cong
2008-02-23  8:14                 ` [PATCH 09/16] um: " WANG Cong
2008-02-23  8:14                   ` [PATCH 10/16] s390: " WANG Cong
2008-02-23  8:14                     ` [PATCH 11/16] mips: " WANG Cong
2008-02-23  8:14                       ` [PATCH 12/16] ia64: " WANG Cong
2008-02-23  8:14                         ` [PATCH 13/16] alpha: " WANG Cong
2008-02-23  8:14                           ` [PATCH 14/16] frv: " WANG Cong
2008-02-23  8:14                             ` [PATCH 15/16] mn10300: " WANG Cong
2008-02-23  8:14                               ` [PATCH 16/16] kernel: " WANG Cong
2008-02-23 12:03                             ` [PATCH 15/16] mn10300: " David Howells
2008-02-23 12:02                           ` [PATCH 14/16] frv: " David Howells
2008-02-23 10:08                 ` [PATCH 08/16] x86: " Ingo Molnar
2008-02-23 10:19                   ` Ingo Molnar
2008-02-23 10:39                     ` WANG Cong
2008-02-23  9:06           ` Accessor macros vs reference counting Matthew Wilcox
2008-02-23 12:46             ` David Newall
2008-02-23 14:56               ` Matthew Wilcox
2008-02-23  8:58   ` [PATCH 01/16] Make the macro get_personality function-like Bryan Wu
2008-02-23  8:51 ` [PATCH 00/16] (Resend) Use get_personality() Alexey Dobriyan
2008-02-23  8:59   ` WANG Cong
2008-02-23  9:27     ` Alexey Dobriyan [this message]
2008-02-23  9:56       ` WANG Cong
2008-02-23 18:37       ` Christoph Hellwig
2008-02-23 19:16         ` Andrew Morton
2008-02-24  4:03           ` WANG Cong
2008-02-25  2:14           ` [PATCH] Remove the macro get_personality WANG Cong
2008-02-23 12:02 ` [PATCH 01/16] Make the macro get_personality function-like David Howells

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=20080223092710.GD2262@martell.zuzino.mipt.ru \
    --to=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --subject='Re: [PATCH 00/16] (Resend) Use get_personality()' \
    /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

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).