All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/8] counter: 104-quad-8: Utilize iomap interface
@ 2022-05-11  8:11 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-11  8:11 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4322 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <861c003318dce3d2bef4061711643bb04f5ec14f.1652201921.git.william.gray@linaro.org>
References: <861c003318dce3d2bef4061711643bb04f5ec14f.1652201921.git.william.gray@linaro.org>
TO: William Breathitt Gray <william.gray@linaro.org>
TO: linux-iio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: linux-gpio(a)vger.kernel.org
CC: linus.walleij(a)linaro.org
CC: schnelle(a)linux.ibm.com
CC: David.Laight(a)ACULAB.COM
CC: macro(a)orcam.me.uk
CC: William Breathitt Gray <william.gray@linaro.org>
CC: Syed Nayyar Waris <syednwaris@gmail.com>

Hi William,

I love your patch! Perhaps something to improve:

[auto build test WARNING on ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e]

url:    https://github.com/intel-lab-lkp/linux/commits/William-Breathitt-Gray/Utilize-iomap-interface-for-PC104-and-friends/20220511-013247
base:   ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: i386-randconfig-m021-20220509 (https://download.01.org/0day-ci/archive/20220511/202205111619.HUf31X6P-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/counter/104-quad-8.c:154 quad8_count_read() warn: should 'ioread8(base_offset) << (8 * i)' be a 64 bit type?

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

f1d8a071d45bf1 William Breathitt Gray 2019-04-02  128  
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  129  static int quad8_count_read(struct counter_device *counter,
aaec1a0f76ec25 William Breathitt Gray 2021-08-27  130  			    struct counter_count *count, u64 *val)
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  131  {
aea8334b24feb0 Uwe Kleine-König       2021-12-30  132  	struct quad8 *const priv = counter_priv(counter);
744c2317cf8c1f William Breathitt Gray 2022-05-10  133  	void __iomem *const base_offset = priv->base + 2 * count->id;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  134  	unsigned int flags;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  135  	unsigned int borrow;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  136  	unsigned int carry;
09db4678bfbb42 William Breathitt Gray 2021-09-29  137  	unsigned long irqflags;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  138  	int i;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  139  
744c2317cf8c1f William Breathitt Gray 2022-05-10  140  	flags = ioread8(base_offset + 1);
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  141  	borrow = flags & QUAD8_FLAG_BT;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  142  	carry = !!(flags & QUAD8_FLAG_CT);
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  143  
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  144  	/* Borrow XOR Carry effectively doubles count range */
d49e6ee2d6c2b6 William Breathitt Gray 2019-10-06  145  	*val = (unsigned long)(borrow ^ carry) << 24;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  146  
09db4678bfbb42 William Breathitt Gray 2021-09-29  147  	spin_lock_irqsave(&priv->lock, irqflags);
fc069262261c43 Syed Nayyar Waris      2020-03-16  148  
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  149  	/* Reset Byte Pointer; transfer Counter to Output Latch */
744c2317cf8c1f William Breathitt Gray 2022-05-10  150  	iowrite8(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP | QUAD8_RLD_CNTR_OUT,
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  151  		 base_offset + 1);
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  152  
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  153  	for (i = 0; i < 3; i++)
744c2317cf8c1f William Breathitt Gray 2022-05-10 @154  		*val |= (unsigned long)ioread8(base_offset) << (8 * i);
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  155  
09db4678bfbb42 William Breathitt Gray 2021-09-29  156  	spin_unlock_irqrestore(&priv->lock, irqflags);
fc069262261c43 Syed Nayyar Waris      2020-03-16  157  
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  158  	return 0;
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  159  }
f1d8a071d45bf1 William Breathitt Gray 2019-04-02  160  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH 0/8] Utilize iomap interface for PC104 and friends
@ 2022-05-10 17:30 William Breathitt Gray
  2022-05-10 17:30 ` [PATCH 1/8] counter: 104-quad-8: Utilize iomap interface William Breathitt Gray
  0 siblings, 1 reply; 2+ messages in thread
From: William Breathitt Gray @ 2022-05-10 17:30 UTC (permalink / raw)
  To: linux-iio
  Cc: linux-kernel, linux-gpio, linus.walleij, schnelle, David.Laight,
	macro, William Breathitt Gray, Bartosz Golaszewski,
	Jonathan Cameron, Lars-Peter Clausen

PC104 cards and similar devices do not need to access I/O ports directly
via inb()/outb() and can instead use the more typical I/O memory
ioread8()/iowrite8() accessor calls by first calling ioport_map(). This
patchset converts the relevant PC104/ISA card drivers to do such. With
these drivers now utilizing I/O memory accessor calls, work can be done
to consolidate some similar devices (e.g. 104-idio-16, pci-idio-16,
etc.) into a unified driver in a future patchset.

This patchset spawned from a suggestion made in another thread titled
"gpio: add HAS_IOPORT dependencies":
https://lore.kernel.org/all/c3a3cdd99d4645e2bbbe082808cbb2a5@AcuMS.aculab.com/

William Breathitt Gray (8):
  counter: 104-quad-8: Utilize iomap interface
  gpio: 104-dio-48e: Utilize iomap interface
  gpio: 104-idi-48: Utilize iomap interface
  gpio: 104-idio-16: Utilize iomap interface
  gpio: gpio-mm: Utilize iomap interface
  gpio: ws16c48: Utilize iomap interface
  iio: adc: stx104: Utilize iomap interface
  iio: dac: cio-dac: Utilize iomap interface

 drivers/counter/104-quad-8.c    | 169 +++++++++++++++++---------------
 drivers/gpio/gpio-104-dio-48e.c |  63 ++++++------
 drivers/gpio/gpio-104-idi-48.c  |  27 ++---
 drivers/gpio/gpio-104-idio-16.c |  33 ++++---
 drivers/gpio/gpio-gpio-mm.c     |  43 ++++----
 drivers/gpio/gpio-ws16c48.c     |  65 ++++++------
 drivers/iio/adc/stx104.c        |  56 ++++++-----
 drivers/iio/dac/cio-dac.c       |  14 +--
 8 files changed, 248 insertions(+), 222 deletions(-)


base-commit: ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-11  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11  8:11 [PATCH 1/8] counter: 104-quad-8: Utilize iomap interface kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-05-10 17:30 [PATCH 0/8] Utilize iomap interface for PC104 and friends William Breathitt Gray
2022-05-10 17:30 ` [PATCH 1/8] counter: 104-quad-8: Utilize iomap interface William Breathitt Gray

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.