diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2017-08-15 11:38:48 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-08-25 16:00:23 +0300 |
commit | 6a9971dd8dd1cf982e7ae34ae2b62ccdadaed1c9 (patch) | |
tree | d656a693c1f2701fafcba9672af0c5f11d84f5d3 /platform/linux-generic/pktio/ethtool.c | |
parent | f637a36cd2a7fc125a2d90ed5a93933007987e95 (diff) |
linux-gen: pktio: ethtool: add void pointer type casts
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>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/pktio/ethtool.c')
-rw-r--r-- | platform/linux-generic/pktio/ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/linux-generic/pktio/ethtool.c b/platform/linux-generic/pktio/ethtool.c index d8f9e12cb..482af5b6b 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; |