From: Pan Bian <bianpan2016@163.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Guenter Roeck <groeck@chromium.org>,
Thierry Escande <thierry.escande@collabora.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Wei-Ning Huang <wnhuang@google.com>
Cc: linux-kernel@vger.kernel.org, Pan Bian <bianpan2016@163.com>
Subject: firmware: vpd: use memunmap instead of iounmap
Date: Tue, 8 Aug 2017 20:45:56 +0800 [thread overview]
Message-ID: <1502196356-11466-1-git-send-email-bianpan2016@163.com> (raw)
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() is better.
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/firmware/google/vpd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
index 7894572..ac6400f 100644
--- a/drivers/firmware/google/vpd.c
+++ b/drivers/firmware/google/vpd.c
@@ -234,7 +234,7 @@ static int vpd_section_init(const char *name, struct vpd_section *sec,
err_free_raw_name:
kfree(sec->raw_name);
err_iounmap:
- iounmap(sec->baseaddr);
+ memunmap(sec->baseaddr);
return err;
}
@@ -245,7 +245,7 @@ static int vpd_section_destroy(struct vpd_section *sec)
kobject_put(sec->kobj);
sysfs_remove_bin_file(vpd_kobj, &sec->bin_attr);
kfree(sec->raw_name);
- iounmap(sec->baseaddr);
+ memunmap(sec->baseaddr);
}
return 0;
@@ -262,7 +262,7 @@ static int vpd_sections_init(phys_addr_t physaddr)
return -ENOMEM;
memcpy_fromio(&header, temp, sizeof(struct vpd_cbmem));
- iounmap(temp);
+ memunmap(temp);
if (header.magic != VPD_CBMEM_MAGIC)
return -ENODEV;
--
1.9.1
next reply other threads:[~2017-08-08 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 12:45 Pan Bian [this message]
2017-08-08 14:38 ` Guenter Roeck
2017-08-08 16:26 ` Dmitry Torokhov
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=1502196356-11466-1-git-send-email-bianpan2016@163.com \
--to=bianpan2016@163.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.escande@collabora.com \
--cc=weiyongjun1@huawei.com \
--cc=wnhuang@google.com \
/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®