netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] etherdevice.h -- make constant args
@ 2004-04-08 18:06 Stephen Hemminger
  2004-04-08 21:51 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2004-04-08 18:06 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Jeff Garzik

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,};
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-08 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-08 18:06 [PATCH] etherdevice.h -- make constant args Stephen Hemminger
2004-04-08 21:51 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).