lkml.org 
[lkml]   [2014]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject回复: Re: [PATCH 1/1] arch/unicore32/mm/io remap.c: convert printk/warn on to warn(1

----- Andrew Morton <akpm@linux-foundation.org> 写道:
> On Tue, 6 May 2014 19:07:34 +0200 Fabian Frederick <fabf@skynet.be> wrote:
>
> > +coalesce formats
> >
> > (This is untested)
> >
> > Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > ---
> > arch/unicore32/mm/ioremap.c | 9 ++-------
> > 1 file changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/unicore32/mm/ioremap.c b/arch/unicore32/mm/ioremap.c
> > index 13068ee..5d9568c 100644
> > --- a/arch/unicore32/mm/ioremap.c
> > +++ b/arch/unicore32/mm/ioremap.c
> > @@ -143,13 +143,8 @@ void __iomem *__uc32_ioremap_pfn_caller(unsigned long pfn,
> > /*
> > * Don't allow RAM to be mapped
> > */
> > - if (pfn_valid(pfn)) {
> > - printk(KERN_WARNING "BUG: Your driver calls ioremap() on\n"
> > - "system memory. This leads to architecturally\n"
> > - "unpredictable behaviour, and ioremap() will fail in\n"
> > - "the next kernel release. Please fix your driver.\n");
> > - WARN_ON(1);
> > - }
> > + if (pfn_valid(pfn))
> > + WARN(1, "BUG: Your driver calls ioremap() on\nsystem memory. This leads to architecturally\nunpredictable behaviour, and ioremap() will fail in\nthe next kernel release. Please fix your driver.\n");
> >
>
> I don't think that was an improvement. Particularly with all
> those \n's in there.
>
> checkpatch is a just a guide. It can and should be overruled by common
> sense and taste.
>
> --- a/arch/unicore32/mm/ioremap.c~arch-unicore32-mm-ioremapc-convert-printk-warn_on-to-warn1-fix
> +++ a/arch/unicore32/mm/ioremap.c
> @@ -144,7 +144,10 @@ void __iomem *__uc32_ioremap_pfn_caller(
> * Don't allow RAM to be mapped
> */
> if (pfn_valid(pfn))
> - WARN(1, "BUG: Your driver calls ioremap() on\nsystem memory. This leads to architecturally\nunpredictable behaviour, and ioremap() will fail in\nthe next kernel release. Please fix your driver.\n");
> + WARN(1, "BUG: Your driver calls ioremap() on\n"
> + "system memory. This leads to architecturally\n"
> + "unpredictable behaviour, and ioremap() will fail in\n"
> + "the next kernel release. Please fix your driver.\n");

A 'return NULL' is also needed to terminate this call.
Febian, could you submit another version?
Thanks.

>
> type = get_mem_type(mtype);
> if (!type)
> _
>

--
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/

\
 
 \ /
  Last update: 2014-05-12 11:01    [W:0.062 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site