linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/spi/spi-mtk-snfi.c:1168: warning: Function parameter or member 'op' not described in 'mtk_snand_is_page_ops'
@ 2023-12-19 23:54 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-12-19 23:54 UTC (permalink / raw)
  To: Chuanhong Guo; +Cc: oe-kbuild-all, linux-kernel, Mark Brown

Hi Chuanhong,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   55cb5f43689d7a9ea5bf35ef050f12334f197347
commit: 764f1b7481645b2b4488eda26c4da7f331697e6b spi: add driver for MTK SPI NAND Flash Interface
date:   1 year, 8 months ago
config: i386-buildonly-randconfig-005-20231101 (https://download.01.org/0day-ci/archive/20231220/202312200721.rhknT3zL-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231220/202312200721.rhknT3zL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312200721.rhknT3zL-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/spi/spi-mtk-snfi.c:1168: warning: Function parameter or member 'op' not described in 'mtk_snand_is_page_ops'


vim +1168 drivers/spi/spi-mtk-snfi.c

  1154	
  1155	/**
  1156	 * mtk_snand_is_page_ops() - check if the op is a controller supported page op.
  1157	 * @op spi-mem op to check
  1158	 *
  1159	 * Check whether op can be executed with read_from_cache or program_load
  1160	 * mode in the controller.
  1161	 * This controller can execute typical Read From Cache and Program Load
  1162	 * instructions found on SPI-NAND with 2-byte address.
  1163	 * DTR and cmd buswidth & nbytes should be checked before calling this.
  1164	 *
  1165	 * Return: true if the op matches the instruction template
  1166	 */
  1167	static bool mtk_snand_is_page_ops(const struct spi_mem_op *op)
> 1168	{
  1169		if (op->addr.nbytes != 2)
  1170			return false;
  1171	
  1172		if (op->addr.buswidth != 1 && op->addr.buswidth != 2 &&
  1173		    op->addr.buswidth != 4)
  1174			return false;
  1175	
  1176		// match read from page instructions
  1177		if (op->data.dir == SPI_MEM_DATA_IN) {
  1178			// check dummy cycle first
  1179			if (op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth >
  1180			    DATA_READ_MAX_DUMMY)
  1181				return false;
  1182			// quad io / quad out
  1183			if ((op->addr.buswidth == 4 || op->addr.buswidth == 1) &&
  1184			    op->data.buswidth == 4)
  1185				return true;
  1186	
  1187			// dual io / dual out
  1188			if ((op->addr.buswidth == 2 || op->addr.buswidth == 1) &&
  1189			    op->data.buswidth == 2)
  1190				return true;
  1191	
  1192			// standard spi
  1193			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
  1194				return true;
  1195		} else if (op->data.dir == SPI_MEM_DATA_OUT) {
  1196			// check dummy cycle first
  1197			if (op->dummy.nbytes)
  1198				return false;
  1199			// program load quad out
  1200			if (op->addr.buswidth == 1 && op->data.buswidth == 4)
  1201				return true;
  1202			// standard spi
  1203			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
  1204				return true;
  1205		}
  1206		return false;
  1207	}
  1208	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/spi/spi-mtk-snfi.c:1168: warning: Function parameter or member 'op' not described in 'mtk_snand_is_page_ops'
@ 2023-09-11 22:40 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-09-11 22:40 UTC (permalink / raw)
  To: Chuanhong Guo; +Cc: oe-kbuild-all, linux-kernel, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0bb80ecc33a8fb5a682236443c1e740d5c917d1d
commit: 764f1b7481645b2b4488eda26c4da7f331697e6b spi: add driver for MTK SPI NAND Flash Interface
date:   1 year, 5 months ago
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20230912/202309120607.CST7vQDG-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309120607.CST7vQDG-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309120607.CST7vQDG-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/spi/spi-mtk-snfi.c:1168: warning: Function parameter or member 'op' not described in 'mtk_snand_is_page_ops'


vim +1168 drivers/spi/spi-mtk-snfi.c

  1154	
  1155	/**
  1156	 * mtk_snand_is_page_ops() - check if the op is a controller supported page op.
  1157	 * @op spi-mem op to check
  1158	 *
  1159	 * Check whether op can be executed with read_from_cache or program_load
  1160	 * mode in the controller.
  1161	 * This controller can execute typical Read From Cache and Program Load
  1162	 * instructions found on SPI-NAND with 2-byte address.
  1163	 * DTR and cmd buswidth & nbytes should be checked before calling this.
  1164	 *
  1165	 * Return: true if the op matches the instruction template
  1166	 */
  1167	static bool mtk_snand_is_page_ops(const struct spi_mem_op *op)
> 1168	{
  1169		if (op->addr.nbytes != 2)
  1170			return false;
  1171	
  1172		if (op->addr.buswidth != 1 && op->addr.buswidth != 2 &&
  1173		    op->addr.buswidth != 4)
  1174			return false;
  1175	
  1176		// match read from page instructions
  1177		if (op->data.dir == SPI_MEM_DATA_IN) {
  1178			// check dummy cycle first
  1179			if (op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth >
  1180			    DATA_READ_MAX_DUMMY)
  1181				return false;
  1182			// quad io / quad out
  1183			if ((op->addr.buswidth == 4 || op->addr.buswidth == 1) &&
  1184			    op->data.buswidth == 4)
  1185				return true;
  1186	
  1187			// dual io / dual out
  1188			if ((op->addr.buswidth == 2 || op->addr.buswidth == 1) &&
  1189			    op->data.buswidth == 2)
  1190				return true;
  1191	
  1192			// standard spi
  1193			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
  1194				return true;
  1195		} else if (op->data.dir == SPI_MEM_DATA_OUT) {
  1196			// check dummy cycle first
  1197			if (op->dummy.nbytes)
  1198				return false;
  1199			// program load quad out
  1200			if (op->addr.buswidth == 1 && op->data.buswidth == 4)
  1201				return true;
  1202			// standard spi
  1203			if (op->addr.buswidth == 1 && op->data.buswidth == 1)
  1204				return true;
  1205		}
  1206		return false;
  1207	}
  1208	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-19 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 23:54 drivers/spi/spi-mtk-snfi.c:1168: warning: Function parameter or member 'op' not described in 'mtk_snand_is_page_ops' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-09-11 22:40 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).