From: Wei Liu <wei.liu@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Wei Liu <wei.liu@kernel.org>, YueHaibing <yuehaibing@huawei.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the hyperv tree
Date: Tue, 18 May 2021 10:49:44 +0000 [thread overview]
Message-ID: <20210518104944.itnusipj755gsr5m@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20210518170421.584dc0ec@canb.auug.org.au>
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
prev parent reply other threads:[~2021-05-18 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 7:04 Stephen Rothwell
2021-05-18 10:49 ` Wei Liu [this message]
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=20210518104944.itnusipj755gsr5m@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=yuehaibing@huawei.com \
/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
all inboxes | Powered by JetHome®