staging: r8188eu: Fix incorrect types in arguments
GCC + Sparse emit warnings of passing incorrect type in arguments of some functions because of different base types. Fix them by changing the types of the parameters of the above-mentioned functions. In the meantime, remove the unnecessary casts of those arguments which are then passed to memcpy() within those same functions. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210805131108.19775-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
066eea44c1
commit
66e9564aae
@ -134,37 +134,37 @@ static inline void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr
|
||||
}
|
||||
|
||||
static inline void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
|
||||
unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
|
||||
__be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
|
||||
{
|
||||
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
|
||||
|
||||
networkAddr[0] = NAT25_IPX;
|
||||
memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
|
||||
memcpy(networkAddr+1, ipxNetAddr, 4);
|
||||
memcpy(networkAddr+5, ipxNodeAddr, 6);
|
||||
}
|
||||
|
||||
static inline void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
|
||||
unsigned int *ipxNetAddr, unsigned short *ipxSocketAddr)
|
||||
__be32 *ipxNetAddr, __be16 *ipxSocketAddr)
|
||||
{
|
||||
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
|
||||
|
||||
networkAddr[0] = NAT25_IPX;
|
||||
memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
|
||||
memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
|
||||
memcpy(networkAddr+1, ipxNetAddr, 4);
|
||||
memcpy(networkAddr+5, ipxSocketAddr, 2);
|
||||
}
|
||||
|
||||
static inline void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
|
||||
unsigned short *network, unsigned char *node)
|
||||
__be16 *network, unsigned char *node)
|
||||
{
|
||||
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
|
||||
|
||||
networkAddr[0] = NAT25_APPLE;
|
||||
memcpy(networkAddr+1, (unsigned char *)network, 2);
|
||||
memcpy(networkAddr+1, network, 2);
|
||||
networkAddr[3] = *node;
|
||||
}
|
||||
|
||||
static inline void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
|
||||
unsigned char *ac_mac, unsigned short *sid)
|
||||
unsigned char *ac_mac, __be16 *sid)
|
||||
{
|
||||
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user