Skip to content

Commit fcc9b50

Browse files
committed
Revert "greybus: gb-beagleplay: Ensure le for values in transport"
This reverts commit 52eb678. Turns out to not be correct, a new version will be generated later. Link: https://lore.kernel.org/r/[email protected] Cc: Ayush Singh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 52eb678 commit fcc9b50

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/greybus/gb-beagleplay.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ static void hdlc_rx_greybus_frame(struct gb_beagleplay *bg, u8 *buf, u16 len)
9393
memcpy(&cport_id, hdr->pad, sizeof(cport_id));
9494

9595
dev_dbg(&bg->sd->dev, "Greybus Operation %u type %X cport %u status %u received",
96-
hdr->operation_id, hdr->type, le16_to_cpu(cport_id), hdr->result);
96+
hdr->operation_id, hdr->type, cport_id, hdr->result);
9797

98-
greybus_data_rcvd(bg->gb_hd, le16_to_cpu(cport_id), buf, len);
98+
greybus_data_rcvd(bg->gb_hd, cport_id, buf, len);
9999
}
100100

101101
static void hdlc_rx_dbg_frame(const struct gb_beagleplay *bg, const char *buf, u16 len)
@@ -340,15 +340,14 @@ static int gb_message_send(struct gb_host_device *hd, u16 cport, struct gb_messa
340340
{
341341
struct gb_beagleplay *bg = dev_get_drvdata(&hd->dev);
342342
struct hdlc_payload payloads[2];
343-
__le16 cport_id = le16_to_cpu(cport);
344343

345344
dev_dbg(&hd->dev, "Sending greybus message with Operation %u, Type: %X on Cport %u",
346345
msg->header->operation_id, msg->header->type, cport);
347346

348-
if (le16_to_cpu(msg->header->size) > RX_HDLC_PAYLOAD)
347+
if (msg->header->size > RX_HDLC_PAYLOAD)
349348
return dev_err_probe(&hd->dev, -E2BIG, "Greybus message too big");
350349

351-
memcpy(msg->header->pad, &cport_id, sizeof(cport_id));
350+
memcpy(msg->header->pad, &cport, sizeof(cport));
352351

353352
payloads[0].buf = msg->header;
354353
payloads[0].len = sizeof(*msg->header);

0 commit comments

Comments
 (0)