lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202107210304.DdnEoT2s-lkp@intel.com>
Date:   Wed, 21 Jul 2021 03:25:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Łukasz Stelmach <l.stelmach@...sung.com>,
        Andrew Lunn <andrew@...n.ch>, jim.cromie@...il.com,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Russell King <linux@...linux.org.uk>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v14 3/3] net: ax88796c: ASIX AX88796C SPI
 Ethernet Adapter Driver

Hi "Łukasz,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/ukasz-Stelmach/dt-bindings-vendor-prefixes-Add-asix-prefix/20210720-144740
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0d6835ffe50c9c1f098b5704394331710b67af48
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/54c43f503b1bb5d00f6630eae9c1727519c74a40
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review ukasz-Stelmach/dt-bindings-vendor-prefixes-Add-asix-prefix/20210720-144740
        git checkout 54c43f503b1bb5d00f6630eae9c1727519c74a40
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:5,
                    from arch/m68k/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:7,
                    from arch/m68k/include/asm/bitops.h:529,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/spi/spi.h:10,
                    from drivers/net/ethernet/asix/ax88796c_spi.c:12:
   drivers/net/ethernet/asix/ax88796c_spi.c: In function 'axspi_read_reg':
>> drivers/net/ethernet/asix/ax88796c_spi.c:95:21: error: passing argument 1 of '__swab16s' from incompatible pointer type [-Werror=incompatible-pointer-types]
      95 |  le16_to_cpus(ax_spi->rx_buf);
   include/uapi/linux/byteorder/big_endian.h:97:38: note: in definition of macro '__le16_to_cpus'
      97 | #define __le16_to_cpus(x) __swab16s((x))
         |                                      ^
   drivers/net/ethernet/asix/ax88796c_spi.c:95:2: note: in expansion of macro 'le16_to_cpus'
      95 |  le16_to_cpus(ax_spi->rx_buf);
         |  ^~~~~~~~~~~~
   In file included from include/linux/swab.h:5,
                    from include/uapi/linux/byteorder/big_endian.h:13,
                    from include/linux/byteorder/big_endian.h:5,
                    from arch/m68k/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:7,
                    from arch/m68k/include/asm/bitops.h:529,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/spi/spi.h:10,
                    from drivers/net/ethernet/asix/ax88796c_spi.c:12:
   include/uapi/linux/swab.h:240:37: note: expected '__u16 *' {aka 'short unsigned int *'} but argument is of type 'u8 *' {aka 'unsigned char *'}
     240 | static inline void __swab16s(__u16 *p)
         |                              ~~~~~~~^
   cc1: some warnings being treated as errors


vim +/__swab16s +95 drivers/net/ethernet/asix/ax88796c_spi.c

    10	
    11	#include <linux/string.h>
  > 12	#include <linux/spi/spi.h>
    13	
    14	#include "ax88796c_spi.h"
    15	
    16	const u8 ax88796c_rx_cmd_buf[5] = {AX_SPICMD_READ_RXQ, 0xFF, 0xFF, 0xFF, 0xFF};
    17	const u8 ax88796c_tx_cmd_buf[4] = {AX_SPICMD_WRITE_TXQ, 0xFF, 0xFF, 0xFF};
    18	
    19	/* driver bus management functions */
    20	int axspi_wakeup(struct axspi_data *ax_spi)
    21	{
    22		int ret;
    23	
    24		ax_spi->cmd_buf[0] = AX_SPICMD_EXIT_PWD;	/* OP */
    25		ret = spi_write(ax_spi->spi, ax_spi->cmd_buf, 1);
    26		if (ret)
    27			dev_err(&ax_spi->spi->dev, "%s() failed: ret = %d\n", __func__, ret);
    28		return ret;
    29	}
    30	
    31	int axspi_read_status(struct axspi_data *ax_spi, struct spi_status *status)
    32	{
    33		int ret;
    34	
    35		/* OP */
    36		ax_spi->cmd_buf[0] = AX_SPICMD_READ_STATUS;
    37		ret = spi_write_then_read(ax_spi->spi, ax_spi->cmd_buf, 1, (u8 *)&status, 3);
    38		if (ret)
    39			dev_err(&ax_spi->spi->dev, "%s() failed: ret = %d\n", __func__, ret);
    40		else
    41			le16_to_cpus(&status->isr);
    42	
    43		return ret;
    44	}
    45	
    46	int axspi_read_rxq(struct axspi_data *ax_spi, void *data, int len)
    47	{
    48		struct spi_transfer *xfer = ax_spi->spi_rx_xfer;
    49		int ret;
    50	
    51		memcpy(ax_spi->cmd_buf, ax88796c_rx_cmd_buf, 5);
    52	
    53		xfer->tx_buf = ax_spi->cmd_buf;
    54		xfer->rx_buf = NULL;
    55		xfer->len = ax_spi->comp ? 2 : 5;
    56		xfer->bits_per_word = 8;
    57		spi_message_add_tail(xfer, &ax_spi->rx_msg);
    58	
    59		xfer++;
    60		xfer->rx_buf = data;
    61		xfer->tx_buf = NULL;
    62		xfer->len = len;
    63		xfer->bits_per_word = 8;
    64		spi_message_add_tail(xfer, &ax_spi->rx_msg);
    65		ret = spi_sync(ax_spi->spi, &ax_spi->rx_msg);
    66		if (ret)
    67			dev_err(&ax_spi->spi->dev, "%s() failed: ret = %d\n", __func__, ret);
    68	
    69		return ret;
    70	}
    71	
    72	int axspi_write_txq(const struct axspi_data *ax_spi, void *data, int len)
    73	{
    74		return spi_write(ax_spi->spi, data, len);
    75	}
    76	
    77	u16 axspi_read_reg(struct axspi_data *ax_spi, u8 reg)
    78	{
    79		int ret;
    80		int len = ax_spi->comp ? 3 : 4;
    81	
    82		ax_spi->cmd_buf[0] = 0x03;	/* OP code read register */
    83		ax_spi->cmd_buf[1] = reg;	/* register address */
    84		ax_spi->cmd_buf[2] = 0xFF;	/* dumy cycle */
    85		ax_spi->cmd_buf[3] = 0xFF;	/* dumy cycle */
    86		ret = spi_write_then_read(ax_spi->spi,
    87					  ax_spi->cmd_buf, len,
    88					  ax_spi->rx_buf, 2);
    89		if (ret) {
    90			dev_err(&ax_spi->spi->dev,
    91				"%s() failed: ret = %d\n", __func__, ret);
    92			return 0xFFFF;
    93		}
    94	
  > 95		le16_to_cpus(ax_spi->rx_buf);
    96	
    97		return *(u16 *)ax_spi->rx_buf;
    98	}
    99	

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

Download attachment ".config.gz" of type "application/gzip" (60759 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ