From patchwork Tue Aug 15 09:59:52 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: 110112 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5463086qge; Tue, 15 Aug 2017 03:02:03 -0700 (PDT) X-Received: by 10.237.57.163 with SMTP id m32mr41121111qte.37.1502791323577; Tue, 15 Aug 2017 03:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502791323; cv=none; d=google.com; s=arc-20160816; b=yxb45eVjxu7gIji6KFI6PT1Q7WNX6lrZqTHlbacCL9IAR0gz4gM1DuAv6HJlrEKrCD 9le61i8a86OeY5m7goJpzC2IT9/GI33Svlv8w869q7VOec43b2HTKTJIm7hKhHXBGjwy OsDP1/ODoLv7CdUZssXkUmxqkQywexNaYBVTzEpBxSoCOIRyySCNdQ37iek9M731ewK7 8eubnTo5f7kZzQSMznaq+vWkbgIaDXUnwzYdVF4AS3zoW/lbMx421ThlKVphnXywtEZF GQQQZZSrYFjb//qmdNn9srawj2hz6416JDVhF00f4X8lwUJA6CXCZIH/qjcPWBe8iiBr opUQ== 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=PgOKG+rf4bNNEbqPLqVeomQlkIdwqJ6G3MRfqk4Em3k=; b=olobQuoUFvJAmptF6MuVWpUWJTpdFBGhIo2YFxLSwURyVT+E36d/I7lWQeHNPeO1D5 xGOtUTBTT5wkuIwyHOrO2S5butr6fe8AQJpLhyqXsNACbgiTj9SEh5FTJ5AsyXmrEjX4 VnQdN2Ln54pB8LgisnIwqdHOBtEGRRMlamO5lqW8N0U8zDH1fvU+M7jphAyLJGPIRd29 Rh84VM5qEe6a4Ltb8tIAKD7g1J0sVC6j+e35W17yP7Xi86rGLdBNYoUZPapMk0BCTDt1 +QWLIZ1WK1emtGiq3gHpwiOJ43Sq0OD0fyhtrm/5Kv/NtCzM4e7dInvFbd8H3GOZgkwF rnGw== 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 b72si8117021qkg.336.2017.08.15.03.02.03; Tue, 15 Aug 2017 03:02:03 -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 110E965C8E; Tue, 15 Aug 2017 10:02:03 +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, RCVD_IN_DNSWL_NONE,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 09A1165C0E; Tue, 15 Aug 2017 10:00:38 +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 2DDBF644C5; Tue, 15 Aug 2017 10:00:31 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 076B264475 for ; Tue, 15 Aug 2017 10:00:29 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 5BEDA51036E3 for ; Tue, 15 Aug 2017 13:00:27 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id otk3J1pS5b-0RReNCZx; Tue, 15 Aug 2017 13:00:27 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fa5mS4tQKd-0QjK4rD8; Tue, 15 Aug 2017 13:00:26 +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, 15 Aug 2017 12:59:52 +0300 Message-Id: <1502791206-2437-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502791206-2437-1-git-send-email-odpbot@yandex.ru> References: <1502791206-2437-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 127 Subject: [lng-odp] [PATCH v2 2/16] 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: 90d4ce1b3b25ca18446131906007571cc0ed0191 ** Merge commit sha: 3e7a44d8f4b7c90183d3bd3b57bc812f16de030f **/ 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;