netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: linux-stable <stable@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	lkft-triage@lists.linaro.org, Shuah Khan <shuah@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Yangbo Lu <yangbo.lu@nxp.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Jian Yang <jianyang@google.com>
Subject: Re: txtimestamp.c:164:29: warning: format '0' expects argument of type 'long unsigned int', but argument 3 has type 'int64_t' {aka 'long long int'} [-Wformat=]
Date: Thu, 6 Jan 2022 11:37:26 +0100	[thread overview]
Message-ID: <YdbGZiKKdVgh8A4i@kroah.com> (raw)
In-Reply-To: <CA+G9fYtaoxVF-bL40kt=FKcjjaLUnS+h8hNf=wQv_dKKWn_MNQ@mail.gmail.com>

On Thu, Jan 06, 2022 at 03:39:09PM +0530, Naresh Kamboju wrote:
> While building selftests the following warnings were noticed for arm
> architecture on Linux stable v5.15.13 kernel and also on Linus's tree.
> 
> arm-linux-gnueabihf-gcc -Wall -Wl,--no-as-needed -O2 -g
> -I../../../../usr/include/    txtimestamp.c  -o
> /home/tuxbuild/.cache/tuxmake/builds/current/kselftest/net/txtimestamp
> txtimestamp.c: In function 'validate_timestamp':
> txtimestamp.c:164:29: warning: format '0' expects argument of type
> 'long unsigned int', but argument 3 has type 'int64_t' {aka 'long long
> int'} [-Wformat=]
>   164 |   fprintf(stderr, "ERROR: 0 us expected between 0 and 0\n",
>       |                           ~~^
>       |                             |
>       |                             long unsigned int
>       |                           0
>   165 |     cur64 - start64, min_delay, max_delay);
>       |     ~~~~~~~~~~~~~~~
>       |           |
>       |           int64_t {aka long long int}
> txtimestamp.c: In function '__print_ts_delta_formatted':
> txtimestamp.c:173:22: warning: format '0' expects argument of type
> 'long unsigned int', but argument 3 has type 'int64_t' {aka 'long long
> int'} [-Wformat=]
>   173 |   fprintf(stderr, "0 ns", ts_delta);
>       |                    ~~^      ~~~~~~~~
>       |                      |      |
>       |                      |      int64_t {aka long long int}
>       |                      long unsigned int
>       |                    0
> txtimestamp.c:175:22: warning: format '0' expects argument of type
> 'long unsigned int', but argument 3 has type 'int64_t' {aka 'long long
> int'} [-Wformat=]
>   175 |   fprintf(stderr, "0 us", ts_delta / NSEC_PER_USEC);
>       |                    ~~^
>       |                      |
>       |                      long unsigned int
>       |                    0
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> build link:
> https://builds.tuxbuild.com/23HFntxpqyCx0RbiuadfGZ36Kym/
> 
> metadata:
>   git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
>   git commit: 734eb1fd2073f503f5c6b44f1c0d453ca6986b84
>   git describe: v5.15.13
>   toolchain: gcc-11
>   kernel-config: https://builds.tuxbuild.com/23HFntxpqyCx0RbiuadfGZ36Kym/config
> 
> 
> # To install tuxmake on your system globally:
> # sudo pip3 install -U tuxmake
> 
> tuxmake --runtime podman --target-arch arm --toolchain gcc-10 \
>  --kconfig https://builds.tuxbuild.com/23HFntxpqyCx0RbiuadfGZ36Kym/config \
>   dtbs dtbs-legacy headers kernel kselftest kselftest-merge modules

Same question as before, is this a regression, and if so, any pointers
to a fix?

thanks,

greg k-h

  reply	other threads:[~2022-01-06 10:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 10:09 txtimestamp.c:164:29: warning: format '0' expects argument of type 'long unsigned int', but argument 3 has type 'int64_t' {aka 'long long int'} [-Wformat=] Naresh Kamboju
2022-01-06 10:37 ` Greg Kroah-Hartman [this message]
2022-01-06 12:08   ` Naresh Kamboju
2022-01-06 12:26     ` Greg Kroah-Hartman

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=YdbGZiKKdVgh8A4i@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=jianyang@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yangbo.lu@nxp.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;
as well as URLs for NNTP newsgroup(s).