kernel_optimize_test/tools/gpio
Kent Gibson 5897a78fd1 tools: gpio: fix %llu warning in gpio-watch.c
commit 1fc7c1ef37f86f207b4db40aba57084bb2f6a69a upstream.

Some platforms, such as mips64, don't map __u64 to long long unsigned
int so using %llu produces a warning:

gpio-watch.c: In function ‘main’:
gpio-watch.c:89:30: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   89 |    printf("line %u: %s at %llu\n",
      |                           ~~~^
      |                              |
      |                              long long unsigned int
      |                           %lu
   90 |           chg.info.offset, event, chg.timestamp_ns);
      |                                   ~~~~~~~~~~~~~~~~
      |                                      |
      |                                      __u64 {aka long unsigned int}

Replace the %llu with PRIu64 and cast the argument to uint64_t.

Fixes: 33f0c47b8f ("tools: gpio: implement gpio-watch")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:55:20 +01:00
..
.gitignore
Build
gpio-event-mon.c tools: gpio: fix %llu warning in gpio-event-mon.c 2021-01-27 11:55:20 +01:00
gpio-hammer.c tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-utils.c tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-utils.h tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-watch.c tools: gpio: fix %llu warning in gpio-watch.c 2021-01-27 11:55:20 +01:00
lsgpio.c tools: gpio: port lsgpio to v2 uAPI 2020-09-30 10:57:11 +02:00
Makefile