From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [gustavoars:testing/WFAMNAE-next20240223 1/1] mm/mmu_gather.c:23:39: warning: comparison of distinct pointer types ('struct mmu_gather_batch *' and 'struct mmu_gather_batch_hdr *')
Date: Sun, 25 Feb 2024 20:27:15 +0800 [thread overview]
Message-ID: <202402252018.GR2eyulM-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/WFAMNAE-next20240223
head: b23fc9e6ff31f4ef9e8de5580963cf53579ef0d4
commit: b23fc9e6ff31f4ef9e8de5580963cf53579ef0d4 [1/1] treewide: Address -Wflexible-array-member-not-at-end warnings
config: x86_64-randconfig-161-20240225 (https://download.01.org/0day-ci/archive/20240225/202402252018.GR2eyulM-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240225/202402252018.GR2eyulM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402252018.GR2eyulM-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/mmu_gather.c:23:39: warning: comparison of distinct pointer types ('struct mmu_gather_batch *' and 'struct mmu_gather_batch_hdr *') [-Wcompare-distinct-pointer-types]
23 | if (tlb->delayed_rmap && tlb->active != &tlb->local)
| ~~~~~~~~~~~ ^ ~~~~~~~~~~~
mm/mmu_gather.c:148:13: error: incompatible pointer types assigning to 'struct mmu_gather_batch *' from 'struct mmu_gather_batch_hdr *' [-Werror,-Wincompatible-pointer-types]
148 | for (batch = &tlb->local; batch && batch->nr; batch = batch->next)
| ^ ~~~~~~~~~~~
mm/mmu_gather.c:150:14: error: incompatible pointer types assigning to 'struct mmu_gather_batch *' from 'struct mmu_gather_batch_hdr *' [-Werror,-Wincompatible-pointer-types]
150 | tlb->active = &tlb->local;
| ^ ~~~~~~~~~~~
mm/mmu_gather.c:387:18: error: incompatible pointer types assigning to 'struct mmu_gather_batch *' from 'struct mmu_gather_batch_hdr *' [-Werror,-Wincompatible-pointer-types]
387 | tlb->active = &tlb->local;
| ^ ~~~~~~~~~~~
1 warning and 3 errors generated.
vim +23 mm/mmu_gather.c
952a31c9e6fa96 Martin Schwidefsky 2018-09-18 17
196d9d8bb71dea Peter Zijlstra 2018-09-03 18 static bool tlb_next_batch(struct mmu_gather *tlb)
196d9d8bb71dea Peter Zijlstra 2018-09-03 19 {
196d9d8bb71dea Peter Zijlstra 2018-09-03 20 struct mmu_gather_batch *batch;
196d9d8bb71dea Peter Zijlstra 2018-09-03 21
c47454823bd4e3 Linus Torvalds 2022-12-06 22 /* Limit batching if we have delayed rmaps pending */
c47454823bd4e3 Linus Torvalds 2022-12-06 @23 if (tlb->delayed_rmap && tlb->active != &tlb->local)
5df397dec7c4c0 Linus Torvalds 2022-11-09 24 return false;
5df397dec7c4c0 Linus Torvalds 2022-11-09 25
196d9d8bb71dea Peter Zijlstra 2018-09-03 26 batch = tlb->active;
196d9d8bb71dea Peter Zijlstra 2018-09-03 27 if (batch->next) {
196d9d8bb71dea Peter Zijlstra 2018-09-03 28 tlb->active = batch->next;
196d9d8bb71dea Peter Zijlstra 2018-09-03 29 return true;
196d9d8bb71dea Peter Zijlstra 2018-09-03 30 }
196d9d8bb71dea Peter Zijlstra 2018-09-03 31
196d9d8bb71dea Peter Zijlstra 2018-09-03 32 if (tlb->batch_count == MAX_GATHER_BATCH_COUNT)
196d9d8bb71dea Peter Zijlstra 2018-09-03 33 return false;
196d9d8bb71dea Peter Zijlstra 2018-09-03 34
dcc1be119071f0 Lorenzo Stoakes 2023-03-13 35 batch = (void *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
196d9d8bb71dea Peter Zijlstra 2018-09-03 36 if (!batch)
196d9d8bb71dea Peter Zijlstra 2018-09-03 37 return false;
196d9d8bb71dea Peter Zijlstra 2018-09-03 38
196d9d8bb71dea Peter Zijlstra 2018-09-03 39 tlb->batch_count++;
196d9d8bb71dea Peter Zijlstra 2018-09-03 40 batch->next = NULL;
196d9d8bb71dea Peter Zijlstra 2018-09-03 41 batch->nr = 0;
196d9d8bb71dea Peter Zijlstra 2018-09-03 42 batch->max = MAX_GATHER_BATCH;
196d9d8bb71dea Peter Zijlstra 2018-09-03 43
196d9d8bb71dea Peter Zijlstra 2018-09-03 44 tlb->active->next = batch;
196d9d8bb71dea Peter Zijlstra 2018-09-03 45 tlb->active = batch;
196d9d8bb71dea Peter Zijlstra 2018-09-03 46
196d9d8bb71dea Peter Zijlstra 2018-09-03 47 return true;
196d9d8bb71dea Peter Zijlstra 2018-09-03 48 }
196d9d8bb71dea Peter Zijlstra 2018-09-03 49
:::::: The code at line 23 was first introduced by commit
:::::: c47454823bd4e3ab34ed3f795afd4479ab938a3f mm: mmu_gather: allow more than one batch of delayed rmaps
:::::: TO: Linus Torvalds <torvalds@linux-foundation.org>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-02-25 12:27 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=202402252018.GR2eyulM-lkp@intel.com \
--to=lkp@intel.com \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.