diff mbox series

[v2,2/16] linux-gen: pktio: ethtool: add void pointer type casts

Message ID 1502791206-2437-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v2,1/16] configure: move configure header to top of build tree | expand

Commit Message

Github ODP bot Aug. 15, 2017, 9:59 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


It makes sense to convert ifr_data to void pointer, since exact type is
implementation-defined.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 127 (lumag:improve-build)
 ** https://github.com/Linaro/odp/pull/127
 ** Patch: https://github.com/Linaro/odp/pull/127.patch
 ** Base sha: 90d4ce1b3b25ca18446131906007571cc0ed0191
 ** Merge commit sha: 3e7a44d8f4b7c90183d3bd3b57bc812f16de030f
 **/
 platform/linux-generic/pktio/ethtool.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/ethtool.c b/platform/linux-generic/pktio/ethtool.c
index d8f9e12c..482af5b6 100644
--- a/platform/linux-generic/pktio/ethtool.c
+++ b/platform/linux-generic/pktio/ethtool.c
@@ -30,13 +30,13 @@  static struct ethtool_gstrings *get_stringset(int fd, struct ifreq *ifr)
 	sset_info.hdr.cmd = ETHTOOL_GSSET_INFO;
 	sset_info.hdr.reserved = 0;
 	sset_info.hdr.sset_mask = 1ULL << ETH_SS_STATS;
-	ifr->ifr_data =  &sset_info;
+	ifr->ifr_data =  (void *)&sset_info;
 	if (ioctl(fd, SIOCETHTOOL, ifr) == 0) {
 		len = sset_info.hdr.sset_mask ? sset_info.hdr.data[0] : 0;
 	} else if (errno == EOPNOTSUPP && drvinfo_offset != 0) {
 		/* Fallback for old kernel versions */
 		drvinfo.cmd = ETHTOOL_GDRVINFO;
-		ifr->ifr_data = &drvinfo;
+		ifr->ifr_data = (void *)&drvinfo;
 		if (ioctl(fd, SIOCETHTOOL, ifr)) {
 			__odp_errno = errno;
 			ODP_ERR("Cannot get stats information\n");
@@ -62,7 +62,7 @@  static struct ethtool_gstrings *get_stringset(int fd, struct ifreq *ifr)
 	strings->cmd = ETHTOOL_GSTRINGS;
 	strings->string_set = ETH_SS_STATS;
 	strings->len = len;
-	ifr->ifr_data = strings;
+	ifr->ifr_data = (void *)strings;
 	if (ioctl(fd, SIOCETHTOOL, ifr)) {
 		__odp_errno = errno;
 		ODP_ERR("Cannot get stats information\n");
@@ -101,7 +101,7 @@  static int ethtool_stats(int fd, struct ifreq *ifr, odp_pktio_stats_t *stats)
 
 	estats->cmd = ETHTOOL_GSTATS;
 	estats->n_stats = n_stats;
-	ifr->ifr_data = estats;
+	ifr->ifr_data = (void *)estats;
 	err = ioctl(fd, SIOCETHTOOL, ifr);
 	if (err < 0) {
 		__odp_errno = errno;