public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Ville Syrjälä " <ville.syrjala@linux.intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [vsyrjala:remap_tile_ys_64 18/30] drivers/gpu/drm/i915/i915_vma.c:968:1: error: conflicting types for 'add_pages'
Date: Fri, 10 Apr 2026 13:06:03 +0800	[thread overview]
Message-ID: <202604090255.YqkfAme7-lkp@intel.com> (raw)

tree:   https://github.com/vsyrjala/linux.git remap_tile_ys_64
head:   9a8f5dc5c6e5da24a2df0e93fda770ab217b0886
commit: 539e2225c8d7e19d4095bace6c48ec8d3d434e93 [18/30] drm/i915/vma: Extract add_pages()
config: x86_64-randconfig-015-20260408 (https://download.01.org/0day-ci/archive/20260409/202604090255.YqkfAme7-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260409/202604090255.YqkfAme7-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/202604090255.YqkfAme7-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/i915_vma.c:968:1: error: conflicting types for 'add_pages'
     968 | add_pages(dma_addr_t addr, unsigned int count,
         | ^
   include/linux/memory_hotplug.h:153:5: note: previous declaration is here
     153 | int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
         |     ^
>> drivers/gpu/drm/i915/i915_vma.c:989:29: error: incompatible pointer to integer conversion passing 'struct sg_table *' to parameter of type 'unsigned long' [-Wint-conversion]
     989 |         return add_pages(0, count, st, sg);
         |                                    ^~
   include/linux/memory_hotplug.h:153:63: note: passing argument to parameter 'nr_pages' here
     153 | int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
         |                                                               ^
>> drivers/gpu/drm/i915/i915_vma.c:989:33: error: incompatible pointer types passing 'struct scatterlist *' to parameter of type 'struct mhp_params *' [-Werror,-Wincompatible-pointer-types]
     989 |         return add_pages(0, count, st, sg);
         |                                        ^~
   include/linux/memory_hotplug.h:154:27: note: passing argument to parameter 'params' here
     154 |               struct mhp_params *params);
         |                                  ^
>> drivers/gpu/drm/i915/i915_vma.c:989:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct scatterlist *' [-Wint-conversion]
     989 |         return add_pages(0, count, st, sg);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_vma.c:1028:28: error: incompatible pointer to integer conversion passing 'struct sg_table *' to parameter of type 'unsigned long' [-Wint-conversion]
    1028 |                         sg = add_pages(addr, 1, st, sg);
         |                                                 ^~
   include/linux/memory_hotplug.h:153:63: note: passing argument to parameter 'nr_pages' here
     153 | int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
         |                                                               ^
   drivers/gpu/drm/i915/i915_vma.c:1028:32: error: incompatible pointer types passing 'struct scatterlist *' to parameter of type 'struct mhp_params *' [-Werror,-Wincompatible-pointer-types]
    1028 |                         sg = add_pages(addr, 1, st, sg);
         |                                                     ^~
   include/linux/memory_hotplug.h:154:27: note: passing argument to parameter 'params' here
     154 |               struct mhp_params *params);
         |                                  ^
>> drivers/gpu/drm/i915/i915_vma.c:1028:7: error: incompatible integer to pointer conversion assigning to 'struct scatterlist *' from 'int' [-Wint-conversion]
    1028 |                         sg = add_pages(addr, 1, st, sg);
         |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_vma.c:1139:47: error: incompatible pointer to integer conversion passing 'struct sg_table *' to parameter of type 'unsigned long' [-Wint-conversion]
    1139 |                         sg = add_pages(addr, length >> PAGE_SHIFT, st, sg);
         |                                                                    ^~
   include/linux/memory_hotplug.h:153:63: note: passing argument to parameter 'nr_pages' here
     153 | int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
         |                                                               ^
   drivers/gpu/drm/i915/i915_vma.c:1139:51: error: incompatible pointer types passing 'struct scatterlist *' to parameter of type 'struct mhp_params *' [-Werror,-Wincompatible-pointer-types]
    1139 |                         sg = add_pages(addr, length >> PAGE_SHIFT, st, sg);
         |                                                                        ^~
   include/linux/memory_hotplug.h:154:27: note: passing argument to parameter 'params' here
     154 |               struct mhp_params *params);
         |                                  ^
   drivers/gpu/drm/i915/i915_vma.c:1139:7: error: incompatible integer to pointer conversion assigning to 'struct scatterlist *' from 'int' [-Wint-conversion]
    1139 |                         sg = add_pages(addr, length >> PAGE_SHIFT, st, sg);
         |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   10 errors generated.


vim +/add_pages +968 drivers/gpu/drm/i915/i915_vma.c

   966	
   967	static struct scatterlist *
 > 968	add_pages(dma_addr_t addr, unsigned int count,
   969		  struct sg_table *st, struct scatterlist *sg)
   970	{
   971		st->nents++;
   972	
   973		sg_set_page(sg, NULL, count * I915_GTT_PAGE_SIZE, 0);
   974		sg_dma_address(sg) = addr;
   975		sg_dma_len(sg) = count * I915_GTT_PAGE_SIZE;
   976	
   977		return sg_next(sg);
   978	}
   979	
   980	static struct scatterlist *
   981	add_padding_pages(unsigned int count,
   982			  struct sg_table *st, struct scatterlist *sg)
   983	{
   984		/*
   985		 * The DE ignores the PTEs for the padding tiles, the sg entry
   986		 * here is just a convenience to indicate how many padding PTEs
   987		 * to insert at this spot.
   988		 */
 > 989		return add_pages(0, count, st, sg);
   990	}
   991	
   992	static struct scatterlist *
   993	rotate_tiled_color_plane_pages(const struct intel_remapped_plane_info *plane,
   994				       struct drm_i915_gem_object *obj,
   995				       unsigned int alignment_pad,
   996				       struct sg_table *st, struct scatterlist *sg,
   997				       unsigned int *gtt_offset)
   998	{
   999		unsigned int offset = plane->offset;
  1000		unsigned int width = plane->width;
  1001		unsigned int height = plane->height;
  1002		unsigned int src_stride = plane->src_stride;
  1003		unsigned int dst_stride = plane->dst_stride;
  1004		unsigned int column, row;
  1005		pgoff_t src_idx;
  1006	
  1007		if (!width || !height)
  1008			return sg;
  1009	
  1010		if (alignment_pad)
  1011			sg = add_padding_pages(alignment_pad, st, sg);
  1012	
  1013		for (column = 0; column < width; column++) {
  1014			unsigned int left;
  1015	
  1016			src_idx = src_stride * (height - 1) + column + offset;
  1017			for (row = 0; row < height; row++) {
  1018				dma_addr_t addr;
  1019	
  1020				/*
  1021				 * We don't need the pages, but need to initialize
  1022				 * the entries so the sg list can be happily traversed.
  1023				 * The only thing we need are DMA addresses.
  1024				 */
  1025	
  1026				addr = i915_gem_object_get_dma_address(obj, src_idx);
  1027	
> 1028				sg = add_pages(addr, 1, st, sg);
  1029	
  1030				src_idx -= src_stride;
  1031			}
  1032	
  1033			left = (dst_stride - height) * I915_GTT_PAGE_SIZE;
  1034	
  1035			if (!left)
  1036				continue;
  1037	
  1038			sg = add_padding_pages(left >> PAGE_SHIFT, st, sg);
  1039		}
  1040	
  1041		*gtt_offset += alignment_pad + dst_stride * width;
  1042	
  1043		return sg;
  1044	}
  1045	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-04-10  5:06 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=202604090255.YqkfAme7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ville.syrjala@linux.intel.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