From: Cong Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cong Wang <amwang@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ilia Mirkin <imirkin@alum.mit.edu>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
devel@driverdev.osuosl.org
Subject: [PATCH 23/60] rtl8192u: remove the second argument of k[un]map_atomic()
Date: Fri, 10 Feb 2012 13:39:44 +0800 [thread overview]
Message-ID: <1328852421-19678-24-git-send-email-amwang@redhat.com> (raw)
In-Reply-To: <1328852421-19678-1-git-send-email-amwang@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
drivers/staging/rtl8192u/ieee80211/cipher.c | 8 ++++----
drivers/staging/rtl8192u/ieee80211/digest.c | 8 ++++----
drivers/staging/rtl8192u/ieee80211/internal.h | 17 -----------------
drivers/staging/rtl8192u/ieee80211/kmap_types.h | 20 --------------------
drivers/staging/rtl8192u/ieee80211/scatterwalk.c | 19 +++++--------------
5 files changed, 13 insertions(+), 59 deletions(-)
delete mode 100644 drivers/staging/rtl8192u/ieee80211/kmap_types.h
diff --git a/drivers/staging/rtl8192u/ieee80211/cipher.c b/drivers/staging/rtl8192u/ieee80211/cipher.c
index 69dcc31..d47345c 100644
--- a/drivers/staging/rtl8192u/ieee80211/cipher.c
+++ b/drivers/staging/rtl8192u/ieee80211/cipher.c
@@ -71,8 +71,8 @@ static int crypt(struct crypto_tfm *tfm,
u8 *src_p, *dst_p;
int in_place;
- scatterwalk_map(&walk_in, 0);
- scatterwalk_map(&walk_out, 1);
+ scatterwalk_map(&walk_in);
+ scatterwalk_map(&walk_out);
src_p = scatterwalk_whichbuf(&walk_in, bsize, tmp_src);
dst_p = scatterwalk_whichbuf(&walk_out, bsize, tmp_dst);
in_place = scatterwalk_samebuf(&walk_in, &walk_out,
@@ -84,10 +84,10 @@ static int crypt(struct crypto_tfm *tfm,
prfn(tfm, dst_p, src_p, crfn, enc, info, in_place);
- scatterwalk_done(&walk_in, 0, nbytes);
+ scatterwalk_done(&walk_in, nbytes);
scatterwalk_copychunks(dst_p, &walk_out, bsize, 1);
- scatterwalk_done(&walk_out, 1, nbytes);
+ scatterwalk_done(&walk_out, nbytes);
if (!nbytes)
return 0;
diff --git a/drivers/staging/rtl8192u/ieee80211/digest.c b/drivers/staging/rtl8192u/ieee80211/digest.c
index 301ed51..05e7497 100644
--- a/drivers/staging/rtl8192u/ieee80211/digest.c
+++ b/drivers/staging/rtl8192u/ieee80211/digest.c
@@ -39,12 +39,12 @@ static void update(struct crypto_tfm *tfm,
unsigned int bytes_from_page = min(l, ((unsigned int)
(PAGE_SIZE)) -
offset);
- char *p = crypto_kmap(pg, 0) + offset;
+ char *p = kmap_atomic(pg) + offset;
tfm->__crt_alg->cra_digest.dia_update
(crypto_tfm_ctx(tfm), p,
bytes_from_page);
- crypto_kunmap(p, 0);
+ kunmap_atomic(p);
crypto_yield(tfm);
offset = 0;
pg++;
@@ -75,10 +75,10 @@ static void digest(struct crypto_tfm *tfm,
tfm->crt_digest.dit_init(tfm);
for (i = 0; i < nsg; i++) {
- char *p = crypto_kmap(sg[i].page, 0) + sg[i].offset;
+ char *p = kmap_atomic(sg[i].page) + sg[i].offset;
tfm->__crt_alg->cra_digest.dia_update(crypto_tfm_ctx(tfm),
p, sg[i].length);
- crypto_kunmap(p, 0);
+ kunmap_atomic(p);
crypto_yield(tfm);
}
crypto_digest_final(tfm, out);
diff --git a/drivers/staging/rtl8192u/ieee80211/internal.h b/drivers/staging/rtl8192u/ieee80211/internal.h
index a7c096e..bebe13a 100644
--- a/drivers/staging/rtl8192u/ieee80211/internal.h
+++ b/drivers/staging/rtl8192u/ieee80211/internal.h
@@ -23,23 +23,6 @@
#include <asm/kmap_types.h>
-extern enum km_type crypto_km_types[];
-
-static inline enum km_type crypto_kmap_type(int out)
-{
- return crypto_km_types[(in_softirq() ? 2 : 0) + out];
-}
-
-static inline void *crypto_kmap(struct page *page, int out)
-{
- return kmap_atomic(page, crypto_kmap_type(out));
-}
-
-static inline void crypto_kunmap(void *vaddr, int out)
-{
- kunmap_atomic(vaddr, crypto_kmap_type(out));
-}
-
static inline void crypto_yield(struct crypto_tfm *tfm)
{
if (!in_softirq())
diff --git a/drivers/staging/rtl8192u/ieee80211/kmap_types.h b/drivers/staging/rtl8192u/ieee80211/kmap_types.h
deleted file mode 100644
index de67bb0..0000000
--- a/drivers/staging/rtl8192u/ieee80211/kmap_types.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __KMAP_TYPES_H
-
-#define __KMAP_TYPES_H
-
-
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BH_IRQ,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
-
-#define _ASM_KMAP_TYPES_H
-
-#endif
diff --git a/drivers/staging/rtl8192u/ieee80211/scatterwalk.c b/drivers/staging/rtl8192u/ieee80211/scatterwalk.c
index 3543a61..8b73f6c 100644
--- a/drivers/staging/rtl8192u/ieee80211/scatterwalk.c
+++ b/drivers/staging/rtl8192u/ieee80211/scatterwalk.c
@@ -13,8 +13,6 @@
* any later version.
*
*/
-#include "kmap_types.h"
-
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
@@ -23,13 +21,6 @@
#include "internal.h"
#include "scatterwalk.h"
-enum km_type crypto_km_types[] = {
- KM_USER0,
- KM_USER1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
-};
-
void *scatterwalk_whichbuf(struct scatter_walk *walk, unsigned int nbytes, void *scratch)
{
if (nbytes <= walk->len_this_page &&
@@ -62,9 +53,9 @@ void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg)
walk->offset = sg->offset;
}
-void scatterwalk_map(struct scatter_walk *walk, int out)
+void scatterwalk_map(struct scatter_walk *walk)
{
- walk->data = crypto_kmap(walk->page, out) + walk->offset;
+ walk->data = kmap_atomic(walk->page) + walk->offset;
}
static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
@@ -103,7 +94,7 @@ void scatterwalk_done(struct scatter_walk *walk, int out, int more)
* has been verified as multiple of the block size.
*/
int scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
- size_t nbytes, int out)
+ size_t nbytes)
{
if (buf != walk->data) {
while (nbytes > walk->len_this_page) {
@@ -111,9 +102,9 @@ int scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
buf += walk->len_this_page;
nbytes -= walk->len_this_page;
- crypto_kunmap(walk->data, out);
+ kunmap_atomic(walk->data);
scatterwalk_pagedone(walk, out, 1);
- scatterwalk_map(walk, out);
+ scatterwalk_map(walk);
}
memcpy_dir(buf, walk->data, nbytes, out);
--
1.7.7.6
next prev parent reply other threads:[~2012-02-10 5:44 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 5:39 [Resend PATCH 00/60] highmem: remove the second argument of k[un]map_atomic() Cong Wang
2012-02-10 5:39 ` [PATCH 01/60] highmem: mark k[un]map_atomic() with two arguments as deprecated Cong Wang
2012-02-17 23:59 ` Andrew Morton
2012-02-19 14:57 ` Cong Wang
2012-02-10 5:39 ` [PATCH 02/60] include/linux/highmem.h: remove the second argument of k[un]map_atomic() Cong Wang
2012-02-10 5:39 ` [PATCH 03/60] arm: " Cong Wang
2012-02-10 5:39 ` [PATCH 04/60] mips: " Cong Wang
2012-02-10 5:39 ` [PATCH 05/60] powerpc: " Cong Wang
2012-02-10 5:39 ` [PATCH 06/60] sh: " Cong Wang
2012-02-10 5:39 ` [PATCH 07/60] um: " Cong Wang
2012-02-10 5:39 ` [PATCH 08/60] x86: " Cong Wang
2012-02-10 5:39 ` [PATCH 09/60] crypto: " Cong Wang
2012-02-10 5:39 ` [PATCH 10/60] ata: " Cong Wang
2012-02-10 5:39 ` [PATCH 11/60] block: " Cong Wang
2012-02-10 5:39 ` [PATCH 12/60] crypto: " Cong Wang
2012-02-10 5:39 ` [PATCH 13/60] edac: " Cong Wang
2012-02-10 5:39 ` [PATCH 14/60] drm: " Cong Wang
2012-02-10 7:05 ` Thomas Hellstrom
2012-02-10 5:39 ` [PATCH 15/60] ide: " Cong Wang
2012-02-10 5:39 ` [PATCH 16/60] infiniband: " Cong Wang
2012-02-10 5:39 ` [PATCH 17/60] md: " Cong Wang
2012-02-10 5:39 ` [PATCH 18/60] media: " Cong Wang
2012-02-10 5:39 ` [PATCH 19/60] memstick: " Cong Wang
2012-02-10 5:39 ` [PATCH 20/60] net: " Cong Wang
2012-02-10 5:39 ` [PATCH 22/60] hv: " Cong Wang
2012-02-10 5:39 ` Cong Wang [this message]
2012-02-10 5:39 ` [PATCH 24/60] zram: " Cong Wang
2012-02-10 5:39 ` [PATCH 25/60] target: " Cong Wang
2012-02-10 22:18 ` Nicholas A. Bellinger
2012-02-13 7:44 ` Cong Wang
2012-02-10 5:39 ` [PATCH 26/60] vhost: " Cong Wang
2012-02-10 5:39 ` [PATCH 27/60] fs: " Cong Wang
2012-02-10 5:39 ` [PATCH 28/60] btrfs: " Cong Wang
2012-02-10 5:39 ` [PATCH 29/60] ecryptfs: " Cong Wang
2012-02-10 20:16 ` Tyler Hicks
2012-02-13 7:46 ` Cong Wang
2012-02-10 5:39 ` [PATCH 30/60] afs: " Cong Wang
2012-02-10 5:39 ` [PATCH 31/60] exofs: " Cong Wang
2012-02-10 5:39 ` [PATCH 32/60] ext2: " Cong Wang
2012-02-10 5:39 ` [PATCH 33/60] fuse: " Cong Wang
2012-02-10 5:39 ` [PATCH 34/60] gfs2: " Cong Wang
2012-02-10 5:39 ` [PATCH 35/60] jbd: " Cong Wang
2012-02-10 5:39 ` [PATCH 36/60] jbd2: " Cong Wang
2012-02-10 5:39 ` [PATCH 37/60] logfs: " Cong Wang
2012-02-10 5:39 ` [PATCH 38/60] minix: " Cong Wang
2012-02-10 5:40 ` [PATCH 39/60] nfs: " Cong Wang
2012-02-10 5:40 ` [PATCH 40/60] nilfs2: " Cong Wang
2012-02-10 5:40 ` [PATCH 41/60] ntfs: " Cong Wang
2012-02-10 5:40 ` [PATCH 42/60] ocfs2: " Cong Wang
2012-02-10 5:40 ` [PATCH 43/60] reiserfs: " Cong Wang
2012-02-10 5:40 ` [PATCH 44/60] squashfs: " Cong Wang
2012-02-10 5:40 ` [PATCH 45/60] ubifs: " Cong Wang
2012-02-10 5:40 ` [PATCH 46/60] udf: " Cong Wang
2012-02-10 5:40 ` [PATCH 47/60] kdb: " Cong Wang
2012-02-10 5:40 ` [PATCH 48/60] power: " Cong Wang
2012-02-10 5:40 ` [PATCH 49/60] lib: " Cong Wang
2012-02-10 5:40 ` [PATCH 50/60] mm: " Cong Wang
2012-02-10 5:40 ` [PATCH 51/60] net: " Cong Wang
2012-02-10 5:40 ` [PATCH 52/60] rds: " Cong Wang
2012-02-10 5:40 ` [PATCH 53/60] sunrpc: " Cong Wang
2012-02-10 5:40 ` [PATCH 54/60] tomoyo: " Cong Wang
2012-02-10 5:40 ` [PATCH 55/60] dm: " Cong Wang
2012-02-10 5:40 ` [PATCH 56/60] gma500: " Cong Wang
2012-02-10 5:40 ` [PATCH 57/60] zcache: " Cong Wang
2012-02-10 5:40 ` [PATCH 58/60] drbd: " Cong Wang
[not found] ` <CA+xKNSgdt7mc2NYTbprFspE54R_4T4PTzyGKyKESqBRyaNCPJg@mail.gmail.com>
2012-02-13 7:43 ` [Drbd-dev] " Cong Wang
2012-02-10 5:40 ` [PATCH 60/60] feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal Cong Wang
[not found] ` <1328852421-19678-60-git-send-email-amwang@redhat.com>
2012-02-10 13:05 ` [PATCH 59/60] highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename] Chris Metcalf
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=1328852421-19678-24-git-send-email-amwang@redhat.com \
--to=amwang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=imirkin@alum.mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
/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;
as well as URLs for NNTP newsgroup(s).