pkarashchenko commented on code in PR #7768:
URL: https://github.com/apache/nuttx/pull/7768#discussion_r1039380199


##########
arch/arm/src/tiva/lm/lm3s_ethernet.c:
##########
@@ -160,6 +160,12 @@
 
 #define TIVA_MAX_MDCCLK 2500000
 
+/* This is a helper pointer for accessing the contents of the Ethernet
+ * header
+ */
+
+#define BUF ((FAR struct eth_hdr_s *)&dev->d_buf[0])

Review Comment:
   remove `FAR`



##########
arch/arm/src/lpc54xx/lpc54_ethernet.c:
##########
@@ -253,6 +253,12 @@
 
 #define ETH8021QWBUF ((struct eth_8021qhdr_s *)priv->eth_dev.d_buf)
 
+/* This is a helper pointer for accessing the contents of the Ethernet
+ * header
+ */
+
+#define BUF ((FAR struct eth_hdr_s *)&dev->d_buf[0])

Review Comment:
   remove `FAR`



##########
net/devif/devif.h:
##########
@@ -233,6 +233,14 @@
 #  define DEVIF_IS_IPv6(dev) (0)
 #endif
 
+/* There are some helper pointers for accessing the contents of the Ethernet
+ * headers
+ */
+
+#define ETHBUF ((FAR struct eth_hdr_s *)\

Review Comment:
   add space `) \`



##########
net/arp/arp.h:
##########
@@ -81,8 +83,10 @@
 
 /* This is a helper pointer for accessing the contents of the IP header */
 
-#define ARPBUF    ((FAR struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN])
-#define ARPIPBUF  ((FAR struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN])
+#define ARPBUF   ((FAR struct arp_hdr_s *)\
+                  &dev->d_iob->io_data[CONFIG_NET_LL_GUARDSIZE])
+#define ARPIPBUF ((FAR struct arp_iphdr_s *)\

Review Comment:
   add space `) \`



##########
include/nuttx/net/netdev.h:
##########
@@ -157,17 +157,12 @@
 #  define NETDEV_ERRORS(dev)
 #endif
 
-/* There are some helper pointers for accessing the contents of the Ethernet
- * headers
- */
-
-#define ETHBUF ((FAR struct eth_hdr_s *)&dev->d_buf[0])
-
 /* There are some helper pointers for accessing the contents of the IP
  * headers
  */
 
-#define IPBUF(hl) ((FAR void *)&dev->d_buf[NET_LL_HDRLEN(dev) + (hl)])
+#define IPBUF(hl) ((FAR void *)\

Review Comment:
   add space `) \`



##########
net/arp/arp.h:
##########
@@ -81,8 +83,10 @@
 
 /* This is a helper pointer for accessing the contents of the IP header */
 
-#define ARPBUF    ((FAR struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN])
-#define ARPIPBUF  ((FAR struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN])
+#define ARPBUF   ((FAR struct arp_hdr_s *)\

Review Comment:
   add space `) \`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to