Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH] MIPS: Use WARN() in uasm for better diagnostics.
Date: Tue, 28 Dec 2010 18:44:25 +0300	[thread overview]
Message-ID: <4D1A05D9.9050707@mvista.com> (raw)
In-Reply-To: <1293502709-11454-1-git-send-email-ddaney@caviumnetworks.com>

Hello.

David Daney wrote:

> On the off chance that uasm ever warns about overflow, there is no way
> to know what the offending instruction is.

> Change the printks to WARNs, so we can get a nice stack trace.  It has
> the added benefit of being much more noticeable than the short single
> line warning message, so is less likely to be ignored.

> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
> ---
>  arch/mips/mm/uasm.c |   40 ++++++++++++++++------------------------
>  1 files changed, 16 insertions(+), 24 deletions(-)

> diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
> index 357916d..4008c79 100644
> --- a/arch/mips/mm/uasm.c
> +++ b/arch/mips/mm/uasm.c
> @@ -156,91 +156,83 @@ static struct insn insn_table[] __uasminitdata = {
[...]
>  static inline __uasminit u32 build_jimm(u32 arg)
>  {
> -	if (arg & ~((JIMM_MASK) << 2))
> -		printk(KERN_WARNING "Micro-assembler field overflow\n");
> +	WARN(arg & ~((JIMM_MASK) << 2),

    Could drop parens around JIMM_MASK while at it...

WBR, Sergei

  parent reply	other threads:[~2010-12-28 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28  2:18 [PATCH] MIPS: Use WARN() in uasm for better diagnostics David Daney
2010-12-28 15:31 ` Ralf Baechle
2010-12-28 15:44 ` Sergei Shtylyov [this message]
2010-12-28 15:54   ` Ralf Baechle

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=4D1A05D9.9050707@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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