public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]kernel.h Fix #warning message web address.
Date: Wed, 30 Jun 2010 06:28:47 -0700	[thread overview]
Message-ID: <4C2B468F.3020600@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1006301147490.13809@pobox.suse.cz>

On 06/30/2010 02:48 AM, Jiri Kosina wrote:
> On Tue, 29 Jun 2010, Justin P. Mattock wrote:
>
>> Playing around with a printk program I noticed that the #warning
>> message is incomplete(when using kernel headers for userspace):
>>
>>   gcc printk.c -o printk
>> In file included from printk.c:3:
>> include/linux/kernel.h:733:2: warning: #warning Attempt to use kernel headers from user space, see http:
>>
>> My guess for the web address not being displayed is "//" is treated as a comment.
>> So after changing "http://" to "www." I get the web address.(using firefox with this
>> address takes me right to the location). The warning looks like this:
>>
>> In file included from printk.c:3:
>> warning: #warning Attempt to use kernel headers from user space, see www.kernelnewbies.org/KernelHeaders
>>
>>   Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>>
>> ---
>>   include/linux/kernel.h |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
>> index 8317ec4..768196a 100644
>> --- a/include/linux/kernel.h
>> +++ b/include/linux/kernel.h
>> @@ -730,7 +730,7 @@ extern int do_sysinfo(struct sysinfo *info);
>>
>>   #ifndef __EXPORTED_HEADERS__
>>   #ifndef __KERNEL__
>> -#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
>> +#warning Attempt to use kernel headers from user space, see www.kernelnewbies.org/KernelHeaders
>>   #endif /* __KERNEL__ */
>>   #endif /* __EXPORTED_HEADERS__ */
>
> Hehe, ugly. How about making it a single string? GCC preprocessor
> documentation suggests the same anyway ...
>
> 	Neither `#error' nor `#warning' macro-expands its argument.
> 	Internal whitespace sequences are each replaced with a single space.
> 	The line must consist of complete tokens.  It is wisest to make the
> 	argument of these directives be a single string constant; this avoids
> 	problems with apostrophes and the like.
>


before the www. idea, I was thinking maybe sending the address to a file 
somewhere in documentation
something in this area:

#warning Using kernel headers from user space, please see Documentation/*

but I still need to re-read what the above says, seems a bit technical..

Justin P. Mattock

  reply	other threads:[~2010-06-30 13:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 19:37 [PATCH]kernel.h Fix #warning message web address Justin P. Mattock
2010-06-30  9:48 ` Jiri Kosina
2010-06-30 13:28   ` Justin P. Mattock [this message]
2010-06-30 21:20   ` Justin P. Mattock
2010-06-30 21:22     ` Randy Dunlap
2010-06-30 21:37       ` Justin P. Mattock
2010-06-30 21:36     ` Arnd Bergmann
2010-06-30 22:13       ` Justin P. Mattock

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=4C2B468F.3020600@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.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