Re: [PATCH v5 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations

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

 



Hi Changbin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc5 next-20180517]
[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/changbin-du-intel-com/kernel-hacking-GCC-optimization-for-better-debug-experience-Og/20180512-001150
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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
        make.cross ARCH=arm64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/video/fbdev/i740fb.c: In function 'i740_calc_fifo.isra.0':
>> drivers/video/fbdev/i740fb.c:331:9: warning: 'wm' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return wm;
            ^~
--
   drivers/pci/host/pci-xgene.c: In function 'xgene_pcie_setup_ib_reg':
>> drivers/pci/host/pci-xgene.c:532:2: warning: 'pim_reg' may be used uninitialized in this function [-Wmaybe-uninitialized]
     xgene_pcie_setup_pims(port, pim_reg, pci_addr, ~(size - 1));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/wm +331 drivers/video/fbdev/i740fb.c

5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  207  
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  208  static u32 i740_calc_fifo(struct i740fb_par *par, u32 freq, int bpp)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  209  {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  210  	/*
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  211  	 * Would like to calculate these values automatically, but a generic
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  212  	 * algorithm does not seem possible.  Note: These FIFO water mark
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  213  	 * values were tested on several cards and seem to eliminate the
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  214  	 * all of the snow and vertical banding, but fine adjustments will
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  215  	 * probably be required for other cards.
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  216  	 */
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  217  
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  218  	u32 wm;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  219  
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  220  	switch (bpp) {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  221  	case 8:
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  222  		if	(freq > 200)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  223  			wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  224  		else if (freq > 175)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  225  			wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  226  		else if (freq > 135)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  227  			wm = 0x120E0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  228  		else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  229  			wm = 0x100D0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  230  		break;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  231  	case 15:
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  232  	case 16:
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  233  		if (par->has_sgram) {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  234  			if	(freq > 140)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  235  				wm = 0x2C1D0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  236  			else if (freq > 120)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  237  				wm = 0x2C180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  238  			else if (freq > 100)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  239  				wm = 0x24160000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  240  			else if (freq >  90)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  241  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  242  			else if (freq >  50)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  243  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  244  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  245  				wm = 0x13100000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  246  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  247  				wm = 0x120E0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  248  		} else {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  249  			if	(freq > 160)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  250  				wm = 0x28200000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  251  			else if (freq > 140)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  252  				wm = 0x2A1E0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  253  			else if (freq > 130)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  254  				wm = 0x2B1A0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  255  			else if (freq > 120)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  256  				wm = 0x2C180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  257  			else if (freq > 100)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  258  				wm = 0x24180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  259  			else if (freq >  90)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  260  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  261  			else if (freq >  50)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  262  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  263  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  264  				wm = 0x13100000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  265  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  266  				wm = 0x120E0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  267  		}
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  268  		break;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  269  	case 24:
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  270  		if (par->has_sgram) {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  271  			if	(freq > 130)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  272  				wm = 0x31200000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  273  			else if (freq > 120)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  274  				wm = 0x2E200000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  275  			else if (freq > 100)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  276  				wm = 0x2C1D0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  277  			else if (freq >  80)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  278  				wm = 0x25180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  279  			else if (freq >  64)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  280  				wm = 0x24160000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  281  			else if (freq >  49)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  282  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  283  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  284  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  285  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  286  				wm = 0x13100000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  287  		} else {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  288  			if	(freq > 120)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  289  				wm = 0x311F0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  290  			else if (freq > 100)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  291  				wm = 0x2C1D0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  292  			else if (freq >  80)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  293  				wm = 0x25180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  294  			else if (freq >  64)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  295  				wm = 0x24160000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  296  			else if (freq >  49)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  297  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  298  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  299  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  300  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  301  				wm = 0x13100000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  302  		}
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  303  		break;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  304  	case 32:
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  305  		if (par->has_sgram) {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  306  			if	(freq >  80)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  307  				wm = 0x2A200000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  308  			else if (freq >  60)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  309  				wm = 0x281A0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  310  			else if (freq >  49)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  311  				wm = 0x25180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  312  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  313  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  314  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  315  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  316  		} else {
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  317  			if	(freq >  80)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  318  				wm = 0x29200000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  319  			else if (freq >  60)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  320  				wm = 0x281A0000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  321  			else if (freq >  49)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  322  				wm = 0x25180000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  323  			else if (freq >  32)
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  324  				wm = 0x18120000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  325  			else
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  326  				wm = 0x16110000;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  327  		}
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  328  		break;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  329  	}
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  330  
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10 @331  	return wm;
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  332  }
5350c65f drivers/video/i740fb.c Ondrej Zary 2012-02-10  333  

:::::: The code at line 331 was first introduced by commit
:::::: 5350c65f4f15bbc111ffa629130d3f32cdd4ccf6 Resurrect Intel740 driver: i740fb

:::::: TO: Ondrej Zary <linux@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux