]> git.baikalelectronics.ru Git - kernel.git/commit
kfifo: fix sparse complaints
authorStefani Seibold <stefani@seibold.net>
Tue, 22 Mar 2016 21:27:42 +0000 (14:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:36:02 +0000 (15:36 -0700)
commit7b6805fe99e2290ccb633a973a57aab9744a00b5
treed3eb0155d79f1182f4c510268cdd27987d576443
parentd7952132f4599c4e8f6f74cf2d86aab0a30406fb
kfifo: fix sparse complaints

This patch fix complaints by the sparse tool when using kfifo_put() with
non scalar types like structures (i.e.
drivers/iio/industrialio-event.c).

Casting a pointer to the value and read this pointer instead of directly
casting the value will fix this.

The generated code is equal.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kfifo.h