LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jonathan Lemon <jonathan.lemon@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH v1 net-next 3/3] ptp_ocp: use bits.h macros for all masks
Date: Sat, 14 Aug 2021 01:35:13 +0800	[thread overview]
Message-ID: <202108140106.K9cVluxn-lkp@intel.com> (raw)
In-Reply-To: <20210813122737.45860-3-andriy.shevchenko@linux.intel.com>

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

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68432 bytes --]

  reply	other threads:[~2021-08-13 17:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 12:27 [PATCH v1 net-next 1/3] ptp_ocp: Switch to use module_pci_driver() macro Andy Shevchenko
2021-08-13 12:27 ` [PATCH v1 net-next 2/3] ptp_ocp: Convert to use managed functions pcim_* and devm_* Andy Shevchenko
2021-08-13 12:27 ` [PATCH v1 net-next 3/3] ptp_ocp: use bits.h macros for all masks Andy Shevchenko
2021-08-13 17:35   ` kernel test robot [this message]
2021-08-13 17:48     ` Andy Shevchenko
2021-08-13 18:14 ` [PATCH v1 net-next 1/3] ptp_ocp: Switch to use module_pci_driver() macro Jakub Kicinski
2021-08-13 19:30   ` Andy Shevchenko
2021-08-16 21:01     ` Jonathan Lemon
2021-08-17  9:48       ` Andy Shevchenko
2021-08-17 12:43         ` Andy Shevchenko

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=202108140106.K9cVluxn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --subject='Re: [PATCH v1 net-next 3/3] ptp_ocp: use bits.h macros for all masks' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).