mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: "Justin P. Mattock" <justinmattock@gmail.com>
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 14:22:59 -0700	[thread overview]
Message-ID: <20100630142259.a5f4dcb5.rdunlap@xenotime.net> (raw)
In-Reply-To: <4C2BB52A.7070404@gmail.com>

On Wed, 30 Jun 2010 14:20:42 -0700 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.

Doesn't that mean just put double quotation marks around the entire message string??



> o.k. jiri, here is what I came up with, after re-reading and looking at 
> other in the kernel(below).
> 
> 
> 
>  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.
> 
> received this #warning from a simple printk program and noticed the web
> address is not showing up:
>   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:
> 
> after the changes the warning should just say:
> #warning Attempt to use kernel headers from user space!
> 
>   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..b542961 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!
>   #endif /* __KERNEL__ */
>   #endif /* __EXPORTED_HEADERS__ */
> 
> -- 
> 1.7.1.rc1.21.gf3bd6
> 
> 
> now I'm wondering if there should be a lead to the documentation with 
> this web address(seems grep is not finding anything that I might be able 
> to use).or just leave as is, and let people connect-the-dots!!
> 
> let me know..
> 
> Justin P. Mattock
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2010-06-30 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 19:37 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 [this message]
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=20100630142259.a5f4dcb5.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=jkosina@suse.cz \
    --cc=justinmattock@gmail.com \
    --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

all inboxes | Powered by JetHome®