* [freescale-fslc:6.6-1.0.x-imx 5708/11728] drivers/media/platform/nxp/dwc-mipi-csi2.c:550:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations
@ 2024-04-28 7:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-28 7:03 UTC (permalink / raw)
To: Otavio Salvador; +Cc: oe-kbuild-all
tree: https://github.com/Freescale/linux-fslc 6.6-1.0.x-imx
head: 37770f55ac9c4f6cd958eb5544939207eed8478f
commit: 082dd12f8b589393f5227c2d64e358da78bd6f35 [5708/11728] LF-10587-05: media: nxp: add DesignWare MIPI CSI controller driver
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240428/202404281552.CipN0zra-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404281552.CipN0zra-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/202404281552.CipN0zra-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/media/platform/nxp/dwc-mipi-csi2.c:10:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/media/platform/nxp/dwc-mipi-csi2.c:10:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/media/platform/nxp/dwc-mipi-csi2.c:10:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:337:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/media/platform/nxp/dwc-mipi-csi2.c:15:
In file included from include/linux/phy/phy.h:17:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:20:
In file included from include/linux/mm.h:2168:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/media/platform/nxp/dwc-mipi-csi2.c:550:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
550 | val = CSI2RX_PPI_PG_PATTERN_HRES_HRES(format->width);
| ^
drivers/media/platform/nxp/dwc-mipi-csi2.c:117:45: note: expanded from macro 'CSI2RX_PPI_PG_PATTERN_HRES_HRES'
117 | #define CSI2RX_PPI_PG_PATTERN_HRES_HRES(x) FIELD_PREP(GENMASK(15, 0), (x))
| ^
drivers/media/platform/nxp/dwc-mipi-csi2.c:610:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
610 | val = CSI2RX_IPI_DATA_TYPE_DT(csi_fmt->data_type);
| ^
drivers/media/platform/nxp/dwc-mipi-csi2.c:151:38: note: expanded from macro 'CSI2RX_IPI_DATA_TYPE_DT'
151 | #define CSI2RX_IPI_DATA_TYPE_DT(x) FIELD_PREP(GENMASK(5, 0), (x))
| ^
7 warnings and 2 errors generated.
vim +/FIELD_PREP +550 drivers/media/platform/nxp/dwc-mipi-csi2.c
524
525 /* -----------------------------------------------------------------------------
526 * DWC MIPI CSI-2 Host Controller Hardware operation
527 */
528
529 static int dwc_csi_device_pg_enable(struct dwc_csi_device *csidev)
530 {
531 const struct dwc_csi_pix_format *csi_fmt = csidev->csi_fmt;
532 struct v4l2_mbus_framefmt *format;
533 u32 val;
534
535 if (!csidev->pg_enable)
536 return 0;
537
538 if (!csi_fmt) {
539 dev_err(csidev->dev, "CSI pixel format is NULL\n");
540 return -EINVAL;
541 }
542
543 format = &csidev->format_mbus[DWC_CSI2RX_PAD_SINK];
544
545 if (csi_fmt->data_type != MIPI_CSI2_DT_RGB888) {
546 dev_err(csidev->dev, "Pattern generator only support RGB888\n");
547 return -EINVAL;
548 }
549
> 550 val = CSI2RX_PPI_PG_PATTERN_HRES_HRES(format->width);
551 dwc_csi_write(csidev, CSI2RX_PPI_PG_PATTERN_HRES, val);
552
553 val = CSI2RX_PPI_PG_PATTERN_VRES_VRES(format->height);
554 dwc_csi_write(csidev, CSI2RX_PPI_PG_PATTERN_VRES, val);
555
556 val = CSI2RX_PPI_PG_CONFIG_DATA_TYPE(csi_fmt->data_type);
557 val |= CSI2RX_PPI_PG_CONFIG_VIR_CHAN(0);
558 val |= CSI2RX_PPI_PG_CONFIG_PG_MODE(csidev->pg_pattern);
559 dwc_csi_write(csidev, CSI2RX_PPI_PG_CONFIG, val);
560
561 /*
562 * Select line start packets to construct vertical
563 * timing information for IPI interface
564 **/
565 val = CSI2RX_IPI_ADV_FEATURES_SYNC_EVENT_MODE;
566 val |= CSI2RX_IPI_ADV_FEATURES_SYNC_LS_PKT;
567 val |= CSI2RX_IPI_ADV_FEATURES_LINE_EVENT_SEL;
568 dwc_csi_write(csidev, CSI2RX_IPI_ADV_FEATURES, val);
569
570 val = CSI2RX_PPI_PG_ENABLE_EN;
571 dwc_csi_write(csidev, CSI2RX_PPI_PG_ENABLE, val);
572
573 return 0;
574 }
575
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-28 7:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 7:03 [freescale-fslc:6.6-1.0.x-imx 5708/11728] drivers/media/platform/nxp/dwc-mipi-csi2.c:550:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.