]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
trace/osnoise: Make interval u64 on osnoise_main
authorDaniel Bristot de Oliveira <bristot@redhat.com>
Mon, 28 Jun 2021 09:45:48 +0000 (11:45 +0200)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 28 Jun 2021 18:12:26 +0000 (14:12 -0400)
commit2a81afa326fd23add336cfd7e35e1d699d11d9c4
treef4d06c3ffffffd2eaed3c02f58e5eba11ecb6a5f
parentf7d9f6370e006400655ff96cb148f56598492d91
trace/osnoise: Make interval u64 on osnoise_main

kernel test robot reported:

  >> kernel/trace/trace_osnoise.c:966:3: warning: comparison of distinct
     pointer types ('typeof ((interval)) *' (aka 'long long *') and
     'uint64_t *' (aka 'unsigned long long *'))
     [-Wcompare-distinct-pointer-types]
                   do_div(interval, USEC_PER_MSEC);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/div64.h:228:28: note: expanded from macro 'do_div'
           (void)(((typeof((n)) *)0) == ((uint64_t *)0));  \
                  ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~

As interval cannot be negative because sample_period >= sample_runtime,
making interval u64 on osnoise_main() is enough to fix this problem.

Link: https://lkml.kernel.org/r/4ae1e7780563598563de079a3ef6d4d10b5f5546.1624872608.git.bristot@redhat.com
Fixes: bce29ac9ce0b ("trace: Add osnoise tracer")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_osnoise.c