linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the hyperv tree
@ 2021-05-18  7:04 Stephen Rothwell
  2021-05-18 10:49 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2021-05-18  7:04 UTC (permalink / raw)
  To: Wei Liu; +Cc: YueHaibing, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the hyperv tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/printk.h:7,
                 from include/linux/kernel.h:17,
                 from drivers/hv/hv_util.c:11:
drivers/hv/hv_util.c: In function 'hv_timesync_init':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
    5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
      |                  ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
      |                  ^~~~~~~~
include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR'
  343 |  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~
drivers/hv/hv_util.c:753:3: note: in expansion of macro 'pr_err'
  753 |   pr_err("cannot register PTP clock: %ld\n",
      |   ^~~~~~

Introduced by commit

  32c0ff83550e ("hv_utils: Fix passing zero to 'PTR_ERR' warning")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the hyperv tree
  2021-05-18  7:04 linux-next: build warning after merge of the hyperv tree Stephen Rothwell
@ 2021-05-18 10:49 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2021-05-18 10:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Wei Liu, YueHaibing, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, May 18, 2021 at 05:04:21PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the hyperv tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> In file included from include/linux/printk.h:7,
>                  from include/linux/kernel.h:17,
>                  from drivers/hv/hv_util.c:11:
> drivers/hv/hv_util.c: In function 'hv_timesync_init':
> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
>     5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
>       |                  ^~~~~~
> include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
>    11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
>       |                  ^~~~~~~~
> include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR'
>   343 |  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>       |         ^~~~~~~~
> drivers/hv/hv_util.c:753:3: note: in expansion of macro 'pr_err'
>   753 |   pr_err("cannot register PTP clock: %ld\n",
>       |   ^~~~~~
> 
> Introduced by commit
> 
>   32c0ff83550e ("hv_utils: Fix passing zero to 'PTR_ERR' warning")
> 

Thanks Stephen.

PTR_ERR_OR_ZERO returns int while PTR_ERR returns long. That's why this
warning is triggered.

I will fix it in hyperv-next.

Wei.

> -- 
> Cheers,
> Stephen Rothwell



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

end of thread, other threads:[~2021-05-18 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  7:04 linux-next: build warning after merge of the hyperv tree Stephen Rothwell
2021-05-18 10:49 ` Wei Liu

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).