From patchwork Tue Aug 22 09:59:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 110625 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp2447649qge; Tue, 22 Aug 2017 03:02:31 -0700 (PDT) X-Received: by 10.55.33.225 with SMTP id f94mr121036qki.292.1503396151285; Tue, 22 Aug 2017 03:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503396151; cv=none; d=google.com; s=arc-20160816; b=WXHynfFn9SfuE5FMrYUc/dW6+dN/3sw/swLt2YNOYwcqdhejZIFXLPpyvwOIMevwRD cYIewz21gO0e3RPe7S1u1n61BGpJ0LLKULFiwNjruKPqoTzP4ZIlTqxRanaw5kdS/tvm a+N6sLixQZdBHC9oe+sF9QB6sJbZf0Wt0gRf91WlPoQS5RjLMGZyITTzxKZcOkfs+MxJ E5XUDqPV2cdMlGcXDiOJvA0bvqgf98sJF8J73fIWNYNMoM+W9F9EIstmtjGEkFvzuM8g XjHZ3aQvOB+Z+VdghjCP2s+V7B0iwzzsbdiF4m4obptCPgqhhDdoobQdeljInSB+cPpF uh3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=UNKhtJAs7g7dm6lk+WLTxIbgYy7WB2NJ8taOv903i6c=; b=y/2TlXmeXR+wQoTNRlhCBMRXGs18DkXNHaFzOotma7edyE7rIg9D72slhWTV+h6zQy 2pFylwbEkJhwkisIC95FirwoE79gJuEZ5YDmwT1V8OFTTEpYqW64pw6V8I3CzatIrVbY 7sUYtu61WvlsIRfp2rsQ58/a0t5vgtxiHxpDqXethdjbBv6RtlOvqGQBaVIAvk5fEL0e F96ipmWGJ5IIvSxTcDioDcMQPog+2erYgz61BPRbfFkwZUJ7zGtYoR26S4oxd1p9ZaQv tdkB+rMyCJYKUSmyRiYrFof8HwfBh0W2qSG9WSw37Tvc7GB+lTcIO5WpnX0OdkY+ry/K vUzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z189si3950585qkc.344.2017.08.22.03.02.30; Tue, 22 Aug 2017 03:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id D27F165BBF; Tue, 22 Aug 2017 10:02:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8023E65BC0; Tue, 22 Aug 2017 10:00:32 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id EC1A364474; Tue, 22 Aug 2017 10:00:19 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 6B9F564462 for ; Tue, 22 Aug 2017 10:00:17 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward104p.mail.yandex.net (Yandex) with ESMTP id BA0B8184AF9 for ; Tue, 22 Aug 2017 13:00:15 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id jEaoirnihl-0FD0gC5r; Tue, 22 Aug 2017 13:00:15 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Rlal5nTP8B-0EfqbkGr; Tue, 22 Aug 2017 13:00:14 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 22 Aug 2017 12:59:46 +0300 Message-Id: <1503396009-8350-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503396009-8350-1-git-send-email-odpbot@yandex.ru> References: <1503396009-8350-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 127 Subject: [lng-odp] [PATCH v5 2/25] linux-gen: pktio: ethtool: add void pointer type casts X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov It makes sense to convert ifr_data to void pointer, since exact type is implementation-defined. Signed-off-by: Dmitry Eremin-Solenikov --- /** 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: aecb3c7a442b426761f1e6f43308a1e9ea709ef3 ** Merge commit sha: 86e036501e05c61e5570d0908af382a61c2d4e89 **/ platform/linux-generic/pktio/ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;