mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] x86: use get_desc_base
Date: Wed, 21 Nov 2007 10:30:31 -0800	[thread overview]
Message-ID: <1195669831.6352.249.camel@bodhitayantram.eng.vmware.com> (raw)
In-Reply-To: <20071121102037.A960326F8BE@magilla.localdomain>

On Wed, 2007-11-21 at 02:20 -0800, Roland McGrath wrote:
> This changes a couple of places to use the get_desc_base function.
> They were duplicating the same calculation with different equivalent code.
> 
> Signed-off-by: Roland McGrath <roland@redhat.com>
> 
> diff --git a/arch/x86/ia32/tls32.c b/arch/x86/ia32/tls32.c
> index 1cc4340..5291596 100644
> --- a/arch/x86/ia32/tls32.c
> +++ b/arch/x86/ia32/tls32.c
> @@ -85,11 +85,6 @@ asmlinkage long sys32_set_thread_area(struct user_desc __user *u_info)
>   * Get the current Thread-Local Storage area:
>   */
>  
> -#define GET_BASE(desc) ( \
> -	(((desc)->a >> 16) & 0x0000ffff) | \
> -	(((desc)->b << 16) & 0x00ff0000) | \
> -	( (desc)->b        & 0xff000000)   )

Are you sure there still aren't more of these things floating around?  I
recall ptrace and process.c even having one at one point, hopefully they
are all gone.

Nice cleanups,

Zach



  reply	other threads:[~2007-11-21 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 10:19 [PATCH 1/5] x86: get_desc_base Roland McGrath
2007-11-21 10:20 ` [PATCH 2/5] x86: use get_desc_base Roland McGrath
2007-11-21 18:30   ` Zachary Amsden [this message]
2007-11-21 10:21 ` [PATCH 3/5] x86: ptrace fs/gs_base Roland McGrath
2007-11-21 10:23 ` [PATCH 4/5] x86: desc_empty Roland McGrath
2007-11-21 10:25 ` [PATCH 5/5] x86: TLS cleanup Roland McGrath
2007-11-21 11:58   ` Thomas Gleixner
2007-11-21 18:34   ` Zachary Amsden
2007-11-21 22:37     ` Roland McGrath
2007-11-21 22:38     ` [replacement PATCH 5/6] x86: tls32 moved Roland McGrath
2007-11-21 22:39     ` [replacement PATCH 6/6] x86: TLS cleanup Roland McGrath
2007-11-22  9:10       ` Thomas Gleixner

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=1195669831.6352.249.camel@bodhitayantram.eng.vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.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®