[openeuler:OLK-6.6 2257/2257] drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for 'se_get_dma_buf'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 07f584ce776b1da46ead9c90d16968739723d311 commit: 3fb87845837f13b19d7b20349801e75f2e303293 [2257/2257] crypto: loongson: add wst se chip support config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250520/202505201757.qoTbv6a9-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201757.qoTbv6a9-lkp@i...) 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/202505201757.qoTbv6a9-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for 'se_get_dma_buf' [-Wmissing-prototypes] 95 | struct tag_dma_buf_ctl *se_get_dma_buf(int ikernel) | ^~~~~~~~~~~~~~ drivers/crypto/sedriver/wst_se_echip_driver.c:114:5: warning: no previous prototype for 'se_free_dma_buf' [-Wmissing-prototypes] 114 | int se_free_dma_buf(struct tag_dma_buf_ctl *pdmabufctl) | ^~~~~~~~~~~~~~~ drivers/crypto/sedriver/wst_se_echip_driver.c:150:5: warning: no previous prototype for 'se_printk_hex' [-Wmissing-prototypes] 150 | int se_printk_hex(unsigned char *buff, int length) | ^~~~~~~~~~~~~ drivers/crypto/sedriver/wst_se_echip_driver.c:1082:9: warning: no previous prototype for 'se_kernelwrite' [-Wmissing-prototypes] 1082 | ssize_t se_kernelwrite(unsigned char *pInPtr, unsigned short usInlen, | ^~~~~~~~~~~~~~ drivers/crypto/sedriver/wst_se_echip_driver.c:1175:5: warning: no previous prototype for 'se_chip_load' [-Wmissing-prototypes] 1175 | int se_chip_load(void) | ^~~~~~~~~~~~ drivers/crypto/sedriver/wst_se_echip_driver.c:1272:6: warning: no previous prototype for 'se_chip_unload' [-Wmissing-prototypes] 1272 | void se_chip_unload(void) | ^~~~~~~~~~~~~~
vim +/se_get_dma_buf +95 drivers/crypto/sedriver/wst_se_echip_driver.c 94
95 struct tag_dma_buf_ctl *se_get_dma_buf(int ikernel) 96 { 97 struct tag_dma_buf_ctl *pbufctl = NULL; 98 unsigned long ultimeout = 0; 99 100 ultimeout = jiffies + 20 * HZ; 101 while (1) { 102 spin_lock(&g_getdmabuflock); 103 pbufctl = (struct tag_dma_buf_ctl *)wst_Popfront_Que( 104 &g_DmaBQueueContainer); 105 spin_unlock(&g_getdmabuflock); 106 if (pbufctl) 107 return pbufctl; 108 if (down_timeout(&g_dmabufsem, ultimeout)) 109 return NULL; 110 } 111 return pbufctl; 112 } 113 114 int se_free_dma_buf(struct tag_dma_buf_ctl *pdmabufctl) 115 { 116 spin_lock(&g_getdmabuflock); 117 wst_Pushback_Que(&g_DmaBQueueContainer, pdmabufctl); 118 spin_unlock(&g_getdmabuflock); 119 if (g_dmabufsem.count <= 0) 120 up(&g_dmabufsem); 121 122 return 0; 123 } 124 125 static unsigned long bytes_align(struct device *pdev, unsigned long ulVirAddr) 126 { 127 unsigned char diff; 128 unsigned long ulPhyAddr = (unsigned long)__pa((void *)ulVirAddr); 129 130 if ((ulPhyAddr & 0x000000000000003f) == 0) 131 return ulVirAddr; 132 diff = ((long)ulPhyAddr & (~(0x000000000000003f))) + 64 - ulPhyAddr; 133 ulVirAddr += diff; 134 135 return ulVirAddr; 136 } 137 138 static unsigned long descri_bytes_align(unsigned long ulVirAddr) 139 { 140 unsigned char diff; 141 unsigned long ulPhyAddr = ulVirAddr; 142 143 if ((ulPhyAddr & (~0x00000000ffffffe0)) == 0) 144 return ulVirAddr; 145 diff = ((long)ulPhyAddr & 0x00000000ffffffe0) + 32 - ulPhyAddr; 146 ulVirAddr += diff; 147 return ulVirAddr; 148 } 149 150 int se_printk_hex(unsigned char *buff, int length) 151 { 152 unsigned char *string_tmp = buff; 153 int i; 154 int count = 0; 155 156 for (i = 0; i < length; i++, count++) { 157 if (count < 16) 158 pr_info("%02x ", string_tmp[i]); 159 else { 160 count = 0; 161 pr_info("\n%02x ", string_tmp[i]); 162 continue; 163 } 164 } 165 pr_info("\n"); 166 return 0; 167 } 168
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot