Skip to content

Commit

Permalink
kfifo: don't use "proxy" headers
Browse files Browse the repository at this point in the history
Update header inclusions to follow IWYU (Include What You Use) principle.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Alain Volmat <[email protected]>
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: Sean Wang <[email protected]>
Cc: Sean Young <[email protected]>
Cc: Stefani Seibold <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
andy-shev authored and akpm00 committed May 8, 2024
1 parent 495ae16 commit 22bcc91
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 7 additions & 2 deletions include/linux/kfifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@
* to lock the reader.
*/

#include <linux/kernel.h>
#include <linux/array_size.h>
#include <linux/spinlock.h>
#include <linux/stddef.h>
#include <linux/scatterlist.h>
#include <linux/types.h>

#include <asm/barrier.h>
#include <asm/errno.h>

struct scatterlist;

struct __kfifo {
unsigned int in;
Expand Down
8 changes: 4 additions & 4 deletions lib/kfifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* Copyright (C) 2009/2010 Stefani Seibold <[email protected]>
*/

#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/kfifo.h>
#include <linux/log2.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/kfifo.h>

/*
* internal helper to calculate the unused elements in a fifo
Expand Down
3 changes: 2 additions & 1 deletion samples/kfifo/dma-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*/

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kfifo.h>
#include <linux/module.h>
#include <linux/scatterlist.h>

/*
* This module shows how to handle fifo dma operations.
Expand Down

0 comments on commit 22bcc91

Please sign in to comment.