Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bastien Curutchet <bastien.curutchet@bootlin.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [char-misc:char-misc-testing 34/74] drivers/pps/clients/pps-gpio.c:66:24: error: passing 'struct device' to parameter of incompatible type 'const struct device *'; take the address with &
Date: Wed, 8 Jan 2025 05:36:30 +0800	[thread overview]
Message-ID: <202501080532.9Txj1W30-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head:   1ec8487e879dc872c506483553c376be2a556463
commit: 8aa0545f419e5bffbb27354e0221997cb6e87cbd [34/74] pps: clients: gpio: Bypass edge's direction check when not needed
config: i386-buildonly-randconfig-001-20250108 (https://download.01.org/0day-ci/archive/20250108/202501080532.9Txj1W30-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250108/202501080532.9Txj1W30-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/202501080532.9Txj1W30-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pps/clients/pps-gpio.c:66:24: error: passing 'struct device' to parameter of incompatible type 'const struct device *'; take the address with &
      66 |                 dev_warn_ratelimited(info->pps->dev, "IRQ did not trigger any PPS event\n");
         |                                      ^~~~~~~~~~~~~~
         |                                      &
   include/linux/dev_printk.h:227:34: note: expanded from macro 'dev_warn_ratelimited'
     227 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
         |                                         ^~~
   include/linux/dev_printk.h:215:13: note: expanded from macro 'dev_level_ratelimited'
     215 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
         |                           ^~~
   include/linux/dev_printk.h:156:49: note: expanded from macro 'dev_warn'
     156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~
   include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   include/linux/dev_printk.h:52:37: note: passing argument to parameter 'dev' here
      52 | void _dev_warn(const struct device *dev, const char *fmt, ...);
         |                                     ^
   1 error generated.


vim +66 drivers/pps/clients/pps-gpio.c

    39	
    40	/*
    41	 * Report the PPS event
    42	 */
    43	
    44	static irqreturn_t pps_gpio_irq_handler(int irq, void *data)
    45	{
    46		const struct pps_gpio_device_data *info;
    47		struct pps_event_time ts;
    48		int rising_edge;
    49	
    50		/* Get the time stamp first */
    51		pps_get_ts(&ts);
    52	
    53		info = data;
    54	
    55		/* Small trick to bypass the check on edge's direction when capture_clear is unset */
    56		rising_edge = info->capture_clear ?
    57			      gpiod_get_value(info->gpio_pin) : !info->assert_falling_edge;
    58		if ((rising_edge && !info->assert_falling_edge) ||
    59				(!rising_edge && info->assert_falling_edge))
    60			pps_event(info->pps, &ts, PPS_CAPTUREASSERT, data);
    61		else if (info->capture_clear &&
    62				((rising_edge && info->assert_falling_edge) ||
    63				(!rising_edge && !info->assert_falling_edge)))
    64			pps_event(info->pps, &ts, PPS_CAPTURECLEAR, data);
    65		else
  > 66			dev_warn_ratelimited(info->pps->dev, "IRQ did not trigger any PPS event\n");
    67	
    68		return IRQ_HANDLED;
    69	}
    70	

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

                 reply	other threads:[~2025-01-07 21:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202501080532.9Txj1W30-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox