linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	mingo@kernel.org, luto@amacapital.net,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	hpa@linux.intel.com
Cc: "tip-bot for H. Peter Anvin" <tipbot@zytor.com>,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/vdso] x86, vdso: Use <tools/le_byteshift.h> for littleendian access
Date: Tue, 10 Jun 2014 14:28:37 -0700	[thread overview]
Message-ID: <53977885.8010709@zytor.com> (raw)
In-Reply-To: <20140610135051.c3c34165f73d67d218b62bd9@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On 06/10/2014 01:50 PM, Andrew Morton wrote:
> On Fri, 6 Jun 2014 15:00:29 -0700 "tip-bot for H. Peter Anvin" <tipbot@zytor.com> wrote:
> 
>> Commit-ID:  bdfb9bcc25005d06a9c301830bdeb7ca5a0b6ef7
>> Gitweb:     http://git.kernel.org/tip/bdfb9bcc25005d06a9c301830bdeb7ca5a0b6ef7
>> Author:     H. Peter Anvin <hpa@linux.intel.com>
>> AuthorDate: Fri, 6 Jun 2014 14:30:37 -0700
>> Committer:  H. Peter Anvin <hpa@linux.intel.com>
>> CommitDate: Fri, 6 Jun 2014 14:54:54 -0700
>>
>> x86, vdso: Use <tools/le_byteshift.h> for littleendian access
> 
> Getting closer.
> 
> In file included from arch/x86/vdso/vdso2c.c:80:
> arch/x86/vdso/vdso2c.h: In function 'go64':
> arch/x86/vdso/vdso2c.h:119: warning: implicit declaration of function 'htole16'
> /tmp/cc04m2KE.o: In function `go':
> vdso2c.c:(.text+0xf69): undefined reference to `htole16'
> vdso2c.c:(.text+0x12e6): undefined reference to `htole16'
> 

Want to test this patch before I commit it?

	-hpa


[-- Attachment #2: 0001-x86-vdso-Remove-one-final-use-of-htole16.patch --]
[-- Type: text/x-patch, Size: 1355 bytes --]

>From 15ea1a528e08c6bc322f10686ec8d73ba413b941 Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@zytor.com>
Date: Tue, 10 Jun 2014 14:25:26 -0700
Subject: [PATCH] x86, vdso: Remove one final use of htole16()

One final use of the macros from <endian.h> which are not available on
older system.  In this case we had one sole case of *writing* a
littleendian number, but the number is SHN_UNDEF which is the constant
zero, so rather than dealing with the general case of littleendian
puts here, just document that the constant is zero and be done with
it.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/20140610135051.c3c34165f73d67d218b62bd9@linux-foundation.org
---
 arch/x86/vdso/vdso2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index 8a074637a576..d9f6f61aef1c 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -116,7 +116,7 @@ static void GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
 	hdr->e_shoff = 0;
 	hdr->e_shentsize = 0;
 	hdr->e_shnum = 0;
-	hdr->e_shstrndx = htole16(SHN_UNDEF);
+	hdr->e_shstrndx = SHN_UNDEF; /* SHN_UNDEF == 0 */
 
 	if (!name) {
 		fwrite(addr, load_size, 1, outfile);
-- 
1.9.3


  reply	other threads:[~2014-06-10 21:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 22:35 [GIT PULL] x86/vdso changes for v3.16 H. Peter Anvin
2014-06-06 21:00 ` Andrew Morton
2014-06-06 21:07   ` H. Peter Anvin
2014-06-08 17:18     ` Sam Ravnborg
2014-06-08 18:54       ` H. Peter Anvin
2014-06-06 21:07   ` Linus Torvalds
2014-06-06 21:09     ` Andy Lutomirski
2014-06-06 21:13       ` Linus Torvalds
2014-06-06 21:14         ` Andy Lutomirski
2014-06-06 21:15         ` H. Peter Anvin
2014-06-06 21:22           ` Andy Lutomirski
2014-06-06 21:25             ` H. Peter Anvin
2014-06-06 21:33               ` Andy Lutomirski
2014-06-06 21:37                 ` H. Peter Anvin
2014-06-06 21:39                   ` Andy Lutomirski
2014-06-06 21:42                     ` H. Peter Anvin
2014-06-06 21:44                       ` Andy Lutomirski
2014-06-06 21:36             ` H. Peter Anvin
2014-06-06 22:00   ` [tip:x86/vdso] x86, vdso: Use <tools/le_byteshift.h> for littleendian access tip-bot for H. Peter Anvin
2014-06-10 20:50     ` Andrew Morton
2014-06-10 21:28       ` H. Peter Anvin [this message]
2014-06-10 21:35         ` Andy Lutomirski
2014-06-10 22:06         ` Andrew Morton
2014-06-10 22:43       ` [tip:x86/vdso] x86, vdso: Remove one final use of htole16() tip-bot for H. Peter Anvin
2014-06-10 22:57       ` tip-bot for H. Peter Anvin

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=53977885.8010709@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tipbot@zytor.com \
    /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).