From: xiaopeitux@foxmail.com
To: gregkh@linuxfoundation.org, broonie@kernel.org,
linux-kernel@vger.kernel.org
Cc: Pei Xiao <xiaopei01@kylinos.cn>, kernel test robot <lkp@intel.com>
Subject: [PATCH] driver core: device.h: fix incorrect type in return expression
Date: Wed, 22 Jan 2025 15:35:03 +0800 [thread overview]
Message-ID: <tencent_06B4B908579B884FEE392A1448602FAC9307@qq.com> (raw)
From: Pei Xiao <xiaopei01@kylinos.cn>
sparse warnings:
sparse: incorrect type in return expression, expected void
[noderef] __iomem *, got void *
Fix sparse warnings by use IOMEM_ERR_PTR
Fixes: da7c07b10838 ("driver core: Provide stubs for !IOMEM builds")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501221439.YoPUrrqD-lkp@intel.com/
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
include/linux/device.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 667cb6db9019..d76c31b9f9b9 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -378,14 +378,14 @@ static inline
void __iomem *devm_ioremap_resource(struct device *dev,
const struct resource *res)
{
- return ERR_PTR(-EINVAL);
+ return IOMEM_ERR_PTR(-EINVAL);
}
static inline
void __iomem *devm_ioremap_resource_wc(struct device *dev,
const struct resource *res)
{
- return ERR_PTR(-EINVAL);
+ return IOMEM_ERR_PTR(-EINVAL);
}
static inline
@@ -393,7 +393,7 @@ void __iomem *devm_of_iomap(struct device *dev,
struct device_node *node, int index,
resource_size_t *size)
{
- return ERR_PTR(-EINVAL);
+ return IOMEM_ERR_PTR(-EINVAL);
}
#endif
--
2.25.1
next reply other threads:[~2025-01-22 7:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 7:35 xiaopeitux [this message]
2025-02-21 8:20 ` Greg KH
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=tencent_06B4B908579B884FEE392A1448602FAC9307@qq.com \
--to=xiaopeitux@foxmail.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=xiaopei01@kylinos.cn \
/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®