drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:34:6: warning: no previous prototype for 'ia_css_isys_ibuf_rmgr_init'

From: kernel test robot
Date: Wed Dec 09 2020 - 02:47:50 EST


Hi Mauro,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a68a0262abdaa251e12c53715f48e698a18ef402
commit: 5b552b198c2557295becd471bff53bb520fefee5 media: atomisp: re-enable warnings again
date: 6 months ago
config: i386-randconfig-a003-20200826 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5b552b198c2557295becd471bff53bb520fefee5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5b552b198c2557295becd471bff53bb520fefee5
# save the attached .config to linux build tree
make W=1 ARCH=i386

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

All warnings (new ones prefixed by >>):

cc1: warning: drivers/staging/media/atomisp//pci/hive_isp_css_include/memory_access/: No such file or directory [-Wmissing-include-dirs]
>> drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:34:6: warning: no previous prototype for 'ia_css_isys_ibuf_rmgr_init' [-Wmissing-prototypes]
34 | void ia_css_isys_ibuf_rmgr_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:40:6: warning: no previous prototype for 'ia_css_isys_ibuf_rmgr_uninit' [-Wmissing-prototypes]
40 | void ia_css_isys_ibuf_rmgr_uninit(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:46:6: warning: no previous prototype for 'ia_css_isys_ibuf_rmgr_acquire' [-Wmissing-prototypes]
46 | bool ia_css_isys_ibuf_rmgr_acquire(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:106:6: warning: no previous prototype for 'ia_css_isys_ibuf_rmgr_release' [-Wmissing-prototypes]
106 | void ia_css_isys_ibuf_rmgr_release(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/media/atomisp//pci/input_system_local.h:10,
from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_system.h:34,
from drivers/staging/media/atomisp//pci/runtime/isys/interface/ia_css_isys.h:20,
from drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:20:
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:402:26: warning: 'SUB_SYSTEM_OFFSET' defined but not used [-Wunused-const-variable=]
402 | static const hrt_address SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:391:30: warning: 'MIPI_PORT_LANES' defined but not used [-Wunused-const-variable=]
391 | static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:380:19: warning: 'MIPI_PORT_ACTIVE' defined but not used [-Wunused-const-variable=]
380 | static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:374:30: warning: 'MIPI_PORT_MAXLANES' defined but not used [-Wunused-const-variable=]
374 | static const mipi_lane_cfg_t MIPI_PORT_MAXLANES[N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:368:26: warning: 'MIPI_PORT_OFFSET' defined but not used [-Wunused-const-variable=]
368 | static const hrt_address MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~~
In file included from drivers/staging/media/atomisp//pci/system_local.h:10,
from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_system.h:33,
from drivers/staging/media/atomisp//pci/runtime/isys/interface/ia_css_isys.h:20,
from drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c:20:
drivers/staging/media/atomisp//pci/isp2400_system_local.h:178:26: warning: 'RX_BASE' defined but not used [-Wunused-const-variable=]
178 | static const hrt_address RX_BASE[N_RX_ID] = {
| ^~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:163:26: warning: 'INPUT_SYSTEM_BASE' defined but not used [-Wunused-const-variable=]
163 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:155:26: warning: 'INPUT_FORMATTER_BASE' defined but not used [-Wunused-const-variable=]
155 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:150:26: warning: 'TIMED_CTRL_BASE' defined but not used [-Wunused-const-variable=]
150 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
| ^~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:145:26: warning: 'GPIO_BASE' defined but not used [-Wunused-const-variable=]
145 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
| ^~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:142:26: warning: 'GP_TIMER_BASE' defined but not used [-Wunused-const-variable=]
142 | static const hrt_address GP_TIMER_BASE =
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:135:26: warning: 'GP_DEVICE_BASE' defined but not used [-Wunused-const-variable=]
135 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:122:26: warning: 'FIFO_MONITOR_BASE' defined but not used [-Wunused-const-variable=]
122 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:116:26: warning: 'GDC_BASE' defined but not used [-Wunused-const-variable=]
116 | static const hrt_address GDC_BASE[N_GDC_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:104:26: warning: 'IRQ_BASE' defined but not used [-Wunused-const-variable=]
104 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:99:26: warning: 'DMA_BASE' defined but not used [-Wunused-const-variable=]
99 | static const hrt_address DMA_BASE[N_DMA_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:90:26: warning: 'MMU_BASE' defined but not used [-Wunused-const-variable=]
90 | static const hrt_address MMU_BASE[N_MMU_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:80:26: warning: 'SP_PMEM_BASE' defined but not used [-Wunused-const-variable=]
80 | static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:76:26: warning: 'SP_DMEM_BASE' defined but not used [-Wunused-const-variable=]
76 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:72:26: warning: 'SP_CTRL_BASE' defined but not used [-Wunused-const-variable=]
72 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:67:26: warning: 'ISP_HMEM_BASE' defined but not used [-Wunused-const-variable=]
67 | static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:61:26: warning: 'ISP_VAMEM_BASE' defined but not used [-Wunused-const-variable=]
61 | static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:57:26: warning: 'ISP_BAMEM_BASE' defined but not used [-Wunused-const-variable=]
57 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:53:26: warning: 'ISP_DMEM_BASE' defined but not used [-Wunused-const-variable=]
53 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:49:26: warning: 'ISP_CTRL_BASE' defined but not used [-Wunused-const-variable=]
49 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:44:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]
44 | static const hrt_address DDR_BASE[N_DDR_ID] = {
| ^~~~~~~~
--
cc1: warning: drivers/staging/media/atomisp//pci/hive_isp_css_include/memory_access/: No such file or directory [-Wmissing-include-dirs]
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c: In function 'ia_css_isys_rx_configure':
>> drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c:488:7: warning: variable 'port_enabled' set but not used [-Wunused-but-set-variable]
488 | bool port_enabled[N_MIPI_PORT_ID];
| ^~~~~~~~~~~~
In file included from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_formatter.h:34,
from drivers/staging/media/atomisp//pci/sh_css_internal.h:26,
from drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c:21:
At top level:
drivers/staging/media/atomisp//pci/hive_isp_css_common/host/input_formatter_local.h:118:27: warning: 'input_formatter_alignment' defined but not used [-Wunused-const-variable=]
118 | static const unsigned int input_formatter_alignment[N_INPUT_FORMATTER_ID] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/media/atomisp//pci/input_system_local.h:10,
from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_system.h:34,
from drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c:17:
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:380:19: warning: 'MIPI_PORT_ACTIVE' defined but not used [-Wunused-const-variable=]
380 | static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_input_system_local.h:374:30: warning: 'MIPI_PORT_MAXLANES' defined but not used [-Wunused-const-variable=]
374 | static const mipi_lane_cfg_t MIPI_PORT_MAXLANES[N_MIPI_PORT_ID] = {
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/staging/media/atomisp//pci/system_local.h:10,
from drivers/staging/media/atomisp//pci/hive_isp_css_include/input_system.h:33,
from drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c:17:
drivers/staging/media/atomisp//pci/isp2400_system_local.h:155:26: warning: 'INPUT_FORMATTER_BASE' defined but not used [-Wunused-const-variable=]
155 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:150:26: warning: 'TIMED_CTRL_BASE' defined but not used [-Wunused-const-variable=]
150 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
| ^~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:145:26: warning: 'GPIO_BASE' defined but not used [-Wunused-const-variable=]
145 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
| ^~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:142:26: warning: 'GP_TIMER_BASE' defined but not used [-Wunused-const-variable=]
142 | static const hrt_address GP_TIMER_BASE =
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:135:26: warning: 'GP_DEVICE_BASE' defined but not used [-Wunused-const-variable=]
135 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:122:26: warning: 'FIFO_MONITOR_BASE' defined but not used [-Wunused-const-variable=]
122 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
| ^~~~~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:116:26: warning: 'GDC_BASE' defined but not used [-Wunused-const-variable=]
116 | static const hrt_address GDC_BASE[N_GDC_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:104:26: warning: 'IRQ_BASE' defined but not used [-Wunused-const-variable=]
104 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:99:26: warning: 'DMA_BASE' defined but not used [-Wunused-const-variable=]
99 | static const hrt_address DMA_BASE[N_DMA_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:90:26: warning: 'MMU_BASE' defined but not used [-Wunused-const-variable=]
90 | static const hrt_address MMU_BASE[N_MMU_ID] = {
| ^~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:80:26: warning: 'SP_PMEM_BASE' defined but not used [-Wunused-const-variable=]
80 | static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:76:26: warning: 'SP_DMEM_BASE' defined but not used [-Wunused-const-variable=]
76 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:72:26: warning: 'SP_CTRL_BASE' defined but not used [-Wunused-const-variable=]
72 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
| ^~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:67:26: warning: 'ISP_HMEM_BASE' defined but not used [-Wunused-const-variable=]
67 | static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:61:26: warning: 'ISP_VAMEM_BASE' defined but not used [-Wunused-const-variable=]
61 | static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:57:26: warning: 'ISP_BAMEM_BASE' defined but not used [-Wunused-const-variable=]
57 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
| ^~~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:53:26: warning: 'ISP_DMEM_BASE' defined but not used [-Wunused-const-variable=]
53 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:49:26: warning: 'ISP_CTRL_BASE' defined but not used [-Wunused-const-variable=]
49 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
| ^~~~~~~~~~~~~
drivers/staging/media/atomisp//pci/isp2400_system_local.h:44:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]
44 | static const hrt_address DDR_BASE[N_DDR_ID] = {
| ^~~~~~~~

vim +/ia_css_isys_ibuf_rmgr_init +34 drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c

ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 33
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 @34 void ia_css_isys_ibuf_rmgr_init(void)
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 35 {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 36 memset(&ibuf_rsrc, 0, sizeof(ibuf_rsrc));
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 37 ibuf_rsrc.free_size = MAX_INPUT_BUFFER_SIZE;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 38 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 39
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 @40 void ia_css_isys_ibuf_rmgr_uninit(void)
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 41 {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 42 memset(&ibuf_rsrc, 0, sizeof(ibuf_rsrc));
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 43 ibuf_rsrc.free_size = MAX_INPUT_BUFFER_SIZE;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 44 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 45
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 @46 bool ia_css_isys_ibuf_rmgr_acquire(
bdfe0beb95eebc drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 47 u32 size,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 48 uint32_t *start_addr)
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 49 {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 50 bool retval = false;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 51 bool input_buffer_found = false;
bdfe0beb95eebc drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 52 u32 aligned_size;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 53 ibuf_handle_t *handle = NULL;
bdfe0beb95eebc drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 54 u16 i;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 55
bdfe0beb95eebc drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 56 assert(start_addr);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 57 assert(size > 0);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 58
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 59 aligned_size = (size + (IBUF_ALIGN - 1)) & ~(IBUF_ALIGN - 1);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 60
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 61 /* Check if there is an available un-used handle with the size
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 62 * that will fulfill the request.
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 63 */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 64 if (ibuf_rsrc.num_active < ibuf_rsrc.num_allocated) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 65 for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 66 handle = getHandle(i);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 67 if (!handle->active) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 68 if (handle->size >= aligned_size) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 69 handle->active = true;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 70 input_buffer_found = true;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 71 ibuf_rsrc.num_active++;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 72 break;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 73 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 74 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 75 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 76 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 77
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 78 if (!input_buffer_found) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 79 /* There were no available handles that fulfilled the
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 80 * request. Allocate a new handle with the requested size.
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 81 */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 82 if ((ibuf_rsrc.num_allocated < MAX_IBUF_HANDLES) &&
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 83 (ibuf_rsrc.free_size >= aligned_size)) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 84 handle = getHandle(ibuf_rsrc.num_allocated);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 85 handle->start_addr = ibuf_rsrc.free_start_addr;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 86 handle->size = aligned_size;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 87 handle->active = true;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 88
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 89 ibuf_rsrc.free_start_addr += aligned_size;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 90 ibuf_rsrc.free_size -= aligned_size;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 91 ibuf_rsrc.num_active++;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 92 ibuf_rsrc.num_allocated++;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 93
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 94 input_buffer_found = true;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 95 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 96 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 97
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 98 if (input_buffer_found && handle) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 99 *start_addr = handle->start_addr;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 100 retval = true;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 101 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 102
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 103 return retval;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 104 }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 105
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c Mauro Carvalho Chehab 2020-04-19 @106 void ia_css_isys_ibuf_rmgr_release(

:::::: The code at line 34 was first introduced by commit
:::::: ad85094b293e40e7a2f831b0311a389d952ebd5e Revert "media: staging: atomisp: Remove driver"

:::::: TO: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip