fixes to remove sparse warnings:
sparse: sparse: cast to restricted __be64
Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
{
unsigned int offset = 14;
struct ethhdr *eth;
- u64 sec;
+ __be64 sec;
+ __be32 ns;
u8 *ptr;
- u32 ns;
if (len <= offset || !timestamp)
return 0;
ptr += sizeof(sec);
memcpy(&ns, ptr, sizeof(ns));
- sec = be64_to_cpu(sec) & 0xffffffffffffllu;
- ns = be32_to_cpu(ns);
- *timestamp = sec * NSEC_PER_SEC + ns + self->ptp_clk_offset;
+ *timestamp = (be64_to_cpu(sec) & 0xffffffffffffllu) * NSEC_PER_SEC +
+ be32_to_cpu(ns) + self->ptp_clk_offset;
eth = (struct ethhdr *)p;
u16 status;
u16 pkt_len;
u16 next_desc_ptr;
- u16 vlan;
+ __le16 vlan;
};
/* Hardware rx HW TIMESTAMP writeback */