From: 管雪涛 <gxt@pku.edu.cn>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Fabian Frederick <fabf@skynet.be>,
linux-kernel <linux-kernel@vger.kernel.org>,
Guan Xuetao <gxt@mprc.pku.edu.cn>
Subject: 回复: Re: [PATCH 1/1] arch/unicore32/mm/ioremap.c: convert printk/warn_on to warn(1
Date: Mon, 12 May 2014 16:15:43 +0800 (CST) [thread overview]
Message-ID: <565015395.17555.1399882543611.JavaMail.root@bj-mail03.pku.edu.cn> (raw)
In-Reply-To: <20140506134647.8eae8b38be9e503805168b8f@linux-foundation.org>
----- 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)
> _
>
prev parent reply other threads:[~2014-05-12 8:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 17:07 Fabian Frederick
2014-05-06 20:46 ` Andrew Morton
2014-05-12 8:15 ` 管雪涛 [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=565015395.17555.1399882543611.JavaMail.root@bj-mail03.pku.edu.cn \
--to=gxt@pku.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=gxt@mprc.pku.edu.cn \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®