]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ethernet: constify eth_get_headlen()'s data argument
authorAlexander Lobakin <alobakin@pm.me>
Sun, 14 Mar 2021 11:11:41 +0000 (11:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Mar 2021 21:48:02 +0000 (14:48 -0700)
It's used only for flow dissection, which now takes constant data
pointers.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/etherdevice.h
net/ethernet/eth.c

index bcb2f81baafb37890c2938a4ca21b40b1b7a0e89..330345b1be5499e69a3e96de632d97e663561ad2 100644 (file)
@@ -29,7 +29,7 @@ struct device;
 int eth_platform_get_mac_address(struct device *dev, u8 *mac_addr);
 unsigned char *arch_get_platform_mac_address(void);
 int nvmem_get_mac_address(struct device *dev, void *addrbuf);
-u32 eth_get_headlen(const struct net_device *dev, void *data, unsigned int len);
+u32 eth_get_headlen(const struct net_device *dev, const void *data, u32 len);
 __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
 extern const struct header_ops eth_header_ops;
 
index 4106373180c6a575bb76cf88bf2ad66c72980d50..e01cf766d2c50a4ae1b4e6dffedb07acfd16ff87 100644 (file)
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(eth_header);
  * Make a best effort attempt to pull the length for all of the headers for
  * a given frame in a linear buffer.
  */
-u32 eth_get_headlen(const struct net_device *dev, void *data, unsigned int len)
+u32 eth_get_headlen(const struct net_device *dev, const void *data, u32 len)
 {
        const unsigned int flags = FLOW_DISSECTOR_F_PARSE_1ST_FRAG;
        const struct ethhdr *eth = (const struct ethhdr *)data;