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: <202108100125.xwHO5q48-lkp@intel.com>
Date:   Tue, 10 Aug 2021 01:11:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Zhengxun Li <zhengxunli@...c.com.tw>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: [broonie-misc:spi-5.15 22/23] drivers/spi/spi-mxic.c:403:4: warning:
 misleading indentation; statement is not part of the previous 'if'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git spi-5.15
head:   5c842e51ac63130a1344650b0a95bdc398666947
commit: d05aaa66ba3ca3fdc2b5cd774ff218deb238b352 [22/23] spi: mxic: patch for octal DTR mode support
config: riscv-buildonly-randconfig-r001-20210809 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c5c3cdb9c92895a63993cee70d2dd776ff9519c3)
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://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=d05aaa66ba3ca3fdc2b5cd774ff218deb238b352
        git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
        git fetch --no-tags broonie-misc spi-5.15
        git checkout d05aaa66ba3ca3fdc2b5cd774ff218deb238b352
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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/spi/spi-mxic.c:403:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
                           if (op->data.dtr)
                           ^
   drivers/spi/spi-mxic.c:401:3: note: previous statement is here
                   if (op->data.dir == SPI_MEM_DATA_IN)
                   ^
   1 warning generated.


vim +/if +403 drivers/spi/spi-mxic.c

   359	
   360	static int mxic_spi_mem_exec_op(struct spi_mem *mem,
   361					const struct spi_mem_op *op)
   362	{
   363		struct mxic_spi *mxic = spi_master_get_devdata(mem->spi->master);
   364		int nio = 1, i, ret;
   365		u32 ss_ctrl;
   366		u8 addr[8], cmd[2];
   367	
   368		ret = mxic_spi_set_freq(mxic, mem->spi->max_speed_hz);
   369		if (ret)
   370			return ret;
   371	
   372		if (mem->spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL))
   373			nio = 8;
   374		else if (mem->spi->mode & (SPI_TX_QUAD | SPI_RX_QUAD))
   375			nio = 4;
   376		else if (mem->spi->mode & (SPI_TX_DUAL | SPI_RX_DUAL))
   377			nio = 2;
   378	
   379		writel(HC_CFG_NIO(nio) |
   380		       HC_CFG_TYPE(mem->spi->chip_select, HC_CFG_TYPE_SPI_NOR) |
   381		       HC_CFG_SLV_ACT(mem->spi->chip_select) | HC_CFG_IDLE_SIO_LVL(1) |
   382		       HC_CFG_MAN_CS_EN,
   383		       mxic->regs + HC_CFG);
   384		writel(HC_EN_BIT, mxic->regs + HC_EN);
   385	
   386		ss_ctrl = OP_CMD_BYTES(op->cmd.nbytes) |
   387			  OP_CMD_BUSW(fls(op->cmd.buswidth) - 1) |
   388			  (op->cmd.dtr ? OP_CMD_DDR : 0);
   389	
   390		if (op->addr.nbytes)
   391			ss_ctrl |= OP_ADDR_BYTES(op->addr.nbytes) |
   392				   OP_ADDR_BUSW(fls(op->addr.buswidth) - 1) |
   393				   (op->addr.dtr ? OP_ADDR_DDR : 0);
   394	
   395		if (op->dummy.nbytes)
   396			ss_ctrl |= OP_DUMMY_CYC(op->dummy.nbytes);
   397	
   398		if (op->data.nbytes) {
   399			ss_ctrl |= OP_DATA_BUSW(fls(op->data.buswidth) - 1) |
   400				   (op->data.dtr ? OP_DATA_DDR : 0);
   401			if (op->data.dir == SPI_MEM_DATA_IN)
   402				ss_ctrl |= OP_READ;
 > 403				if (op->data.dtr)
   404					ss_ctrl |= OP_DQS_EN;
   405		}
   406	
   407		writel(ss_ctrl, mxic->regs + SS_CTRL(mem->spi->chip_select));
   408	
   409		writel(readl(mxic->regs + HC_CFG) | HC_CFG_MAN_CS_ASSERT,
   410		       mxic->regs + HC_CFG);
   411	
   412		for (i = 0; i < op->cmd.nbytes; i++)
   413			cmd[i] = op->cmd.opcode >> (8 * (op->cmd.nbytes - i - 1));
   414	
   415		ret = mxic_spi_data_xfer(mxic, cmd, NULL, op->cmd.nbytes);
   416		if (ret)
   417			goto out;
   418	
   419		for (i = 0; i < op->addr.nbytes; i++)
   420			addr[i] = op->addr.val >> (8 * (op->addr.nbytes - i - 1));
   421	
   422		ret = mxic_spi_data_xfer(mxic, addr, NULL, op->addr.nbytes);
   423		if (ret)
   424			goto out;
   425	
   426		ret = mxic_spi_data_xfer(mxic, NULL, NULL, op->dummy.nbytes);
   427		if (ret)
   428			goto out;
   429	
   430		ret = mxic_spi_data_xfer(mxic,
   431					 op->data.dir == SPI_MEM_DATA_OUT ?
   432					 op->data.buf.out : NULL,
   433					 op->data.dir == SPI_MEM_DATA_IN ?
   434					 op->data.buf.in : NULL,
   435					 op->data.nbytes);
   436	
   437	out:
   438		writel(readl(mxic->regs + HC_CFG) & ~HC_CFG_MAN_CS_ASSERT,
   439		       mxic->regs + HC_CFG);
   440		writel(0, mxic->regs + HC_EN);
   441	
   442		return ret;
   443	}
   444	

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

Download attachment ".config.gz" of type "application/gzip" (28206 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ