diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-07-07 03:49:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-07 12:47:11 -0700 |
commit | 82e7627fd4d8592be2acb908943fb943c440840d (patch) | |
tree | 5ee0f29372776e8d8b76f9e4a562c77b4f7fd2e2 /drivers/net/phy/dp83640.c | |
parent | 4f2b38e3ea4a64ea23e313a78d9974ca6b5d7703 (diff) | |
download | linux-stable-82e7627fd4d8592be2acb908943fb943c440840d.tar.gz linux-stable-82e7627fd4d8592be2acb908943fb943c440840d.tar.bz2 linux-stable-82e7627fd4d8592be2acb908943fb943c440840d.zip |
net: phy: dp83640: Fixup cast to restricted __be16 warning
ntohs() expects to be passed a __be16. Correct the type of the
variable holding the sequence ID.
Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r-- | drivers/net/phy/dp83640.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index ecbd5e0d685c..da31756f5a70 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -803,9 +803,10 @@ static int decode_evnt(struct dp83640_private *dp83640, static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts) { - u16 *seqid, hash; unsigned int offset = 0; u8 *msgtype, *data = skb_mac_header(skb); + __be16 *seqid; + u16 hash; /* check sequenceID, messageType, 12 bit hash of offset 20-29 */ @@ -836,7 +837,7 @@ static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts) if (rxts->msgtype != (*msgtype & 0xf)) return 0; - seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID); + seqid = (__be16 *)(data + offset + OFF_PTP_SEQUENCE_ID); if (rxts->seqid != ntohs(*seqid)) return 0; |