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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202108031744.g063aSQs-lkp@intel.com>
Date:   Tue, 3 Aug 2021 17:14:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mason Zhang <Mason.Zhang@...iatek.com>,
        Mark Brown <broonie@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>
Cc:     kbuild-all@...ts.01.org, Laxman Dewangan <ldewangan@...dia.com>,
        linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, wsd_upstream@...iatek.com,
        Mason Zhang <Mason.Zhang@...iatek.com>
Subject: Re: [PATCH 1/1] spi: tegra114: Fix set_cs_timing param

Hi Mason,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on spi/for-next]
[also build test ERROR on v5.14-rc4 next-20210802]
[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/Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.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/8920b64abf63231756f3910e4954bdda80d01257
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mason-Zhang/spi-tegra114-Fix-set_cs_timing-param/20210803-103149
        git checkout 8920b64abf63231756f3910e4954bdda80d01257
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/ drivers/spi/

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

All errors (new ones prefixed by >>):

   drivers/spi/spi-tegra114.c: In function 'tegra_spi_set_hw_cs_timing':
>> drivers/spi/spi-tegra114.c:723:32: error: 'struct spi_device' has no member named 'cs_setup'
     723 |  struct spi_delay *setup = &spi->cs_setup;
         |                                ^~
>> drivers/spi/spi-tegra114.c:724:31: error: 'struct spi_device' has no member named 'cs_hold'
     724 |  struct spi_delay *hold = &spi->cs_hold;
         |                               ^~
>> drivers/spi/spi-tegra114.c:725:35: error: 'struct spi_device' has no member named 'cs_inactive'
     725 |  struct spi_delay *inactive = &spi->cs_inactive;
         |                                   ^~
   drivers/spi/spi-tegra114.c: In function 'tegra_spi_probe':
>> drivers/spi/spi-tegra114.c:1328:24: error: assignment to 'int (*)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
    1328 |  master->set_cs_timing = tegra_spi_set_hw_cs_timing;
         |                        ^
   cc1: some warnings being treated as errors


vim +723 drivers/spi/spi-tegra114.c

   719	
   720	static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
   721	{
   722		struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master);
 > 723		struct spi_delay *setup = &spi->cs_setup;
 > 724		struct spi_delay *hold = &spi->cs_hold;
 > 725		struct spi_delay *inactive = &spi->cs_inactive;
   726		u8 setup_dly, hold_dly, inactive_dly;
   727		u32 setup_hold;
   728		u32 spi_cs_timing;
   729		u32 inactive_cycles;
   730		u8 cs_state;
   731	
   732		if ((setup && setup->unit != SPI_DELAY_UNIT_SCK) ||
   733		    (hold && hold->unit != SPI_DELAY_UNIT_SCK) ||
   734		    (inactive && inactive->unit != SPI_DELAY_UNIT_SCK)) {
   735			dev_err(&spi->dev,
   736				"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
   737				SPI_DELAY_UNIT_SCK);
   738			return -EINVAL;
   739		}
   740	
   741		setup_dly = setup ? setup->value : 0;
   742		hold_dly = hold ? hold->value : 0;
   743		inactive_dly = inactive ? inactive->value : 0;
   744	
   745		setup_dly = min_t(u8, setup_dly, MAX_SETUP_HOLD_CYCLES);
   746		hold_dly = min_t(u8, hold_dly, MAX_SETUP_HOLD_CYCLES);
   747		if (setup_dly && hold_dly) {
   748			setup_hold = SPI_SETUP_HOLD(setup_dly - 1, hold_dly - 1);
   749			spi_cs_timing = SPI_CS_SETUP_HOLD(tspi->spi_cs_timing1,
   750							  spi->chip_select,
   751							  setup_hold);
   752			if (tspi->spi_cs_timing1 != spi_cs_timing) {
   753				tspi->spi_cs_timing1 = spi_cs_timing;
   754				tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING1);
   755			}
   756		}
   757	
   758		inactive_cycles = min_t(u8, inactive_dly, MAX_INACTIVE_CYCLES);
   759		if (inactive_cycles)
   760			inactive_cycles--;
   761		cs_state = inactive_cycles ? 0 : 1;
   762		spi_cs_timing = tspi->spi_cs_timing2;
   763		SPI_SET_CS_ACTIVE_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
   764						  cs_state);
   765		SPI_SET_CYCLES_BETWEEN_PACKETS(spi_cs_timing, spi->chip_select,
   766					       inactive_cycles);
   767		if (tspi->spi_cs_timing2 != spi_cs_timing) {
   768			tspi->spi_cs_timing2 = spi_cs_timing;
   769			tegra_spi_writel(tspi, spi_cs_timing, SPI_CS_TIMING2);
   770		}
   771	
   772		return 0;
   773	}
   774	

---
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" (60677 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ