Skip to contentSkip to conversation

Use net/checksum.h, not asm/checksum.h

PATCH In review Matthew Wilcox 2 participants 2 messages Sep 20, 2003 – Sep 21, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use net/checksum.h, not asm/checksum.h

On PA-RISC, I get the warning:

In file included from net/ipv4/netfilter/ip_nat_snmp_basic.c:56:
include/asm/checksum.h:127: warning: `struct in6_addr' declared inside parameter
list
include/asm/checksum.h:127: warning: its scope is only this definition or declar ation, which is probably not what you want.

This patch fixes that:

Index: net/ipv4/netfilter/ip_nat_snmp_basic.c
===================================================================
RCS file: /var/cvs/linux-2.6/net/ipv4/netfilter/ip_nat_snmp_basic.c,v retrieving revision 1.3

ipv4/netfilter/ip_nat_snmp_basic.c 20 Sep 2003 00:15:46 -0000 renamed from ipv4/netfilter/ip_nat_snmp_basic.c 8 Sep 2003 21:42:58 -0000 1.3 +1 -1
diff -u -p -r1.3 ip_nat_snmp_basic.c
@@ -51,9 +51,9 @@
 #include <linux/netfilter_ipv4/ip_nat.h>
 #include <linux/netfilter_ipv4/ip_nat_helper.h>
 #include <linux/ip.h>
+#include <net/checksum.h>
 #include <net/udp.h>
 #include <asm/uaccess.h>
-#include <asm/checksum.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("James Morris <[email protected]>");
Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#1 lore raw
Quoted 10 lines · Matthew Wilcox

On PA-RISC, I get the warning:

In file included from net/ipv4/netfilter/ip_nat_snmp_basic.c:56:
include/asm/checksum.h:127: warning: `struct in6_addr' declared inside parameter
list
include/asm/checksum.h:127: warning: its scope is only this definition or declar ation, which is probably not what you want.

This patch fixes that:

Thanks willy, I will push this patch to davem for kernel inclusion

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie