Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Ralf Baechle
On Wed, Oct 07, 2015 at 01:23:07PM +0200, Arnd Bergmann wrote: > > I haven't checked all architectures, but I assume what happens is that > > 64-bit ones just #define atomic64_t atomic_long_t, so they don't have > > to provide three sets of functions. > > scratch that, I just looked at all the ar

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Geert Uytterhoeven
On Mon, Oct 19, 2015 at 12:11 PM, Arnd Bergmann wrote: > On Monday 19 October 2015 09:34:15 Geert Uytterhoeven wrote: >> On Wed, Oct 7, 2015 at 1:23 PM, Arnd Bergmann wrote: >> > static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) >> > >> > which truncates the result to 32 bi

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 09:34:15 Geert Uytterhoeven wrote: > On Wed, Oct 7, 2015 at 1:23 PM, Arnd Bergmann wrote: > > static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) > > > > which truncates the result to 32 bit. > > Woops. > > See also my unanswered question in "atomic

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 11:37:00 Ralf Baechle wrote: > On Wed, Oct 07, 2015 at 01:23:07PM +0200, Arnd Bergmann wrote: > > > > I haven't checked all architectures, but I assume what happens is that > > > 64-bit ones just #define atomic64_t atomic_long_t, so they don't have > > > to provide three

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Geert Uytterhoeven
On Wed, Oct 7, 2015 at 1:23 PM, Arnd Bergmann wrote: > On Wednesday 07 October 2015 13:04:06 Arnd Bergmann wrote: >> On Wednesday 07 October 2015 11:45:02 Russell King - ARM Linux wrote: >> > On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: >> > > The virtgpu driver prints the last_s

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
On Wednesday 07 October 2015 13:04:06 Arnd Bergmann wrote: > On Wednesday 07 October 2015 11:45:02 Russell King - ARM Linux wrote: > > On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: > > > The virtgpu driver prints the last_seq variable using the %ld or > > > %lu format string, which

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
On Wednesday 07 October 2015 11:45:02 Russell King - ARM Linux wrote: > On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: > > The virtgpu driver prints the last_seq variable using the %ld or > > %lu format string, which does not work correctly on all architectures > > and causes this c

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Russell King - ARM Linux
On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: > The virtgpu driver prints the last_seq variable using the %ld or > %lu format string, which does not work correctly on all architectures > and causes this compiler warning on ARM: > > drivers/gpu/drm/virtio/virtgpu_fence.c: In functi

[PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
The virtgpu driver prints the last_seq variable using the %ld or %lu format string, which does not work correctly on all architectures and causes this compiler warning on ARM: drivers/gpu/drm/virtio/virtgpu_fence.c: In function 'virtio_timeline_value_str': drivers/gpu/drm/virtio/virtgpu_fence.c:64