lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112071510.Udt7cE6h-lkp@intel.com>
Date:   Tue, 7 Dec 2021 15:57:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Vinod Koul <vkoul@...nel.org>
Subject: drivers/dma/dw-edma/dw-edma-v0-core.c:192:19: warning: unused
 function 'readq_ch'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: e0c1d53891c43a70c9fa85ddb3174ab5afd7e2ec dmaengine: dw-edma: Add support for the HDMA feature
date:   9 months ago
config: mips-buildonly-randconfig-r004-20211207 (https://download.01.org/0day-ci/archive/20211207/202112071510.Udt7cE6h-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f50be8eb0a12a61d23db6cda452c693001d76898)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e0c1d53891c43a70c9fa85ddb3174ab5afd7e2ec
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e0c1d53891c43a70c9fa85ddb3174ab5afd7e2ec
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/mm/ drivers/dma/dw-edma/ drivers/video/fbdev/savage/

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

All warnings (new ones prefixed by >>):

>> drivers/dma/dw-edma/dw-edma-v0-core.c:192:19: warning: unused function 'readq_ch'
   static inline u64 readq_ch(struct dw_edma enum dw_edma_dir dir, u16 ch,
   ^
   fatal error: error in backend: Nested variants found in inline asm string: '.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/barrier.h", .line = 16, $); 0x00 ) != -1)) : $))) ) && ( (1 << 0) ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif'
   clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
   clang version 14.0.0 (git://gitmirror/llvm_project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
   Target: mips64el-unknown-linux
   Thread model: posix
   InstalledDir: /opt/cross/clang-097a1cb1d5/bin
   clang-14: note: diagnostic msg:
   Makefile arch drivers include kernel nr_bisected scripts source usr


vim +/readq_ch +192 drivers/dma/dw-edma/dw-edma-v0-core.c

04e0a39fc10f82 Gustavo Pimentel 2021-02-18  191  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18 @192  static inline u64 readq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch,
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  193  			   const void __iomem *addr)
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  194  {
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  195  	u32 value;
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  196  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  197  	if (dw->mf == EDMA_MF_EDMA_LEGACY) {
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  198  		u32 viewport_sel;
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  199  		unsigned long flags;
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  200  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  201  		raw_spin_lock_irqsave(&dw->lock, flags);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  202  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  203  		viewport_sel = FIELD_PREP(EDMA_V0_VIEWPORT_MASK, ch);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  204  		if (dir == EDMA_DIR_READ)
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  205  			viewport_sel |= BIT(31);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  206  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  207  		writel(viewport_sel,
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  208  		       &(__dw_regs(dw)->type.legacy.viewport_sel));
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  209  		value = readq(addr);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  210  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  211  		raw_spin_unlock_irqrestore(&dw->lock, flags);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  212  	} else {
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  213  		value = readq(addr);
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  214  	}
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  215  
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  216  	return value;
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  217  }
04e0a39fc10f82 Gustavo Pimentel 2021-02-18  218  

:::::: The code at line 192 was first introduced by commit
:::::: 04e0a39fc10f82a71b84af73351333b184cee578 dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures

:::::: TO: Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>
:::::: CC: Vinod Koul <vkoul@...nel.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ