mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
kfifo: fix warn_unused_result
Fix the "ignoring return value of '...', declared with attribute warn_unused_result" compiler warning in several users of the new kfifo API. It removes the __must_check attribute from kfifo_in() and kfifo_in_locked() which must not necessary performed. Fix the allocation bug in the nozomi driver file, by moving out the kfifo_alloc from the interrupt handler into the probe function. Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected end of fifo. 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>
This commit is contained in:
parent
7acd72eb85
commit
9842c38e91
7 changed files with 51 additions and 16 deletions
|
@ -56,7 +56,7 @@ extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer,
|
|||
extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size,
|
||||
gfp_t gfp_mask);
|
||||
extern void kfifo_free(struct kfifo *fifo);
|
||||
extern __must_check unsigned int kfifo_in(struct kfifo *fifo,
|
||||
extern unsigned int kfifo_in(struct kfifo *fifo,
|
||||
const unsigned char *from, unsigned int len);
|
||||
extern __must_check unsigned int kfifo_out(struct kfifo *fifo,
|
||||
unsigned char *to, unsigned int len);
|
||||
|
@ -94,7 +94,7 @@ static inline unsigned int kfifo_len(struct kfifo *fifo)
|
|||
* the FIFO depending on the free space, and returns the number of
|
||||
* bytes copied.
|
||||
*/
|
||||
static inline __must_check unsigned int kfifo_in_locked(struct kfifo *fifo,
|
||||
static inline unsigned int kfifo_in_locked(struct kfifo *fifo,
|
||||
const unsigned char *from, unsigned int n, spinlock_t *lock)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue