[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202108140106.K9cVluxn-lkp@intel.com>
Date: Sat, 14 Aug 2021 01:35:13 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org, Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH v1 net-next 3/3] ptp_ocp: use bits.h macros for all masks
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc5]
[cannot apply to net-next/master next-20210813]
[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/Andy-Shevchenko/ptp_ocp-Switch-to-use-module_pci_driver-macro/20210813-202935
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/6366fc4d87438e21b0bdf4d4f680a5ec582740ad
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/ptp_ocp-Switch-to-use-module_pci_driver-macro/20210813-202935
git checkout 6366fc4d87438e21b0bdf4d4f680a5ec582740ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
from drivers/ptp/ptp_ocp.c:8:
drivers/ptp/ptp_ocp.c: In function 'ptp_ocp_tod_info':
>> drivers/ptp/ptp_ocp.c:276:34: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/ptp/ptp_ocp.c:276:9: note: in expansion of macro 'dev_info'
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ^~~~~~~~
drivers/ptp/ptp_ocp.c:276:48: note: format string is defined here
276 | dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
| ~^
| |
| int
| %ld
vim +276 drivers/ptp/ptp_ocp.c
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 234
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 235 static void
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 236 ptp_ocp_tod_info(struct ptp_ocp *bp)
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 237 {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 238 static const char * const proto_name[] = {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 239 "NMEA", "NMEA_ZDA", "NMEA_RMC", "NMEA_none",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 240 "UBX", "UBX_UTC", "UBX_LS", "UBX_none"
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 241 };
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 242 static const char * const gnss_name[] = {
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 243 "ALL", "COMBINED", "GPS", "GLONASS", "GALILEO", "BEIDOU",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 244 };
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 245 u32 version, ctrl, reg;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 246 int idx;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 247
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 248 version = ioread32(&bp->tod->version);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 249 dev_info(&bp->pdev->dev, "TOD Version %d.%d.%d\n",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 250 version >> 24, (version >> 16) & 0xff, version & 0xffff);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 251
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 252 ctrl = ioread32(&bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 253 ctrl |= TOD_CTRL_PROTOCOL | TOD_CTRL_ENABLE;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 254 ctrl &= ~(TOD_CTRL_DISABLE_FMT_A | TOD_CTRL_DISABLE_FMT_B);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 255 iowrite32(ctrl, &bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 256
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 257 ctrl = ioread32(&bp->tod->ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 258 idx = ctrl & TOD_CTRL_PROTOCOL ? 4 : 0;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 259 idx += (ctrl >> 16) & 3;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 260 dev_info(&bp->pdev->dev, "control: %x\n", ctrl);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 261 dev_info(&bp->pdev->dev, "TOD Protocol %s %s\n", proto_name[idx],
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 262 ctrl & TOD_CTRL_ENABLE ? "enabled" : "");
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 263
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 264 idx = (ctrl >> TOD_CTRL_GNSS_SHIFT) & TOD_CTRL_GNSS_MASK;
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 265 if (idx < ARRAY_SIZE(gnss_name))
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 266 dev_info(&bp->pdev->dev, "GNSS %s\n", gnss_name[idx]);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 267
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 268 reg = ioread32(&bp->tod->status);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 269 dev_info(&bp->pdev->dev, "status: %x\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 270
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 271 reg = ioread32(&bp->tod->correction_sec);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 272 dev_info(&bp->pdev->dev, "correction: %d\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 273
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 274 reg = ioread32(&bp->tod->utc_status);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 275 dev_info(&bp->pdev->dev, "utc_status: %x\n", reg);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 @276 dev_info(&bp->pdev->dev, "utc_offset: %d valid:%d leap_valid:%d\n",
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 277 reg & TOD_STATUS_UTC_MASK, reg & TOD_STATUS_UTC_VALID ? 1 : 0,
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 278 reg & TOD_STATUS_LEAP_VALID ? 1 : 0);
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 279 }
a7e1abad13f3f0 Jonathan Lemon 2020-12-03 280
---
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" (68432 bytes)
Powered by blists - more mailing lists