mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Minchan Kim <minchan@kernel.org>,
	sumit.semwal@linaro.org, john.stultz@linaro.org
Cc: kbuild-all@lists.01.org, LKML <linux-kernel@vger.kernel.org>,
	surenb@google.com, hridya@google.com, joaodias@google.com,
	Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] dma-buf: system_heap: do not warn for costly allocation
Date: Thu, 11 Feb 2021 05:12:50 +0800	[thread overview]
Message-ID: <202102110537.LVdiQE6j-lkp@intel.com> (raw)
In-Reply-To: <20210210162632.3903128-1-minchan@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3290 bytes --]

Hi Minchan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Minchan-Kim/dma-buf-system_heap-do-not-warn-for-costly-allocation/20210211-003048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
config: i386-randconfig-s002-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-215-g0fb77bb6-dirty
        # https://github.com/0day-ci/linux/commit/28176611ddc50d5d84aa71679f32b0b22dbf4b1c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Minchan-Kim/dma-buf-system_heap-do-not-warn-for-costly-allocation/20210211-003048
        git checkout 28176611ddc50d5d84aa71679f32b0b22dbf4b1c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/dma-buf/heaps/system_heap.c:327:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long gfp_flags @@     got restricted gfp_t @@
   drivers/dma-buf/heaps/system_heap.c:327:27: sparse:     expected unsigned long gfp_flags
   drivers/dma-buf/heaps/system_heap.c:327:27: sparse:     got restricted gfp_t
>> drivers/dma-buf/heaps/system_heap.c:329:35: sparse: sparse: invalid assignment: |=
>> drivers/dma-buf/heaps/system_heap.c:329:35: sparse:    left side has type unsigned long
>> drivers/dma-buf/heaps/system_heap.c:329:35: sparse:    right side has type restricted gfp_t
>> drivers/dma-buf/heaps/system_heap.c:331:36: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted gfp_t [usertype] gfp_mask @@     got unsigned long gfp_flags @@
   drivers/dma-buf/heaps/system_heap.c:331:36: sparse:     expected restricted gfp_t [usertype] gfp_mask
   drivers/dma-buf/heaps/system_heap.c:331:36: sparse:     got unsigned long gfp_flags

vim +327 drivers/dma-buf/heaps/system_heap.c

   313	
   314	static struct page *alloc_largest_available(unsigned long size,
   315						    unsigned int max_order)
   316	{
   317		struct page *page;
   318		unsigned long gfp_flags;
   319		int i;
   320	
   321		for (i = 0; i < NUM_ORDERS; i++) {
   322			if (size <  (PAGE_SIZE << orders[i]))
   323				continue;
   324			if (max_order < orders[i])
   325				continue;
   326	
 > 327			gfp_flags = order_flags[i];
   328			if (orders[i] > PAGE_ALLOC_COSTLY_ORDER)
 > 329				gfp_flags |= __GFP_NOWARN;
   330	
 > 331			page = alloc_pages(gfp_flags, orders[i]);
   332			if (!page)
   333				continue;
   334			return page;
   335		}
   336		return NULL;
   337	}
   338	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34719 bytes --]

      parent reply	other threads:[~2021-02-10 21:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 16:26 Minchan Kim
2021-02-10 17:24 ` Suren Baghdasaryan
2021-02-10 17:41   ` Minchan Kim
2021-02-10 17:32 ` John Stultz
2021-02-10 17:48   ` Minchan Kim
2021-02-10 21:40     ` John Stultz
2021-02-10 23:17       ` Minchan Kim
2021-02-11  2:14         ` John Stultz
2021-02-11  2:30           ` Minchan Kim
2021-02-10 21:12 ` kernel test robot [this message]

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=202102110537.LVdiQE6j-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hridya@google.com \
    --cc=joaodias@google.com \
    --cc=john.stultz@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=surenb@google.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®