Re: [PATCH v1 05/28] video: fbdev: aty: Fix W=1 warnings in atyfb_base

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

 



Hi Sam,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20201127]
[also build test ERROR on v5.10-rc5]
[cannot apply to tegra-drm/drm/tegra/for-next soc/for-next linus/master drm/drm-next v5.10-rc5 v5.10-rc4 v5.10-rc3]
[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/Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201128-040131
base:    6174f05255e65622ff3340257879a4c0f858b0df
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/5a1d55cc719a775ae6c8e96aab317cff47068071
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201128-040131
        git checkout 5a1d55cc719a775ae6c8e96aab317cff47068071
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/timex.h:61,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/compat.h:10,
                    from drivers/video/fbdev/aty/atyfb_base.c:51:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
     137 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
     137 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_init':
>> drivers/video/fbdev/aty/atyfb_base.c:2375:61: error: 'dac_type' undeclared (first use in this function)
    2375 |    dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type;
         |                                                             ^~~~~~~~
   drivers/video/fbdev/aty/atyfb_base.c:2375:61: note: each undeclared identifier is reported only once for each function it appears in

vim +/dac_type +2375 drivers/video/fbdev/aty/atyfb_base.c

1013d26663199f8 drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2005-11-07  2348  
48c68c4f1b54244 drivers/video/aty/atyfb_base.c       Greg Kroah-Hartman 2012-12-21  2349  static int aty_init(struct fb_info *info)
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2350  {
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2351  	struct atyfb_par *par = (struct atyfb_par *) info->par;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2352  	const char *ramname = NULL, *xtal;
1013d26663199f8 drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2005-11-07  2353  	int gtb_memsize, has_var = 0;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2354  	struct fb_var_screeninfo var;
89c69d2b8eb3ee2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2008-07-23  2355  	int ret;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2356  
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2357  	init_waitqueue_head(&par->vblank.wait);
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2358  	spin_lock_init(&par->int_lock);
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2359  
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2360  #ifdef CONFIG_FB_ATY_GX
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2361  	if (!M64_HAS(INTEGRATED)) {
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2362  		u32 stat0;
5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg       2020-11-27  2363  		u8 dac_subtype, clk_type;
fe86175bce50bc3 drivers/video/aty/atyfb_base.c       Randy Dunlap       2009-02-04  2364  		stat0 = aty_ld_le32(CNFG_STAT0, par);
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2365  		par->bus_type = (stat0 >> 0) & 0x07;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2366  		par->ram_type = (stat0 >> 3) & 0x07;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2367  		ramname = aty_gx_ram[par->ram_type];
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2368  		/* FIXME: clockchip/RAMDAC probing? */
5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg       2020-11-27  2369  		aty_ld_le32(DAC_CNTL, par);
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2370  #ifdef CONFIG_ATARI
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2371  		clk_type = CLK_ATI18818_1;
5a1d55cc719a775 drivers/video/fbdev/aty/atyfb_base.c Sam Ravnborg       2020-11-27  2372  		if (((stat0 >> 9) & 0x07) == 0x07)
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2373  			dac_subtype = DAC_ATT20C408;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2374  		else
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16 @2375  			dac_subtype = (aty_ld_8(SCRATCH_REG1 + 1, par) & 0xF0) | dac_type;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2376  #else
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2377  		dac_subtype = DAC_IBMRGB514;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2378  		clk_type = CLK_IBMRGB514;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2379  #endif
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2380  		switch (dac_subtype) {
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2381  		case DAC_IBMRGB514:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2382  			par->dac_ops = &aty_dac_ibm514;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2383  			break;
3a2842480bbef42 drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2007-05-08  2384  #ifdef CONFIG_ATARI
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2385  		case DAC_ATI68860_B:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2386  		case DAC_ATI68860_C:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2387  			par->dac_ops = &aty_dac_ati68860b;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2388  			break;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2389  		case DAC_ATT20C408:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2390  		case DAC_ATT21C498:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2391  			par->dac_ops = &aty_dac_att21c498;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2392  			break;
3a2842480bbef42 drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2007-05-08  2393  #endif
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2394  		default:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2395  			PRINTKI("aty_init: DAC type not implemented yet!\n");
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2396  			par->dac_ops = &aty_dac_unsupported;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2397  			break;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2398  		}
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2399  		switch (clk_type) {
0fa67f84f445e8c drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-06-26  2400  #ifdef CONFIG_ATARI
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2401  		case CLK_ATI18818_1:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2402  			par->pll_ops = &aty_pll_ati18818_1;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2403  			break;
0fa67f84f445e8c drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-06-26  2404  #else
eba87e8e8d7024d drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-03-27  2405  		case CLK_IBMRGB514:
eba87e8e8d7024d drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-03-27  2406  			par->pll_ops = &aty_pll_ibm514;
eba87e8e8d7024d drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-03-27  2407  			break;
eba87e8e8d7024d drivers/video/aty/atyfb_base.c       Antonino A. Daplas 2006-03-27  2408  #endif
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2409  		default:
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2410  			PRINTKI("aty_init: CLK type not implemented yet!");
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2411  			par->pll_ops = &aty_pll_unsupported;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2412  			break;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2413  		}
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2414  	}
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2415  #endif /* CONFIG_FB_ATY_GX */
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2416  #ifdef CONFIG_FB_ATY_CT
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2417  	if (M64_HAS(INTEGRATED)) {
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2418  		par->dac_ops = &aty_dac_ct;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2419  		par->pll_ops = &aty_pll_ct;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2420  		par->bus_type = PCI;
fe86175bce50bc3 drivers/video/aty/atyfb_base.c       Randy Dunlap       2009-02-04  2421  		par->ram_type = (aty_ld_le32(CNFG_STAT0, par) & 0x07);
ee905d0c58a440a drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-06-30  2422  		if (M64_HAS(XL_MEM))
ee905d0c58a440a drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-06-30  2423  			ramname = aty_xl_ram[par->ram_type];
ee905d0c58a440a drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-06-30  2424  		else
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2425  			ramname = aty_ct_ram[par->ram_type];
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2426  		/* for many chips, the mclk is 67 MHz for SDRAM, 63 MHz otherwise */
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2427  		if (par->pll_limits.mclk == 67 && par->ram_type < SDRAM)
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2428  			par->pll_limits.mclk = 63;
159dde93692ef54 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2429  		/* Mobility + 32bit memory interface need halved XCLK. */
159dde93692ef54 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2430  		if (M64_HAS(MOBIL_BUS) && par->ram_type == SDRAM32)
159dde93692ef54 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2431  			par->pll_limits.xclk = (par->pll_limits.xclk + 1) >> 1;
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2432  	}
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2433  #endif
c0887eedb4498e2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-06-27  2434  #ifdef CONFIG_PPC_PMAC
689620100172e24 drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-09-22  2435  	/*
689620100172e24 drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-09-22  2436  	 * The Apple iBook1 uses non-standard memory frequencies.
689620100172e24 drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-09-22  2437  	 * We detect it and set the frequency manually.
689620100172e24 drivers/video/aty/atyfb_base.c       Ville Syrjala      2009-09-22  2438  	 */
71a157e8edca551 drivers/video/aty/atyfb_base.c       Grant Likely       2010-02-01  2439  	if (of_machine_is_compatible("PowerBook2,1")) {
c0887eedb4498e2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-06-27  2440  		par->pll_limits.mclk = 70;
c0887eedb4498e2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-06-27  2441  		par->pll_limits.xclk = 53;
c0887eedb4498e2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-06-27  2442  	}
c0887eedb4498e2 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-06-27  2443  #endif
^1da177e4c3f415 drivers/video/aty/atyfb_base.c       Linus Torvalds     2005-04-16  2444  
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2445  	/* Allow command line to override clocks. */
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2446  	if (pll)
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2447  		par->pll_limits.pll_max = pll;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2448  	if (mclk)
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2449  		par->pll_limits.mclk = mclk;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2450  	if (xclk)
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2451  		par->pll_limits.xclk = xclk;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2452  
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2453  	aty_calc_mem_refresh(par, par->pll_limits.xclk);
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2454  	par->pll_per = 1000000/par->pll_limits.pll_max;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2455  	par->mclk_per = 1000000/par->pll_limits.mclk;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2456  	par->xclk_per = 1000000/par->pll_limits.xclk;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2457  
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2458  	par->ref_clk_per = 1000000000000ULL / 14318180;
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2459  	xtal = "14.31818";
b4e124c138558a0 drivers/video/aty/atyfb_base.c       Ville Syrjala      2007-05-08  2460  

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

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