[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201905241644.hwjMD1Rf%lkp@intel.com>
Date: Fri, 24 May 2019 16:28:20 +0800
From: kbuild test robot <lkp@...el.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc: kbuild-all@...org, linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support
Hi Bartlomiej,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.2-rc1 next-20190524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Bartlomiej-Zolnierkiewicz/video-fbdev-pvr2fb-remove-function-prototypes/20190524-145925
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/video//fbdev/pvr2fb.c: In function 'pvr2_get_param':
>> drivers/video//fbdev/pvr2fb.c:737:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return (int)p[i].name;
^
In file included from include/linux/kernel.h:15:0,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/video//fbdev/pvr2fb.c:48:
drivers/video//fbdev/pvr2fb.c: In function 'pvr2fb_common_init':
>> drivers/video//fbdev/pvr2fb.c:823:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(char *)pvr2_get_param(cables, NULL, cable_type, 3),
^
include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
>> drivers/video//fbdev/pvr2fb.c:819:2: note: in expansion of macro 'fb_info'
fb_info(fb_info, "Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
^~~~~~~
drivers/video//fbdev/pvr2fb.c:824:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(char *)pvr2_get_param(outputs, NULL, video_output, 3));
^
include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
>> drivers/video//fbdev/pvr2fb.c:819:2: note: in expansion of macro 'fb_info'
fb_info(fb_info, "Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
^~~~~~~
sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/pvr2fb.c:1050:11: sparse: sparse: Using plain integer as NULL pointer
>> drivers/video/fbdev/pvr2fb.c:737:46: sparse: sparse: non size-preserving pointer to integer cast
>> drivers/video/fbdev/pvr2fb.c:819:9: sparse: sparse: non size-preserving integer to pointer cast
>> drivers/video/fbdev/pvr2fb.c:819:9: sparse: sparse: non size-preserving integer to pointer cast
vim +/fb_info +819 drivers/video//fbdev/pvr2fb.c
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 725
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 726 static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val,
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 727 int size)
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 728 {
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 729 int i;
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 730
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 731 for (i = 0 ; i < size ; i++ ) {
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 732 if (s != NULL) {
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 733 if (!strncasecmp(p[i].name, s, strlen(s)))
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 734 return p[i].val;
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 735 } else {
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 736 if (p[i].val == val)
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 @737 return (int)p[i].name;
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 738 }
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 739 }
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 740 return -1;
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 741 }
970866e8 drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 742
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 743 /**
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 744 * pvr2fb_common_init
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 745 *
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 746 * Common init code for the PVR2 chips.
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 747 *
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 748 * This mostly takes care of the common aspects of the fb setup and
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 749 * registration. It's expected that the board-specific init code has
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 750 * already setup pvr2_fix with something meaningful at this point.
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 751 *
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 752 * Device info reporting is also done here, as well as picking a sane
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 753 * default from the modedb. For board-specific modelines, simply define
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 754 * a per-board modedb.
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 755 *
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 756 * Also worth noting is that the cable and video output types are likely
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 757 * always going to be VGA for the PCI-based PVR2 boards, but we leave this
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 758 * in for flexibility anyways. Who knows, maybe someone has tv-out on a
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 759 * PCI-based version of these things ;-)
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 760 */
c76c323b drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 761 static int __maybe_unused pvr2fb_common_init(void)
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 762 {
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 763 struct pvr2fb_par *par = currentpar;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 764 unsigned long modememused, rev;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 765
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 766 fb_info->screen_base = ioremap_nocache(pvr2_fix.smem_start,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 767 pvr2_fix.smem_len);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 768
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 769 if (!fb_info->screen_base) {
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 770 printk(KERN_ERR "pvr2fb: Failed to remap smem space\n");
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 771 goto out_err;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 772 }
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 773
c76c323b drivers/video/fbdev/pvr2fb.c Bartlomiej Zolnierkiewicz 2019-05-22 774 par->mmio_base = ioremap_nocache(pvr2_fix.mmio_start,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 775 pvr2_fix.mmio_len);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 776 if (!par->mmio_base) {
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 777 printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 778 goto out_err;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 779 }
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 780
d2b06a8b drivers/video/pvr2fb.c Paul Mundt 2006-09-27 781 fb_memset(fb_info->screen_base, 0, pvr2_fix.smem_len);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 782
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 783 pvr2_fix.ypanstep = nopan ? 0 : 1;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 784 pvr2_fix.ywrapstep = nowrap ? 0 : 1;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 785
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 786 fb_info->fbops = &pvr2fb_ops;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 787 fb_info->fix = pvr2_fix;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 788 fb_info->par = currentpar;
9cd1c674 drivers/video/pvr2fb.c Antonino A. Daplas 2007-08-10 789 fb_info->pseudo_palette = currentpar->palette;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 790 fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 791
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 792 if (video_output == VO_VGA)
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 793 defmode = DEFMODE_VGA;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 794
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 795 if (!mode_option)
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 796 mode_option = "640x480@60";
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 797
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 798 if (!fb_find_mode(&fb_info->var, fb_info, mode_option, pvr2_modedb,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 799 NUM_TOTAL_MODES, &pvr2_modedb[defmode], 16))
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 800 fb_info->var = pvr2_var;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 801
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 802 fb_alloc_cmap(&fb_info->cmap, 256, 0);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 803
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 804 if (register_framebuffer(fb_info) < 0)
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 805 goto out_err;
306c869c drivers/video/pvr2fb.c Adrian McMenamin 2007-08-10 806 /*Must write PIXDEPTH to register before anything is displayed - so force init */
306c869c drivers/video/pvr2fb.c Adrian McMenamin 2007-08-10 807 pvr2_init_display(fb_info);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 808
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 809 modememused = get_line_length(fb_info->var.xres_virtual,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 810 fb_info->var.bits_per_pixel);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 811 modememused *= fb_info->var.yres_virtual;
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 812
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 813 rev = fb_readl(par->mmio_base + 0x04);
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 814
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 815 fb_info(fb_info, "%s (rev %ld.%ld) frame buffer device, using %ldk/%ldk of video memory\n",
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 816 fb_info->fix.id, (rev >> 4) & 0x0f, rev & 0x0f,
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 817 modememused >> 10,
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 818 (unsigned long)(fb_info->fix.smem_len >> 10));
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 @819 fb_info(fb_info, "Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
31b6780c drivers/video/pvr2fb.c Joe Perches 2013-09-19 820 fb_info->var.xres, fb_info->var.yres,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 821 fb_info->var.bits_per_pixel,
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 822 get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel),
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 @823 (char *)pvr2_get_param(cables, NULL, cable_type, 3),
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 824 (char *)pvr2_get_param(outputs, NULL, video_output, 3));
^1da177e drivers/video/pvr2fb.c Linus Torvalds 2005-04-16 825
:::::: The code at line 819 was first introduced by commit
:::::: 31b6780c15a4e3a90fe260e977f5186772ce7afb framebuffer: Use fb_<level>
:::::: TO: Joe Perches <joe@...ches.com>
:::::: CC: Tomi Valkeinen <tomi.valkeinen@...com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (69493 bytes)
Powered by blists - more mailing lists