Re: [PATCH v2 08/15] drm/fbconv: Add plane-state check and update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.4-rc3 next-20191014]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/DRM-fbconv-helpers-for-converting-fbdev-drivers/20191015-152231
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from arch/mips/include/asm/div64.h:12:0,
                    from include/linux/kernel.h:18,
                    from include/asm-generic/bug.h:19,
                    from arch/mips/include/asm/bug.h:42,
                    from include/linux/bug.h:5,
                    from arch/mips/include/asm/cmpxchg.h:11,
                    from arch/mips/include/asm/atomic.h:22,
                    from include/linux/atomic.h:7,
                    from include/linux/kgdb.h:18,
                    from include/linux/fb.h:5,
                    from drivers/gpu/drm/drm_fbconv_helper.c:5:
   drivers/gpu/drm/drm_fbconv_helper.c: In function 'drm_fbconv_update_fb_var_screeninfo_from_framebuffer':
   include/asm-generic/div64.h:226:28: warning: comparison of distinct pointer types lacks a cast
     (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                               ^
>> drivers/gpu/drm/drm_fbconv_helper.c:899:2: note: in expansion of macro 'do_div'
     do_div(width, cpp);
     ^~~~~~
   In file included from include/uapi/linux/swab.h:6:0,
                    from include/linux/swab.h:5,
                    from include/uapi/linux/byteorder/big_endian.h:13,
                    from include/linux/byteorder/big_endian.h:5,
                    from arch/mips/include/uapi/asm/byteorder.h:13,
                    from drivers/gpu/drm/drm_fbconv_helper.c:3:
   include/asm-generic/div64.h:239:25: warning: right shift count >= width of type [-Wshift-count-overflow]
     } else if (likely(((n) >> 32) == 0)) {  \
                            ^
   include/linux/compiler.h:77:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
>> drivers/gpu/drm/drm_fbconv_helper.c:899:2: note: in expansion of macro 'do_div'
     do_div(width, cpp);
     ^~~~~~
   In file included from arch/mips/include/asm/div64.h:12:0,
                    from include/linux/kernel.h:18,
                    from include/asm-generic/bug.h:19,
                    from arch/mips/include/asm/bug.h:42,
                    from include/linux/bug.h:5,
                    from arch/mips/include/asm/cmpxchg.h:11,
                    from arch/mips/include/asm/atomic.h:22,
                    from include/linux/atomic.h:7,
                    from include/linux/kgdb.h:18,
                    from include/linux/fb.h:5,
                    from drivers/gpu/drm/drm_fbconv_helper.c:5:
   include/asm-generic/div64.h:243:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __rem = __div64_32(&(n), __base); \
                         ^
>> drivers/gpu/drm/drm_fbconv_helper.c:899:2: note: in expansion of macro 'do_div'
     do_div(width, cpp);
     ^~~~~~
   include/asm-generic/div64.h:217:17: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'unsigned int *'
    extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
                    ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/do_div +899 drivers/gpu/drm/drm_fbconv_helper.c

   883	
   884	static int drm_fbconv_update_fb_var_screeninfo_from_framebuffer(
   885		struct fb_var_screeninfo *fb_var, struct drm_framebuffer *fb,
   886		size_t vram_size)
   887	{
   888		unsigned int width, pitch;
   889		uint64_t cpp, lines;
   890		int ret;
   891	
   892		/* Our virtual screen covers all the graphics memory (sans some
   893		 * trailing bytes). This allows for setting the scanout buffer's
   894		 * address with fb_pan_display().
   895		 */
   896	
   897		width = fb->pitches[0];
   898		cpp = fb->format[0].cpp[0];
 > 899		do_div(width, cpp);
   900	
   901		if (width > (__u32)-1)
   902			return -EINVAL; /* would overflow fb_var->xres_virtual */
   903	
   904		pitch = fb->pitches[0];
   905		lines = vram_size;
   906		do_div(lines, pitch);
   907	
   908		if (lines > (__u32)-1)
   909			return -EINVAL; /* would overflow fb_var->yres_virtual */
   910	
   911		fb_var->xres_virtual = width;
   912		fb_var->yres_virtual = lines;
   913	
   914		ret = drm_fbconv_update_fb_var_screeninfo_from_format(
   915			fb_var, fb->format[0].format);
   916		if (ret)
   917			return ret;
   918	
   919		return 0;
   920	}
   921	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux