linux-mips
[Top] [All Lists]

Re: [PATCH] Fix a warning in lib-64/dump_tlb.c

To: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH] Fix a warning in lib-64/dump_tlb.c
From: Thiemo Seufer <ths@networkno.de>
Date: Wed, 21 Mar 2007 16:55:21 +0000
Cc: Florian Fainelli <florian.fainelli@int-evry.fr>, linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.64N.0703211540520.2628@blysk.ds.pg.gda.pl>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <45FABA5A.5000007@int-evry.fr> <Pine.LNX.4.64N.0703211540520.2628@blysk.ds.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
Maciej W. Rozycki wrote:
> On Fri, 16 Mar 2007, Florian Fainelli wrote:
> 
> > This patch suppresses a warning in arch/mips/lib-64/dump_tlb.c
> > 
> > Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
> > 
> > -----
> > diff --git a/arch/mips/lib-64/dump_tlb.c b/arch/mips/lib-64/dump_tlb.c
> > index 8232900..60a87c5 100644
> > --- a/arch/mips/lib-64/dump_tlb.c
> > +++ b/arch/mips/lib-64/dump_tlb.c
> > @@ -30,6 +30,7 @@ static inline const char *msk2str(unsigned int mask)
> >         case PM_64M:    return "64Mb";
> >         case PM_256M:   return "256Mb";
> >  #endif
> > +       default:        return NULL;
> >         }
> >  }
> 
>  I guess BUG() would be appropriate here.

AFAICS NULL is wrong, it could cause the printk to crash.


Thiemo

<Prev in Thread] Current Thread [Next in Thread>