All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] clean the definition of HANDLE_STACK
Date: Tue, 31 Oct 2006 10:19:30 +0000	[thread overview]
Message-ID: <45472332.6040402@bfs.de> (raw)
In-Reply-To: <2aac3c260610301129w6f83c555yaea4eb5e8200ea2@mail.gmail.com>

hi,

does it make sense to have a comment inside a macro ?
nobody will see it since the cpp will remove comments. it make the handling of the
macro harder because it is also large.
i would like to see a comment describing the macro in front it. removing the
comment inside.

just my to cents,

re,
 wh




Giangiacomo Mariotti wrote:
> I'm reposting my previous patch because I changed my e-mail address,so
> if there
> is any problem with it you have my new address.I put the patch in line
> and as a  plain text attachment.I hope this new e-mail works better
> than the previous one to post code on mailing lists.
> 
> Description: clean the definition of HANDLE_STACK in
> arch/x86_64/kernel/traps.c
>                    because it's syntax is misleading.
> Signed-off-by: Giangiacomo Mariotti <giangiacomo.mariotti@gmail.com>
> 
>> From cadb09c6ef0cf2874b1ed3813ea32848cb8c479c Mon Sep 17 00:00:00 2001
> From: Giangiacomo Mariotti <giangiacomo_mariotti@yahoo.com>
> Date: Sun, 29 Oct 2006 16:22:03 +0100
> Subject: [PATCH] cleaning of HANDLE_STACK definition
> 
> ---
> arch/x86_64/kernel/traps.c |   32 ++++++++++++++++++--------------
> 1 files changed, 18 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
> index 7819022..5573a21 100644
> --- a/arch/x86_64/kernel/traps.c
> +++ b/arch/x86_64/kernel/traps.c
> @@ -297,20 +297,24 @@ void dump_trace(struct task_struct *tsk,
>      * iteration will eventually trigger.
>      */
> #define HANDLE_STACK(cond) \
> -    do while (cond) { \
> -        unsigned long addr = *stack++; \
> -        if (oops_in_progress ?         \
> -            __kernel_text_address(addr) : \
> -            kernel_text_address(addr)) { \
> -            /* \
> -             * If the address is either in the text segment of the \
> -             * kernel, or in the region which contains vmalloc'ed \
> -             * memory, it *may* be the address of a calling \
> -             * routine; if so, print it so that someone tracing \
> -             * down the cause of the crash will be able to figure \
> -             * out the call path that was taken. \
> -             */ \
> -            ops->address(data, addr);   \
> +    do { \
> +        while (cond) { \
> +            unsigned long addr = *stack++; \
> +            if (oops_in_progress ?         \
> +                __kernel_text_address(addr) : \
> +                kernel_text_address(addr)) { \
> +                /* \
> +                * If the address is either in the text \
> +                * segment of the kernel, or in the region \
> +                * which contains vmalloc'ed memory, it may \
> +                * be the address of a calling routine; if \
> +                * so, print it so that someone tracing \
> +                * down the cause of the crash will be able \
> +                * to figure out the call path that \
> +                * was taken. \
> +                */ \
> +                ops->address(data, addr);   \
> +            } \
>         } \
>     } while (0)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2006-10-31 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30 19:29 [KJ] clean the definition of HANDLE_STACK Giangiacomo Mariotti
2006-10-31 10:19 ` walter harms [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=45472332.6040402@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.