All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Marwin Hormiz <marwinhormiz@gmail.com>,
	dpenkler@gmail.com, gregkh@linuxfoundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dan.carpenter@linaro.org, matchstick@neverthere.org,
	arnd@arndb.de, niharchaithanya@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Marwin Hormiz <marwinhormiz@gmail.com>
Subject: Re: [PATCH 1/1] staging: gpib: gpio: Fix memory allocation style in gpib_bitbang.c
Date: Tue, 22 Apr 2025 10:09:03 +0800	[thread overview]
Message-ID: <202504220954.L1QvhSdD-lkp@intel.com> (raw)
In-Reply-To: <20250421184144.220972-1-marwinhormiz@gmail.com>

Hi Marwin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/Marwin-Hormiz/staging-gpib-gpio-Fix-memory-allocation-style-in-gpib_bitbang-c/20250422-024547
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/20250421184144.220972-1-marwinhormiz%40gmail.com
patch subject: [PATCH 1/1] staging: gpib: gpio: Fix memory allocation style in gpib_bitbang.c
config: i386-buildonly-randconfig-001-20250422 (https://download.01.org/0day-ci/archive/20250422/202504220954.L1QvhSdD-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250422/202504220954.L1QvhSdD-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/202504220954.L1QvhSdD-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/staging/gpib/gpio/gpib_bitbang.c:380:29: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     380 |         dbg_printk(3, ".........." LINFMT "\n", LINVAL);
         |                                    ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:32: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                               ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:28:41: note: expanded from macro 'pr_fmt'
      28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |                                         ^~~
   include/linux/dev_printk.h:139:28: note: expanded from macro 'dev_no_printk'
     139 |                         _dev_printk(level, dev, fmt, ##__VA_ARGS__);    \
         |                                                 ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:454:7: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     454 |                            LINFMT ".\n", val, priv->dav_rx, priv->w_cnt, priv->length,
         |                            ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:32: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                               ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:28:41: note: expanded from macro 'pr_fmt'
      28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |                                         ^~~
   include/linux/dev_printk.h:139:28: note: expanded from macro 'dev_no_printk'
     139 |                         _dev_printk(level, dev, fmt, ##__VA_ARGS__);    \
         |                                                 ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:550:49: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     550 |                         dbg_printk(1, "timeout after %zu/%zu at %d " LINFMT " eoi: %d\n",
         |                                                                      ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:42: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                                         ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:28:41: note: expanded from macro 'pr_fmt'
      28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |                                         ^~~
   include/linux/dev_printk.h:139:28: note: expanded from macro 'dev_no_printk'
     139 |                         _dev_printk(level, dev, fmt, ##__VA_ARGS__);    \
         |                                                 ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:610:70: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     610 |                 dbg_printk(1, "out of order interrupt after %zu/%zu at %d cmd %d " LINFMT ".\n",
         |                                                                                    ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:32: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                               ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:28:41: note: expanded from macro 'pr_fmt'
      28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |                                         ^~~
   include/linux/dev_printk.h:139:28: note: expanded from macro 'dev_no_printk'
     139 |                         _dev_printk(level, dev, fmt, ##__VA_ARGS__);    \
         |                                                 ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:617:49: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     617 |                 dbg_printk(1, "DAV low after %zu/%zu cmd %d " LINFMT ". No action.\n",
         |                                                               ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:32: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                               ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:28:41: note: expanded from macro 'pr_fmt'
      28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |                                         ^~~
   include/linux/dev_printk.h:139:28: note: expanded from macro 'dev_no_printk'
     139 |                         _dev_printk(level, dev, fmt, ##__VA_ARGS__);    \
         |                                                 ^~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:687:50: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
     687 |                 dbg_printk(1, "DAV high after %zu/%zu cmd %d " LINFMT ". No action.\n",
         |                                                                ^~~~~~
   drivers/staging/gpib/gpio/gpib_bitbang.c:54:32: note: expanded from macro 'LINFMT'
      54 | #define LINFMT "DAV: %d  NRFD:%d  NDAC: %d SRQ: %d"
         |                               ~^
   drivers/staging/gpib/gpio/gpib_bitbang.c:47:29: note: expanded from macro 'dbg_printk'
      47 |                         dev_dbg(board->gpib_dev, frm, ## __VA_ARGS__); } \
         |                                                  ^~~
   include/linux/dev_printk.h:171:41: note: expanded from macro 'dev_dbg'
     171 |         dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)


vim +380 drivers/staging/gpib/gpio/gpib_bitbang.c

4cd654f847693c2 Dave Penkler  2024-09-18  350  
4cd654f847693c2 Dave Penkler  2024-09-18  351  /***************************************************************************
4cd654f847693c2 Dave Penkler  2024-09-18  352   *									   *
4cd654f847693c2 Dave Penkler  2024-09-18  353   * READ									   *
4cd654f847693c2 Dave Penkler  2024-09-18  354   *									   *
4cd654f847693c2 Dave Penkler  2024-09-18  355   ***************************************************************************/
4cd654f847693c2 Dave Penkler  2024-09-18  356  
aa7f3b35ac16fd4 Michael Rubin 2025-04-17  357  static int bb_read(struct gpib_board *board, u8 *buffer, size_t length,
4cd654f847693c2 Dave Penkler  2024-09-18  358  		   int *end, size_t *bytes_read)
4cd654f847693c2 Dave Penkler  2024-09-18  359  {
4cd654f847693c2 Dave Penkler  2024-09-18  360  	struct bb_priv *priv = board->private_data;
4cd654f847693c2 Dave Penkler  2024-09-18  361  	unsigned long flags;
4cd654f847693c2 Dave Penkler  2024-09-18  362  	int retval = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  363  
4cd654f847693c2 Dave Penkler  2024-09-18  364  	ACT_LED_ON;
4cd654f847693c2 Dave Penkler  2024-09-18  365  	SET_DIR_READ(priv);
4cd654f847693c2 Dave Penkler  2024-09-18  366  
4cd654f847693c2 Dave Penkler  2024-09-18  367  	dbg_printk(2, "board: %p  lock %d  length: %zu\n",
4cd654f847693c2 Dave Penkler  2024-09-18  368  		   board, mutex_is_locked(&board->user_mutex), length);
4cd654f847693c2 Dave Penkler  2024-09-18  369  
4cd654f847693c2 Dave Penkler  2024-09-18  370  	priv->end = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  371  	priv->count = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  372  	priv->rbuf = buffer;
4cd654f847693c2 Dave Penkler  2024-09-18  373  	if (length == 0)
4cd654f847693c2 Dave Penkler  2024-09-18  374  		goto read_end;
4cd654f847693c2 Dave Penkler  2024-09-18  375  	priv->request = length;
4cd654f847693c2 Dave Penkler  2024-09-18  376  	priv->eos_check = (priv->eos_flags & REOS) == 0; /* do eos check */
4cd654f847693c2 Dave Penkler  2024-09-18  377  	priv->eos_check_8 = priv->eos_flags & BIN;	 /* over 8 bits */
4cd654f847693c2 Dave Penkler  2024-09-18  378  	priv->eos_mask_7 = priv->eos & 0x7f;		 /* with this 7 bit eos */
4cd654f847693c2 Dave Penkler  2024-09-18  379  
4cd654f847693c2 Dave Penkler  2024-09-18 @380  	dbg_printk(3, ".........." LINFMT "\n", LINVAL);
4cd654f847693c2 Dave Penkler  2024-09-18  381  
4cd654f847693c2 Dave Penkler  2024-09-18  382  	spin_lock_irqsave(&priv->rw_lock, flags);
4cd654f847693c2 Dave Penkler  2024-09-18  383  	priv->dav_mode = 1;
4cd654f847693c2 Dave Penkler  2024-09-18  384  	priv->dav_rx = 1;
4cd654f847693c2 Dave Penkler  2024-09-18  385  	ENABLE_IRQ(priv->irq_DAV, IRQ_TYPE_LEVEL_LOW);
4cd654f847693c2 Dave Penkler  2024-09-18  386  	priv->end_flag = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  387  	gpiod_set_value(NRFD, 1); // ready for data
4cd654f847693c2 Dave Penkler  2024-09-18  388  	priv->r_busy = 1;
4cd654f847693c2 Dave Penkler  2024-09-18  389  	priv->phase = 100;
4cd654f847693c2 Dave Penkler  2024-09-18  390  	spin_unlock_irqrestore(&priv->rw_lock, flags);
4cd654f847693c2 Dave Penkler  2024-09-18  391  
4cd654f847693c2 Dave Penkler  2024-09-18  392  	/* wait for the interrupt routines finish their work */
4cd654f847693c2 Dave Penkler  2024-09-18  393  
4cd654f847693c2 Dave Penkler  2024-09-18  394  	retval = wait_event_interruptible(board->wait,
4cd654f847693c2 Dave Penkler  2024-09-18  395  					  (priv->end_flag || board->status & TIMO));
4cd654f847693c2 Dave Penkler  2024-09-18  396  
4cd654f847693c2 Dave Penkler  2024-09-18  397  	dbg_printk(3, "awake from wait queue: %d\n", retval);
4cd654f847693c2 Dave Penkler  2024-09-18  398  
4cd654f847693c2 Dave Penkler  2024-09-18  399  	if (retval == 0 && board->status & TIMO) {
4cd654f847693c2 Dave Penkler  2024-09-18  400  		retval = -ETIMEDOUT;
4cd654f847693c2 Dave Penkler  2024-09-18  401  		dbg_printk(1, "timeout\n");
4cd654f847693c2 Dave Penkler  2024-09-18  402  	} else if (retval) {
4cd654f847693c2 Dave Penkler  2024-09-18  403  		retval = -ERESTARTSYS;
4cd654f847693c2 Dave Penkler  2024-09-18  404  	}
4cd654f847693c2 Dave Penkler  2024-09-18  405  
4cd654f847693c2 Dave Penkler  2024-09-18  406  	DISABLE_IRQ(priv->irq_DAV);
4cd654f847693c2 Dave Penkler  2024-09-18  407  	spin_lock_irqsave(&priv->rw_lock, flags);
4cd654f847693c2 Dave Penkler  2024-09-18  408  	gpiod_set_value(NRFD, 0); // DIR_READ line state
4cd654f847693c2 Dave Penkler  2024-09-18  409  	priv->r_busy = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  410  	spin_unlock_irqrestore(&priv->rw_lock, flags);
4cd654f847693c2 Dave Penkler  2024-09-18  411  
4cd654f847693c2 Dave Penkler  2024-09-18  412  read_end:
4cd654f847693c2 Dave Penkler  2024-09-18  413  	ACT_LED_OFF;
4cd654f847693c2 Dave Penkler  2024-09-18  414  	*bytes_read = priv->count;
4cd654f847693c2 Dave Penkler  2024-09-18  415  	*end = priv->end;
4cd654f847693c2 Dave Penkler  2024-09-18  416  	priv->r_busy = 0;
4cd654f847693c2 Dave Penkler  2024-09-18  417  	dbg_printk(2, "return: %d  eoi|eos: %d count: %d\n\n", retval, priv->end, priv->count);
4cd654f847693c2 Dave Penkler  2024-09-18  418  	return retval;
4cd654f847693c2 Dave Penkler  2024-09-18  419  }
4cd654f847693c2 Dave Penkler  2024-09-18  420  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-04-22  2:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21 18:41 [PATCH 1/1] staging: gpib: gpio: Fix memory allocation style in gpib_bitbang.c Marwin Hormiz
2025-04-22  2:09 ` kernel test robot [this message]
2025-04-22  6:19 ` Arnd Bergmann
2025-04-22  6:33 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202504220954.L1QvhSdD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=llvm@lists.linux.dev \
    --cc=marwinhormiz@gmail.com \
    --cc=matchstick@neverthere.org \
    --cc=niharchaithanya@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.