Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Fix a warning in lib-64/dump_tlb.c
@ 2007-03-16 15:40 Florian Fainelli
  2007-03-21 15:43 ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2007-03-16 15:40 UTC (permalink / raw)
  To: linux-mips

Hi all,

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;
        }
 }

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix a warning in lib-64/dump_tlb.c
  2007-03-16 15:40 [PATCH] Fix a warning in lib-64/dump_tlb.c Florian Fainelli
@ 2007-03-21 15:43 ` Maciej W. Rozycki
  2007-03-21 16:55   ` Thiemo Seufer
  0 siblings, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2007-03-21 15:43 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-mips

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.

  Maciej

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix a warning in lib-64/dump_tlb.c
  2007-03-21 15:43 ` Maciej W. Rozycki
@ 2007-03-21 16:55   ` Thiemo Seufer
  2007-03-26 21:09     ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Thiemo Seufer @ 2007-03-21 16:55 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Florian Fainelli, linux-mips

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix a warning in lib-64/dump_tlb.c
  2007-03-21 16:55   ` Thiemo Seufer
@ 2007-03-26 21:09     ` Florian Fainelli
  2007-03-26 21:16       ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2007-03-26 21:09 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: Maciej W. Rozycki, linux-mips

Hello,

Here is the patch taking into account your remarks. Thanks !

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..a320944 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:        BUG();
        }
 }

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix a warning in lib-64/dump_tlb.c
  2007-03-26 21:09     ` Florian Fainelli
@ 2007-03-26 21:16       ` Florian Fainelli
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2007-03-26 21:16 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: Maciej W. Rozycki, linux-mips

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

Forgot including bug.h. Final fix :

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..a2a12ee 100644
--- a/arch/mips/lib-64/dump_tlb.c
+++ b/arch/mips/lib-64/dump_tlb.c
@@ -15,6 +15,7 @@
 #include <asm/mipsregs.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
+#include <asm/bug.h>

 static inline const char *msk2str(unsigned int mask)
 {
@@ -30,6 +31,7 @@ static inline const char *msk2str(unsigned int mask)
        case PM_64M:    return "64Mb";
        case PM_256M:   return "256Mb";
 #endif
+       default:        BUG();
        }
 }


Le lundi 26 mars 2007, Florian Fainelli a écrit :
> Hello,
>
> Here is the patch taking into account your remarks. Thanks !
>
> 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..a320944 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:        BUG();
>         }
>  }

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-26 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16 15:40 [PATCH] Fix a warning in lib-64/dump_tlb.c Florian Fainelli
2007-03-21 15:43 ` Maciej W. Rozycki
2007-03-21 16:55   ` Thiemo Seufer
2007-03-26 21:09     ` Florian Fainelli
2007-03-26 21:16       ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox