Skip to contentSkip to conversation

media: pci: mgb4: include linux/errno.h

PATCH In review Arnd Bergmann 2 participants 2 messages Mar 7, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: pci: mgb4: include linux/errno.h

From: Arnd Bergmann <[email protected]>

The errno.h header is not always included indirectly, leading to rare randconfig build warnings.

drivers/media/pci/mgb4/mgb4_regs.c:20:11: error: use of undeclared identifier 'EINVAL'
20 | return -EINVAL;

---
 drivers/media/pci/mgb4/mgb4_regs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/mgb4/mgb4_regs.c +1 -0
index 31befd722d72..b45537dbfafa 100644
@@ -5,6 +5,7 @@
  */
 
 #include <linux/ioport.h>
+#include <linux/errno.h>
 #include "mgb4_regs.h"
 
 int mgb4_regs_map(struct resource *res, struct mgb4_regs *regs)
Signature · 1 line
2.39.5
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The errno.h header is not always included indirectly, leading to rare randconfig build warnings.

drivers/media/pci/mgb4/mgb4_regs.c:20:11: error: use of undeclared identifier 'EINVAL'

    20 |                 return -EINVAL;
---
  drivers/media/pci/mgb4/mgb4_regs.c | 1 +
  1 file changed, 1 insertion(+)
drivers/media/pci/mgb4/mgb4_regs.c +0 -0
index 31befd722d72..b45537dbfafa 100644

drivers/media/pci/mgb4/mgb4_regs.c line 11

Quoted 7 lines
drivers/media/pci/mgb4/mgb4_regs.c +1 -0
@@ -5,6 +5,7 @@
   */
 
  #include <linux/ioport.h>
+#include <linux/errno.h>
  #include "mgb4_regs.h"
 
  int mgb4_regs_map(struct resource *res, struct mgb4_regs *regs)