The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mathieu Segaud <matt@minas-morgul.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes
Date: Mon, 15 Nov 2004 15:37:47 +0100	[thread overview]
Message-ID: <87is87w538.fsf@barad-dur.crans.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]


Hi Andrew,
(sorry for resending, forgot to CC: linux-kernel@)

This fixes more compile warnings, wrt last changes in k[un]map* prototypes.
I did _not_ fold the compile fix you provided later when CONFIG_HIGHMEM=y,
in include/asm-i386/highmem.h.
This patch:
  - adds (char *) casts in pte_* macros in include/asm-i386/pgtable.h
    when CONFIG_HIGHMEM=y
  - casts swp_entry_t object entry to (char *) in mm/shmem.c.

Signed-off-by: Mathieu Segaud <matt@minas-morgul.org>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: kunmap-fallout-more-fixes.patch --]
[-- Type: text/x-patch, Size: 1974 bytes --]

diff -Naur linux-2.6.10-rc1-mm5/include/asm-i386/highmem.h linux-2.6.10-rc1-mm5-fixes/include/asm-i386/highmem.h
--- linux-2.6.10-rc1-mm5/include/asm-i386/highmem.h	2004-11-15 12:10:04.727560936 +0100
+++ linux-2.6.10-rc1-mm5-fixes/include/asm-i386/highmem.h	2004-11-15 12:13:00.764799208 +0100
@@ -62,7 +62,7 @@
 char *kmap_atomic(struct page *page, enum km_type type);
 void kunmap_atomic(char *kvaddr, enum km_type type);
 char *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
-struct page *kmap_atomic_to_page(void *ptr);
+struct page *kmap_atomic_to_page(char *ptr);
 
 #define flush_cache_kmaps()	do { } while (0)
 
diff -Naur linux-2.6.10-rc1-mm5/include/asm-i386/pgtable.h linux-2.6.10-rc1-mm5-fixes/include/asm-i386/pgtable.h
--- linux-2.6.10-rc1-mm5/include/asm-i386/pgtable.h	2004-11-15 12:10:04.736559568 +0100
+++ linux-2.6.10-rc1-mm5-fixes/include/asm-i386/pgtable.h	2004-11-15 12:43:52.831242312 +0100
@@ -358,8 +358,8 @@
 	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
 #define pte_offset_map_nested(dir, address) \
 	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
-#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
-#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
+#define pte_unmap(pte) kunmap_atomic((char *)pte, KM_PTE0)
+#define pte_unmap_nested(pte) kunmap_atomic((char *)pte, KM_PTE1)
 #else
 #define pte_offset_map(dir, address) \
 	((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
diff -Naur linux-2.6.10-rc1-mm5/mm/shmem.c linux-2.6.10-rc1-mm5-fixes/mm/shmem.c
--- linux-2.6.10-rc1-mm5/mm/shmem.c	2004-11-15 12:10:06.720258000 +0100
+++ linux-2.6.10-rc1-mm5-fixes/mm/shmem.c	2004-11-15 12:44:19.963117640 +0100
@@ -327,7 +327,7 @@
 	entry->val = value;
 	info->swapped += incdec;
 	if ((unsigned long)(entry - info->i_direct) >= SHMEM_NR_DIRECT)
-		kmap_atomic_to_page(entry)->nr_swapped += incdec;
+		kmap_atomic_to_page((char *)entry)->nr_swapped += incdec;
 }
 
 /*

[-- Attachment #3: Type: text/plain, Size: 132 bytes --]


-- 
Catastrophic failure of the IDE cable???.
What are you doing to the poor thing, jumping on it?

	- Beau Kuiper on linux-kernel

             reply	other threads:[~2004-11-15 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-15 14:37 Mathieu Segaud [this message]
2004-11-15 14:45 ` [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes Mathieu Segaud

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=87is87w538.fsf@barad-dur.crans.org \
    --to=matt@minas-morgul.org \
    --cc=akpm@osdl.org \
    --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