All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4EBA0D3D.1090808@gmail.com>

diff --git a/a/1.txt b/N1/1.txt
index 279a93e..1959cd0 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,4 +1,4 @@
-On 2011年11月09日 10:01, Wang Sheng-Hui wrote:
+On 2011a1'11ae??09ae?JPY 10:01, Wang Sheng-Hui wrote:
 > We have the following definition in memblock.h:
 > struct memblock_type {
 >     unsigned long cnt;  /* number of regions */
@@ -158,173 +158,3 @@ On 2011年11月09日 10:01, Wang Sheng-Hui wrote:
 >  		reg = &type->regions[i];
 
 Sorry, missed one line. Fixed it. New patch generated.
-
-
->From 35ba6e1cf87c670710282793025d5113865c4ef5 Mon Sep 17 00:00:00 2001
-From: Wang Sheng-Hui <shhuiw@gmail.com>
-Date: Wed, 9 Nov 2011 13:15:54 +0800
-Subject: [PATCH 2/2] cleanup: convert the int cnt to unsigned long in mm/memblock.c
-
-We have the following definition in memblock.h:
-struct memblock_type {
-    unsigned long cnt;  /* number of regions */
-    unsigned long max;  /* size of the allocated array */
-    struct memblock_region *regions;
-};
-
-But in memblock.c, some cnt/max vars are typed to int
-instead of unsigned long.
-This patch does the code cleanup.
-
-Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
----
- mm/memblock.c |   40 ++++++++++++++++++++++------------------
- 1 files changed, 22 insertions(+), 18 deletions(-)
-
-diff --git a/mm/memblock.c b/mm/memblock.c
-index 4d4d5ee..09ff05b 100644
---- a/mm/memblock.c
-+++ b/mm/memblock.c
-@@ -52,13 +52,14 @@ static phys_addr_t __init_memblock memblock_align_up(phys_addr_t addr, phys_addr
- 	return (addr + (size - 1)) & ~(size - 1);
- }
- 
--static unsigned long __init_memblock memblock_addrs_overlap(phys_addr_t base1, phys_addr_t size1,
--				       phys_addr_t base2, phys_addr_t size2)
-+static int __init_memblock memblock_addrs_overlap(phys_addr_t base1,
-+		phys_addr_t size1, phys_addr_t base2, phys_addr_t size2)
- {
- 	return ((base1 < (base2 + size2)) && (base2 < (base1 + size1)));
- }
- 
--long __init_memblock memblock_overlaps_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size)
-+long __init_memblock memblock_overlaps_region(struct memblock_type *type,
-+				       phys_addr_t base, phys_addr_t size)
- {
- 	unsigned long i;
- 
-@@ -111,7 +112,7 @@ static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_
- static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,
- 			phys_addr_t align, phys_addr_t start, phys_addr_t end)
- {
--	long i;
-+	unsigned long i;
- 
- 	BUG_ON(0 == size);
- 
-@@ -199,7 +200,8 @@ static long memblock_add_region(struct memblock_type *type, phys_addr_t base, ph
- static int __init_memblock memblock_double_array(struct memblock_type *type)
- {
- 	struct memblock_region *new_array, *old_array;
--	phys_addr_t old_size, new_size, addr;
-+	phys_addr_t addr;
-+	unsigned long old_size, new_size;
- 	int use_slab = slab_is_available();
- 
- 	/* We don't allow resizing until we know about the reserved regions
-@@ -277,7 +279,8 @@ static long __init_memblock memblock_add_region(struct memblock_type *type,
- 						phys_addr_t base, phys_addr_t size)
- {
- 	phys_addr_t end = base + size;
--	int i, slot = -1;
-+	long slot = -1;
-+	unsigned long i;
- 
- 	/* First try and coalesce this MEMBLOCK with others */
- 	for (i = 0; i < type->cnt; i++) {
-@@ -413,7 +416,7 @@ static long __init_memblock __memblock_remove(struct memblock_type *type,
- 					      phys_addr_t base, phys_addr_t size)
- {
- 	phys_addr_t end = base + size;
--	int i;
-+	unsigned long i;
- 
- 	/* Walk through the array for collisions */
- 	for (i = 0; i < type->cnt; i++) {
-@@ -583,7 +586,7 @@ static phys_addr_t __init memblock_alloc_nid_region(struct memblock_region *mp,
- phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align, int nid)
- {
- 	struct memblock_type *mem = &memblock.memory;
--	int i;
-+	unsigned long i;
- 
- 	BUG_ON(0 == size);
- 
-@@ -628,7 +631,7 @@ phys_addr_t __init memblock_phys_mem_size(void)
- 
- phys_addr_t __init_memblock memblock_end_of_DRAM(void)
- {
--	int idx = memblock.memory.cnt - 1;
-+	unsigned long idx = memblock.memory.cnt - 1;
- 
- 	return (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size);
- }
-@@ -674,12 +677,13 @@ void __init memblock_enforce_memory_limit(phys_addr_t memory_limit)
- 	}
- }
- 
--static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)
-+static long __init_memblock memblock_search(struct memblock_type *type,
-+					    phys_addr_t addr)
- {
--	unsigned int left = 0, right = type->cnt;
-+	unsigned long left = 0, right = type->cnt;
- 
- 	do {
--		unsigned int mid = (right + left) / 2;
-+		unsigned long mid = (right + left) / 2;
- 
- 		if (addr < type->regions[mid].base)
- 			right = mid;
-@@ -704,7 +708,7 @@ int __init_memblock memblock_is_memory(phys_addr_t addr)
- 
- int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
- {
--	int idx = memblock_search(&memblock.memory, base);
-+	long idx = memblock_search(&memblock.memory, base);
- 
- 	if (idx == -1)
- 		return 0;
-@@ -727,7 +731,7 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)
- static void __init_memblock memblock_dump(struct memblock_type *region, char *name)
- {
- 	unsigned long long base, size;
--	int i;
-+	unsigned long i;
- 
- 	pr_info(" %s.cnt  = 0x%lx\n", name, region->cnt);
- 
-@@ -735,7 +739,7 @@ static void __init_memblock memblock_dump(struct memblock_type *region, char *na
- 		base = region->regions[i].base;
- 		size = region->regions[i].size;
- 
--		pr_info(" %s[%#x]\t[%#016llx-%#016llx], %#llx bytes\n",
-+		pr_info(" %s[%#lx]\t[%#016llx-%#016llx], %#llx bytes\n",
- 		    name, i, base, base + size - 1, size);
- 	}
- }
-@@ -754,7 +758,7 @@ void __init_memblock memblock_dump_all(void)
- 
- void __init memblock_analyze(void)
- {
--	int i;
-+	unsigned long i;
- 
- 	/* Check marker in the unused last array entry */
- 	WARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base
-@@ -818,11 +822,11 @@ static int memblock_debug_show(struct seq_file *m, void *private)
- {
- 	struct memblock_type *type = m->private;
- 	struct memblock_region *reg;
--	int i;
-+	unsigned long i;
- 
- 	for (i = 0; i < type->cnt; i++) {
- 		reg = &type->regions[i];
--		seq_printf(m, "%4d: ", i);
-+		seq_printf(m, "%4ld: ", i);
- 		if (sizeof(phys_addr_t) == 4)
- 			seq_printf(m, "0x%08lx..0x%08lx\n",
- 				   (unsigned long)reg->base,
--- 
-1.7.1
diff --git a/a/content_digest b/N1/content_digest
index 6c60b3b..87a3e5f 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -7,7 +7,7 @@
  " linux-kernel@vger.kernel.org\0"
  "\00:1\0"
  "b\0"
- "On 2011\345\271\26411\346\234\21009\346\227\245 10:01, Wang Sheng-Hui wrote:\n"
+ "On 2011a1'11ae??09ae?JPY 10:01, Wang Sheng-Hui wrote:\n"
  "> We have the following definition in memblock.h:\n"
  "> struct memblock_type {\n"
  ">     unsigned long cnt;  /* number of regions */\n"
@@ -166,176 +166,6 @@
  ">  \tfor (i = 0; i < type->cnt; i++) {\n"
  ">  \t\treg = &type->regions[i];\n"
  "\n"
- "Sorry, missed one line. Fixed it. New patch generated.\n"
- "\n"
- "\n"
- ">From 35ba6e1cf87c670710282793025d5113865c4ef5 Mon Sep 17 00:00:00 2001\n"
- "From: Wang Sheng-Hui <shhuiw@gmail.com>\n"
- "Date: Wed, 9 Nov 2011 13:15:54 +0800\n"
- "Subject: [PATCH 2/2] cleanup: convert the int cnt to unsigned long in mm/memblock.c\n"
- "\n"
- "We have the following definition in memblock.h:\n"
- "struct memblock_type {\n"
- "    unsigned long cnt;  /* number of regions */\n"
- "    unsigned long max;  /* size of the allocated array */\n"
- "    struct memblock_region *regions;\n"
- "};\n"
- "\n"
- "But in memblock.c, some cnt/max vars are typed to int\n"
- "instead of unsigned long.\n"
- "This patch does the code cleanup.\n"
- "\n"
- "Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>\n"
- "---\n"
- " mm/memblock.c |   40 ++++++++++++++++++++++------------------\n"
- " 1 files changed, 22 insertions(+), 18 deletions(-)\n"
- "\n"
- "diff --git a/mm/memblock.c b/mm/memblock.c\n"
- "index 4d4d5ee..09ff05b 100644\n"
- "--- a/mm/memblock.c\n"
- "+++ b/mm/memblock.c\n"
- "@@ -52,13 +52,14 @@ static phys_addr_t __init_memblock memblock_align_up(phys_addr_t addr, phys_addr\n"
- " \treturn (addr + (size - 1)) & ~(size - 1);\n"
- " }\n"
- " \n"
- "-static unsigned long __init_memblock memblock_addrs_overlap(phys_addr_t base1, phys_addr_t size1,\n"
- "-\t\t\t\t       phys_addr_t base2, phys_addr_t size2)\n"
- "+static int __init_memblock memblock_addrs_overlap(phys_addr_t base1,\n"
- "+\t\tphys_addr_t size1, phys_addr_t base2, phys_addr_t size2)\n"
- " {\n"
- " \treturn ((base1 < (base2 + size2)) && (base2 < (base1 + size1)));\n"
- " }\n"
- " \n"
- "-long __init_memblock memblock_overlaps_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size)\n"
- "+long __init_memblock memblock_overlaps_region(struct memblock_type *type,\n"
- "+\t\t\t\t       phys_addr_t base, phys_addr_t size)\n"
- " {\n"
- " \tunsigned long i;\n"
- " \n"
- "@@ -111,7 +112,7 @@ static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_\n"
- " static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,\n"
- " \t\t\tphys_addr_t align, phys_addr_t start, phys_addr_t end)\n"
- " {\n"
- "-\tlong i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \tBUG_ON(0 == size);\n"
- " \n"
- "@@ -199,7 +200,8 @@ static long memblock_add_region(struct memblock_type *type, phys_addr_t base, ph\n"
- " static int __init_memblock memblock_double_array(struct memblock_type *type)\n"
- " {\n"
- " \tstruct memblock_region *new_array, *old_array;\n"
- "-\tphys_addr_t old_size, new_size, addr;\n"
- "+\tphys_addr_t addr;\n"
- "+\tunsigned long old_size, new_size;\n"
- " \tint use_slab = slab_is_available();\n"
- " \n"
- " \t/* We don't allow resizing until we know about the reserved regions\n"
- "@@ -277,7 +279,8 @@ static long __init_memblock memblock_add_region(struct memblock_type *type,\n"
- " \t\t\t\t\t\tphys_addr_t base, phys_addr_t size)\n"
- " {\n"
- " \tphys_addr_t end = base + size;\n"
- "-\tint i, slot = -1;\n"
- "+\tlong slot = -1;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \t/* First try and coalesce this MEMBLOCK with others */\n"
- " \tfor (i = 0; i < type->cnt; i++) {\n"
- "@@ -413,7 +416,7 @@ static long __init_memblock __memblock_remove(struct memblock_type *type,\n"
- " \t\t\t\t\t      phys_addr_t base, phys_addr_t size)\n"
- " {\n"
- " \tphys_addr_t end = base + size;\n"
- "-\tint i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \t/* Walk through the array for collisions */\n"
- " \tfor (i = 0; i < type->cnt; i++) {\n"
- "@@ -583,7 +586,7 @@ static phys_addr_t __init memblock_alloc_nid_region(struct memblock_region *mp,\n"
- " phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align, int nid)\n"
- " {\n"
- " \tstruct memblock_type *mem = &memblock.memory;\n"
- "-\tint i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \tBUG_ON(0 == size);\n"
- " \n"
- "@@ -628,7 +631,7 @@ phys_addr_t __init memblock_phys_mem_size(void)\n"
- " \n"
- " phys_addr_t __init_memblock memblock_end_of_DRAM(void)\n"
- " {\n"
- "-\tint idx = memblock.memory.cnt - 1;\n"
- "+\tunsigned long idx = memblock.memory.cnt - 1;\n"
- " \n"
- " \treturn (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size);\n"
- " }\n"
- "@@ -674,12 +677,13 @@ void __init memblock_enforce_memory_limit(phys_addr_t memory_limit)\n"
- " \t}\n"
- " }\n"
- " \n"
- "-static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)\n"
- "+static long __init_memblock memblock_search(struct memblock_type *type,\n"
- "+\t\t\t\t\t    phys_addr_t addr)\n"
- " {\n"
- "-\tunsigned int left = 0, right = type->cnt;\n"
- "+\tunsigned long left = 0, right = type->cnt;\n"
- " \n"
- " \tdo {\n"
- "-\t\tunsigned int mid = (right + left) / 2;\n"
- "+\t\tunsigned long mid = (right + left) / 2;\n"
- " \n"
- " \t\tif (addr < type->regions[mid].base)\n"
- " \t\t\tright = mid;\n"
- "@@ -704,7 +708,7 @@ int __init_memblock memblock_is_memory(phys_addr_t addr)\n"
- " \n"
- " int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)\n"
- " {\n"
- "-\tint idx = memblock_search(&memblock.memory, base);\n"
- "+\tlong idx = memblock_search(&memblock.memory, base);\n"
- " \n"
- " \tif (idx == -1)\n"
- " \t\treturn 0;\n"
- "@@ -727,7 +731,7 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)\n"
- " static void __init_memblock memblock_dump(struct memblock_type *region, char *name)\n"
- " {\n"
- " \tunsigned long long base, size;\n"
- "-\tint i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \tpr_info(\" %s.cnt  = 0x%lx\\n\", name, region->cnt);\n"
- " \n"
- "@@ -735,7 +739,7 @@ static void __init_memblock memblock_dump(struct memblock_type *region, char *na\n"
- " \t\tbase = region->regions[i].base;\n"
- " \t\tsize = region->regions[i].size;\n"
- " \n"
- "-\t\tpr_info(\" %s[%#x]\\t[%#016llx-%#016llx], %#llx bytes\\n\",\n"
- "+\t\tpr_info(\" %s[%#lx]\\t[%#016llx-%#016llx], %#llx bytes\\n\",\n"
- " \t\t    name, i, base, base + size - 1, size);\n"
- " \t}\n"
- " }\n"
- "@@ -754,7 +758,7 @@ void __init_memblock memblock_dump_all(void)\n"
- " \n"
- " void __init memblock_analyze(void)\n"
- " {\n"
- "-\tint i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \t/* Check marker in the unused last array entry */\n"
- " \tWARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base\n"
- "@@ -818,11 +822,11 @@ static int memblock_debug_show(struct seq_file *m, void *private)\n"
- " {\n"
- " \tstruct memblock_type *type = m->private;\n"
- " \tstruct memblock_region *reg;\n"
- "-\tint i;\n"
- "+\tunsigned long i;\n"
- " \n"
- " \tfor (i = 0; i < type->cnt; i++) {\n"
- " \t\treg = &type->regions[i];\n"
- "-\t\tseq_printf(m, \"%4d: \", i);\n"
- "+\t\tseq_printf(m, \"%4ld: \", i);\n"
- " \t\tif (sizeof(phys_addr_t) == 4)\n"
- " \t\t\tseq_printf(m, \"0x%08lx..0x%08lx\\n\",\n"
- " \t\t\t\t   (unsigned long)reg->base,\n"
- "-- \n"
- 1.7.1
+ Sorry, missed one line. Fixed it. New patch generated.
 
-13e159fb2f28eeba6f2d160bd47d77507b60e953a03743ed02b90e199d80e092
+545092d8fc1914755276b59acf79f91724964a1dff3237c75b8315eed7731a70

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.