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] [day] [month] [year] [list]
Date:   Wed, 27 Jan 2021 18:10:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     William Breathitt Gray <vilhelm.gray@...il.com>, jic23@...nel.org,
        fabrice.gasnier@...s.st.com
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        fabrice.gasnier@...com, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org, benjamin.gaignard@...com,
        William Breathitt Gray <vilhelm.gray@...il.com>,
        Syed Nayyar Waris <syednwaris@...il.com>
Subject: Re: [PATCH 1/2] counter: 104-quad-8: Remove IIO counter ABI

Hi William,

I love your patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on linux/master linus/master v5.11-rc5 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/Remove-the-IIO-counter-ABI/20210125-210945
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-a003-20210126 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 925ae8c790c7e354f12ec14a6cac6aa49fc75b29)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/93b6ce4252570c170c0a65a5d2ba200a5cb07967
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review William-Breathitt-Gray/Remove-the-IIO-counter-ABI/20210125-210945
        git checkout 93b6ce4252570c170c0a65a5d2ba200a5cb07967
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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 >>):

>> drivers/counter/104-quad-8.c:1036:40: error: too few arguments to function call, expected 3, have 2
           priv = devm_kzalloc(dev, sizeof(*priv));
                  ~~~~~~~~~~~~                   ^
   include/linux/device.h:215:21: note: 'devm_kzalloc' declared here
   static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp)
                       ^
   1 error generated.


vim +1036 drivers/counter/104-quad-8.c

  1022	
  1023	static int quad8_probe(struct device *dev, unsigned int id)
  1024	{
  1025		struct quad8 *priv;
  1026		int i, j;
  1027		unsigned int base_offset;
  1028		int err;
  1029	
  1030		if (!devm_request_region(dev, base[id], QUAD8_EXTENT, dev_name(dev))) {
  1031			dev_err(dev, "Unable to lock port addresses (0x%X-0x%X)\n",
  1032				base[id], base[id] + QUAD8_EXTENT);
  1033			return -EBUSY;
  1034		}
  1035	
> 1036		priv = devm_kzalloc(dev, sizeof(*priv));
  1037		if (!priv)
  1038			return -ENOMEM;
  1039	
  1040		/* Initialize Counter device and driver data */
  1041		priv->counter.name = dev_name(dev);
  1042		priv->counter.parent = dev;
  1043		priv->counter.ops = &quad8_ops;
  1044		priv->counter.counts = quad8_counts;
  1045		priv->counter.num_counts = ARRAY_SIZE(quad8_counts);
  1046		priv->counter.signals = quad8_signals;
  1047		priv->counter.num_signals = ARRAY_SIZE(quad8_signals);
  1048		priv->counter.priv = priv;
  1049		priv->base = base[id];
  1050	
  1051		/* Initialize mutex */
  1052		mutex_init(&priv->lock);
  1053	
  1054		/* Reset all counters and disable interrupt function */
  1055		outb(QUAD8_CHAN_OP_RESET_COUNTERS, base[id] + QUAD8_REG_CHAN_OP);
  1056		/* Set initial configuration for all counters */
  1057		for (i = 0; i < QUAD8_NUM_COUNTERS; i++) {
  1058			base_offset = base[id] + 2 * i;
  1059			/* Reset Byte Pointer */
  1060			outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
  1061			/* Reset filter clock factor */
  1062			outb(0, base_offset);
  1063			outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP | QUAD8_RLD_PRESET_PSC,
  1064			     base_offset + 1);
  1065			/* Reset Byte Pointer */
  1066			outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
  1067			/* Reset Preset Register */
  1068			for (j = 0; j < 3; j++)
  1069				outb(0x00, base_offset);
  1070			/* Reset Borrow, Carry, Compare, and Sign flags */
  1071			outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_FLAGS, base_offset + 1);
  1072			/* Reset Error flag */
  1073			outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_E, base_offset + 1);
  1074			/* Binary encoding; Normal count; non-quadrature mode */
  1075			outb(QUAD8_CTR_CMR, base_offset + 1);
  1076			/* Disable A and B inputs; preset on index; FLG1 as Carry */
  1077			outb(QUAD8_CTR_IOR, base_offset + 1);
  1078			/* Disable index function; negative index polarity */
  1079			outb(QUAD8_CTR_IDR, base_offset + 1);
  1080		}
  1081		/* Disable Differential Encoder Cable Status for all channels */
  1082		outb(0xFF, base[id] + QUAD8_DIFF_ENCODER_CABLE_STATUS);
  1083		/* Enable all counters */
  1084		outb(QUAD8_CHAN_OP_ENABLE_COUNTERS, base[id] + QUAD8_REG_CHAN_OP);
  1085	
  1086		/* Register Counter device */
  1087		return devm_counter_register(dev, &priv->counter);
  1088	}
  1089	

---
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" (41846 bytes)

Powered by blists - more mailing lists