The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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-next20260309 14/19] mm/mmu_gather.c:25:46: warning: comparison of distinct pointer types lacks a cast
Date: Wed, 11 Mar 2026 11:05:30 +0800	[thread overview]
Message-ID: <202603111157.7Sj2sANh-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20260309
head:   e9c10f65a9dba55b2ab308e88aeb068d775d1a65
commit: f51f62a26a08681ba34f2d3e8df8395c91ecd8c1 [14/19] mm/mmu_gather: avoid dozens of -Wflex-array-member-not-at-end warnings
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20260311/202603111157.7Sj2sANh-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260311/202603111157.7Sj2sANh-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/202603111157.7Sj2sANh-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/mmu_gather.c: In function 'tlb_next_batch':
>> mm/mmu_gather.c:25:46: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
      25 |         if (tlb->delayed_rmap && tlb->active != &tlb->local)
         |                                              ^~


vim +25 mm/mmu_gather.c

952a31c9e6fa963 Martin Schwidefsky 2018-09-18  19  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  20  static bool tlb_next_batch(struct mmu_gather *tlb)
196d9d8bb71deaa Peter Zijlstra     2018-09-03  21  {
196d9d8bb71deaa Peter Zijlstra     2018-09-03  22  	struct mmu_gather_batch *batch;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  23  
c47454823bd4e3a Linus Torvalds     2022-12-06  24  	/* Limit batching if we have delayed rmaps pending */
c47454823bd4e3a Linus Torvalds     2022-12-06 @25  	if (tlb->delayed_rmap && tlb->active != &tlb->local)
5df397dec7c4c08 Linus Torvalds     2022-11-09  26  		return false;
5df397dec7c4c08 Linus Torvalds     2022-11-09  27  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  28  	batch = tlb->active;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  29  	if (batch->next) {
196d9d8bb71deaa Peter Zijlstra     2018-09-03  30  		tlb->active = batch->next;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  31  		return true;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  32  	}
196d9d8bb71deaa Peter Zijlstra     2018-09-03  33  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  34  	if (tlb->batch_count == MAX_GATHER_BATCH_COUNT)
196d9d8bb71deaa Peter Zijlstra     2018-09-03  35  		return false;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  36  
adf085ff0d6fde5 Qianfeng Rong      2025-08-12  37  	batch = (void *)__get_free_page(GFP_NOWAIT);
196d9d8bb71deaa Peter Zijlstra     2018-09-03  38  	if (!batch)
196d9d8bb71deaa Peter Zijlstra     2018-09-03  39  		return false;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  40  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  41  	tlb->batch_count++;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  42  	batch->next = NULL;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  43  	batch->nr   = 0;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  44  	batch->max  = MAX_GATHER_BATCH;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  45  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  46  	tlb->active->next = batch;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  47  	tlb->active = batch;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  48  
196d9d8bb71deaa Peter Zijlstra     2018-09-03  49  	return true;
196d9d8bb71deaa Peter Zijlstra     2018-09-03  50  }
196d9d8bb71deaa Peter Zijlstra     2018-09-03  51  

:::::: The code at line 25 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:[~2026-03-11  3:05 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=202603111157.7Sj2sANh-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox