[02/10] ipmi: kcs_bmc: Include spinlock.h

Message ID 20231103061522.1268637-3-andrew@codeconstruct.com.au
State New
Headers
Series ipmi: kcs_bmc: Miscellaneous cleanups |

Commit Message

Andrew Jeffery Nov. 3, 2023, 6:15 a.m. UTC
  struct kcs_bmc_device defines a spinlock member but the header in which
it is defined failed to include the spinlock header. In the spirit of
include-what-you-use, do what's necessary.

Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
---
 drivers/char/ipmi/kcs_bmc.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Andrew Jeffery Nov. 5, 2023, 10:47 p.m. UTC | #1
On Fri, 2023-11-03 at 14:36 +0000, Jonathan Cameron wrote:
> On Fri,  3 Nov 2023 16:45:14 +1030
> Andrew Jeffery <andrew@codeconstruct.com.au> wrote:
> 
> > struct kcs_bmc_device defines a spinlock member but the header in which
> > it is defined failed to include the spinlock header. In the spirit of
> > include-what-you-use, do what's necessary.
> > 
> > Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
> This is fine, but whilst checking it I noticed there is no
> forwards def of struct device or appropriate include.

Ah, I'll fix that too.

clangd automatically added the spinlock include at one point and so I
figured I'd capture it.

Andrew
  

Patch

diff --git a/drivers/char/ipmi/kcs_bmc.h b/drivers/char/ipmi/kcs_bmc.h
index fa408b802c79..880d835fb90c 100644
--- a/drivers/char/ipmi/kcs_bmc.h
+++ b/drivers/char/ipmi/kcs_bmc.h
@@ -7,6 +7,7 @@ 
 #define __KCS_BMC_H__
 
 #include <linux/list.h>
+#include <linux/spinlock.h>
 
 #define KCS_BMC_EVENT_TYPE_OBE	BIT(0)
 #define KCS_BMC_EVENT_TYPE_IBF	BIT(1)