lkml.org 
[lkml]   [2019]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/x86/kernel/e820.c:88:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 249155c20f9b0754bc1b932a33344cfb4e0c2101
commit: 0c55671f84fffe591e8435c93a8c83286fd6b8eb kvm, x86: Properly check whether a pfn is an MMIO or not
date: 8 weeks ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> arch/x86/kernel/e820.c:88:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool

vim +/_e820__mapped_any +88 arch/x86/kernel/e820.c

b79cd8f1 Yinghai Lu 2008-05-11 71
b79cd8f1 Yinghai Lu 2008-05-11 72 /*
b79cd8f1 Yinghai Lu 2008-05-11 73 * This function checks if any part of the range <start,end> is mapped
b79cd8f1 Yinghai Lu 2008-05-11 74 * with type.
b79cd8f1 Yinghai Lu 2008-05-11 75 */
0c55671f KarimAllah Ahmed 2019-01-31 76 static bool _e820__mapped_any(struct e820_table *table,
0c55671f KarimAllah Ahmed 2019-01-31 77 u64 start, u64 end, enum e820_type type)
b79cd8f1 Yinghai Lu 2008-05-11 78 {
b79cd8f1 Yinghai Lu 2008-05-11 79 int i;
b79cd8f1 Yinghai Lu 2008-05-11 80
0c55671f KarimAllah Ahmed 2019-01-31 81 for (i = 0; i < table->nr_entries; i++) {
0c55671f KarimAllah Ahmed 2019-01-31 82 struct e820_entry *entry = &table->entries[i];
b79cd8f1 Yinghai Lu 2008-05-11 83
e5540f87 Ingo Molnar 2017-01-28 84 if (type && entry->type != type)
b79cd8f1 Yinghai Lu 2008-05-11 85 continue;
e5540f87 Ingo Molnar 2017-01-28 86 if (entry->addr >= end || entry->addr + entry->size <= start)
b79cd8f1 Yinghai Lu 2008-05-11 87 continue;
b79cd8f1 Yinghai Lu 2008-05-11 @88 return 1;
b79cd8f1 Yinghai Lu 2008-05-11 89 }
b79cd8f1 Yinghai Lu 2008-05-11 90 return 0;
b79cd8f1 Yinghai Lu 2008-05-11 91 }
0c55671f KarimAllah Ahmed 2019-01-31 92

:::::: The code at line 88 was first introduced by commit
:::::: b79cd8f1268bab57ff85b19d131f7f23deab2dee x86: make e820.c to have common functions

:::::: TO: Yinghai Lu <yhlu.kernel@gmail.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

\
 
 \ /
  Last update: 2019-06-27 04:55    [W:0.143 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site