public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jiri Kosina <jkosina@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]kernel.h Fix #warning message web address.
Date: Wed, 30 Jun 2010 15:13:06 -0700	[thread overview]
Message-ID: <4C2BC172.3060201@gmail.com> (raw)
In-Reply-To: <201006302336.46263.arnd@arndb.de>

On 06/30/2010 02:36 PM, Arnd Bergmann wrote:
> On Wednesday 30 June 2010 23:20:42 Justin P. Mattock wrote:
>>
>>> 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.
>>>
>
> What this is telling you is to put the text into a string constant, which
> means you add quotation marks at the beginning and end of the line, like
>
> #warning "see http://example.com/"
>

just realized that whole comment. was thrown off by the ` '  things.

>>    From 45f24db45faa06aad01cfc62ff4b475380e5cb11 Mon Sep 17 00:00:00 2001
>> From: Justin P. Mattock<justinmattock@gmail.com>
>> Date: Wed, 30 Jun 2010 14:06:18 -0700
>> Subject: [PATCH]kernel.h Fix #warning message according to the GCC
>> preprocessor docs.
>
> BTW, your mail client adds incorrect word wrapping.
>

I'm copy/pasting from another machine(vnc) somehow thunderbird is 
churning this up when doing so.

>> --- 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!
>>    #endif /* __KERNEL__ */
>>    #endif /* __EXPORTED_HEADERS__ */
>
> Here, too.
>
> Also, since you're already touching the warning message, it would be
> nice to move it from kernel.h to types.h, which is much more commonly
> used. When I introduced the message, I made the mistake to think
> that kernel.h was universally used by the majority of all headers,
> which turned out to be wrong. linux/types.h (or possibly linux/stddef.h)
> seems to be the most commonly used one, so that would be a more
> adequate place.
>
> 	Arnd
>

o.k. just sent a patch, but please have a look, Im not sure if it's 
correct.(if theres a test case I can use let me know, seems my printk 
program is not working with this change).

Justin P. Mattock

      reply	other threads:[~2010-06-30 22:12 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
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 [this message]

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=4C2BC172.3060201@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=arnd@arndb.de \
    --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