[tty:tty-testing 15/44] drivers/tty/serial/xilinx_uartps.c:1395:9: error: implicit declaration of function 'of_alias_get_alias_list'; did you mean 'of_alias_get_highest_id'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
head:   3ba96b3d06ba78baca8e50a25b918e6dad590cc6
commit: 2b790db7a6ce25e4575b6ac620c9efb00301bcbe [15/44] serial: uartps: Change uart ID port allocation
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2b790db7a6ce25e4575b6ac620c9efb00301bcbe
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers/tty/serial/xilinx_uartps.c: In function 'cdns_get_id':
>> drivers/tty/serial/xilinx_uartps.c:1395:9: error: implicit declaration of function 'of_alias_get_alias_list'; did you mean 'of_alias_get_highest_id'? [-Werror=implicit-function-declaration]
      ret = of_alias_get_alias_list(cdns_uart_of_match, "serial",
            ^~~~~~~~~~~~~~~~~~~~~~~
            of_alias_get_highest_id
   cc1: some warnings being treated as errors

vim +1395 drivers/tty/serial/xilinx_uartps.c

  1386	
  1387	static int cdns_get_id(struct platform_device *pdev)
  1388	{
  1389		int id, ret;
  1390	
  1391		mutex_lock(&bitmap_lock);
  1392	
  1393		/* Alias list is stable that's why get alias bitmap only once */
  1394		if (!alias_bitmap_initialized) {
> 1395			ret = of_alias_get_alias_list(cdns_uart_of_match, "serial",
  1396						      alias_bitmap, MAX_UART_INSTANCES);
  1397			if (ret)
  1398				return ret;
  1399	
  1400			alias_bitmap_initialized++;
  1401		}
  1402	
  1403		/* Make sure that alias ID is not taken by instance without alias */
  1404		bitmap_or(bitmap, bitmap, alias_bitmap, MAX_UART_INSTANCES);
  1405	
  1406		dev_dbg(&pdev->dev, "Alias bitmap: %*pb\n",
  1407			MAX_UART_INSTANCES, bitmap);
  1408	
  1409		/* Look for a serialN alias */
  1410		id = of_alias_get_id(pdev->dev.of_node, "serial");
  1411		if (id < 0) {
  1412			dev_warn(&pdev->dev,
  1413				 "No serial alias passed. Using the first free id\n");
  1414	
  1415			/*
  1416			 * Start with id 0 and check if there is no serial0 alias
  1417			 * which points to device which is compatible with this driver.
  1418			 * If alias exists then try next free position.
  1419			 */
  1420			id = 0;
  1421	
  1422			for (;;) {
  1423				dev_info(&pdev->dev, "Checking id %d\n", id);
  1424				id = find_next_zero_bit(bitmap, MAX_UART_INSTANCES, id);
  1425	
  1426				/* No free empty instance */
  1427				if (id == MAX_UART_INSTANCES) {
  1428					dev_err(&pdev->dev, "No free ID\n");
  1429					mutex_unlock(&bitmap_lock);
  1430					return -EINVAL;
  1431				}
  1432	
  1433				dev_dbg(&pdev->dev, "The empty id is %d\n", id);
  1434				/* Check if ID is empty */
  1435				if (!test_and_set_bit(id, bitmap)) {
  1436					/* Break the loop if bit is taken */
  1437					dev_dbg(&pdev->dev,
  1438						"Selected ID %d allocation passed\n",
  1439						id);
  1440					break;
  1441				}
  1442				dev_dbg(&pdev->dev,
  1443					"Selected ID %d allocation failed\n", id);
  1444				/* if taking bit fails then try next one */
  1445				id++;
  1446			}
  1447		}
  1448	
  1449		mutex_unlock(&bitmap_lock);
  1450	
  1451		return id;
  1452	}
  1453	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux