From: Claudio Scordino <claudio@evidence.eu.com>
To: linux-mm@kvack.org
Cc: philb@gnu.org
Subject: Warning message when compiling ioremap.c
Date: Tue, 02 Sep 2008 09:37:14 +0200 [thread overview]
Message-ID: <48BCED2A.6030109@evidence.eu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Hi,
I'm not skilled with MM at all, so sorry if I'm saying something
stupid.
When compiling Linux (latest kernel from Linus' git) on ARM, I noticed
the following warning:
CC arch/arm/mm/ioremap.o
arch/arm/mm/ioremap.c: In function '__arm_ioremap_pfn':
arch/arm/mm/ioremap.c:83: warning: control may reach end of non-void
function 'remap_area_pte' being inlined
According to the message in the printk, we go to "bad" when the page
already exists.
So, I'm wondering if we shouldn't return a -EEXIST (see the patch
attached). This would remove that annoying warning message during
compilation...
Is it a good/bad idea ?
Regards,
Claudio
[-- Attachment #2: 0001-Fix-compilation-warning-related-to-return-value-in-r.patch --]
[-- Type: text/x-diff, Size: 820 bytes --]
>From 6ebc8f240bb8ca1cd640994ddb9280fb450f3f04 Mon Sep 17 00:00:00 2001
From: Claudio Scordino <claudio@evidence.eu.com>
Date: Mon, 1 Sep 2008 11:30:55 +0200
Subject: [PATCH 1/1] Fix compilation warning related to return value in remap_area_pte(...).
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
---
arch/arm/mm/ioremap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index b81dbf9..1e59a03 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -64,6 +64,7 @@ static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end,
bad:
printk(KERN_CRIT "remap_area_pte: page already exists\n");
BUG();
+ return -EEXIST;
}
static inline int remap_area_pmd(pgd_t *pgd, unsigned long addr,
--
1.5.4.3
next reply other threads:[~2008-09-02 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 7:37 Claudio Scordino [this message]
2008-09-03 17:01 ` Warning message when compiling ioremap.c Luiz Fernando N. Capitulino
2008-09-08 13:11 ` Claudio Scordino
2008-09-08 13:19 ` Phil Blundell
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=48BCED2A.6030109@evidence.eu.com \
--to=claudio@evidence.eu.com \
--cc=linux-mm@kvack.org \
--cc=philb@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.