[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191216161114.3604d45d@cakuba.netronome.com>
Date: Mon, 16 Dec 2019 16:11:14 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
devicetree@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Mark Rutland <mark.rutland@....com>,
Miroslav Lichvar <mlichvar@...hat.com>,
Murali Karicheri <m-karicheri2@...com>,
Rob Herring <robh+dt@...nel.org>,
Willem de Bruijn <willemb@...gle.com>,
Wingman Kwok <w-kwok2@...com>
Subject: Re: [PATCH V6 net-next 11/11] ptp: Add a driver for InES time
stamping IP core.
On Mon, 16 Dec 2019 08:13:26 -0800, Richard Cochran wrote:
> + clkid = (u64 *)(data + offset + OFF_PTP_CLOCK_ID);
> + portn = (u16 *)(data + offset + OFF_PTP_PORT_NUM);
> + seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
These should perhaps be __be types?
Looks like there is a few other sparse warnings in ptp_ines.c, would
you mind addressing those?
> + if (tag_to_msgtype(ts->tag & 0x7) != (*msgtype & 0xf)) {
> + pr_debug("msgtype mismatch ts %hhu != skb %hhu\n",
> + tag_to_msgtype(ts->tag & 0x7), *msgtype & 0xf);
> + return false;
> + }
> + if (cpu_to_be64(ts->clkid) != *clkid) {
> + pr_debug("clkid mismatch ts %llx != skb %llx\n",
> + cpu_to_be64(ts->clkid), *clkid);
> + return false;
> + }
> + if (ts->portnum != ntohs(*portn)) {
> + pr_debug("portn mismatch ts %hu != skb %hu\n",
> + ts->portnum, ntohs(*portn));
> + return false;
> + }
> + if (ts->seqid != ntohs(*seqid)) {
> + pr_debug("seqid mismatch ts %hu != skb %hu\n",
> + ts->seqid, ntohs(*seqid));
> + return false;
> + }
Powered by blists - more mailing lists