All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 2658/2658] drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for function 'se_get_dma_buf'
@ 2025-08-06 18:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-06 18:02 UTC (permalink / raw)
  To: kernel; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   8551213150db5f8eebd27273dae93f6fe258d63a
commit: 3fb87845837f13b19d7b20349801e75f2e303293 [2658/2658] crypto: loongson: add wst se chip support
config: loongarch-randconfig-2005-20250806 (https://download.01.org/0day-ci/archive/20250806/202508062010.itDDl07H-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project faa4c4c2dc804c31845d8f036345fac00e016f2d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250806/202508062010.itDDl07H-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/202508062010.itDDl07H-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for function '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:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      95 | struct tag_dma_buf_ctl *se_get_dma_buf(int ikernel)
         | ^
         | static 
>> drivers/crypto/sedriver/wst_se_echip_driver.c:114:5: warning: no previous prototype for function '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:114:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     114 | int se_free_dma_buf(struct tag_dma_buf_ctl *pdmabufctl)
         | ^
         | static 
>> drivers/crypto/sedriver/wst_se_echip_driver.c:150:5: warning: no previous prototype for function 'se_printk_hex' [-Wmissing-prototypes]
     150 | int se_printk_hex(unsigned char *buff, int length)
         |     ^
   drivers/crypto/sedriver/wst_se_echip_driver.c:150:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     150 | int se_printk_hex(unsigned char *buff, int length)
         | ^
         | static 
>> drivers/crypto/sedriver/wst_se_echip_driver.c:1082:9: warning: no previous prototype for function 'se_kernelwrite' [-Wmissing-prototypes]
    1082 | ssize_t se_kernelwrite(unsigned char *pInPtr, unsigned short usInlen,
         |         ^
   drivers/crypto/sedriver/wst_se_echip_driver.c:1082:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1082 | ssize_t se_kernelwrite(unsigned char *pInPtr, unsigned short usInlen,
         | ^
         | static 
>> drivers/crypto/sedriver/wst_se_echip_driver.c:1175:5: warning: no previous prototype for function 'se_chip_load' [-Wmissing-prototypes]
    1175 | int se_chip_load(void)
         |     ^
   drivers/crypto/sedriver/wst_se_echip_driver.c:1175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1175 | int se_chip_load(void)
         | ^
         | static 
>> drivers/crypto/sedriver/wst_se_echip_driver.c:1272:6: warning: no previous prototype for function 'se_chip_unload' [-Wmissing-prototypes]
    1272 | void se_chip_unload(void)
         |      ^
   drivers/crypto/sedriver/wst_se_echip_driver.c:1272:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1272 | void se_chip_unload(void)
         | ^
         | static 
   6 warnings generated.


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-06 18:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 18:02 [openeuler:OLK-6.6 2658/2658] drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for function 'se_get_dma_buf' 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.