mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: KarimAllah Ahmed <karahmed@amazon.de>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: arch/x86/kernel/e820.c:88:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool
Date: Thu, 27 Jun 2019 10:52:53 +0800	[thread overview]
Message-ID: <201906271045.dTM7ZVZU%lkp@intel.com> (raw)

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

                 reply	other threads:[~2019-06-27  2:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201906271045.dTM7ZVZU%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=karahmed@amazon.de \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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®