Re: [PATCH V6 net-next 11/11] ptp: Add a driver for InES time stamping IP core.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> +	}




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux