| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] etherdevice.h -- make constant args |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Thu, 8 Apr 2004 11:06:53 -0700 |
| Cc: | netdev@xxxxxxxxxxx, Jeff Garzik <jgarzik@xxxxxxxxx> |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Rather than forcing cast in some new validation code in the bridge;
please fix a couple of inline functions should have "const" on args.
diff -Nru a/include/linux/etherdevice.h b/include/linux/etherdevice.h
--- a/include/linux/etherdevice.h Thu Apr 8 11:03:52 2004
+++ b/include/linux/etherdevice.h Thu Apr 8 11:03:52 2004
@@ -40,7 +40,9 @@
unsigned char *haddr);
extern struct net_device *alloc_etherdev(int sizeof_priv);
-static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src,
int len, int base)
+static inline void eth_copy_and_sum (struct sk_buff *dest,
+ const unsigned char *src,
+ int len, int base)
{
memcpy (dest->data, src, len);
}
@@ -55,7 +57,7 @@
*
* Return true if the address is valid.
*/
-static inline int is_valid_ether_addr( u8 *addr )
+static inline int is_valid_ether_addr( const u8 *addr )
{
const char zaddr[6] = {0,};
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: IPv4 and IPv6 stack multi-FIB, scalable in the million of entries., Andi Kleen |
|---|---|
| Next by Date: | [PATCH] dummy -- support hardware address, Stephen Hemminger |
| Previous by Thread: | Re: IPv4 and IPv6 stack multi-FIB, scalable in the million of entries., Andi Kleen |
| Next by Thread: | Re: [PATCH] etherdevice.h -- make constant args, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |