All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: John Linville <linville@tuxdriver.com>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>, Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH ethtool 01/21] netlink: fix build warnings
Date: Fri, 29 May 2020 01:21:12 +0200 (CEST)	[thread overview]
Message-ID: <bb60cbfe99071fca4b0ea9e62d67a2341d8dd652.1590707335.git.mkubecek@suse.cz> (raw)
In-Reply-To: <cover.1590707335.git.mkubecek@suse.cz>

Depending on compiler version and options, some of these warnings may
result in build failure.

- gcc 4.8 wants __KERNEL_DIV_ROUND_UP defined before including ethtool.h
- avoid pointer arithmetic on void *

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
 netlink/desc-ethtool.c | 2 +-
 netlink/parser.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c
index 76c6f13e4648..423479dfc6a9 100644
--- a/netlink/desc-ethtool.c
+++ b/netlink/desc-ethtool.c
@@ -4,9 +4,9 @@
  * Descriptions of ethtool netlink messages and attributes for pretty print.
  */
 
+#include "../internal.h"
 #include <linux/ethtool_netlink.h>
 
-#include "../internal.h"
 #include "prettymsg.h"
 
 static const struct pretty_nla_desc __header_desc[] = {
diff --git a/netlink/parser.c b/netlink/parser.c
index fff23f2425e9..d790abedd482 100644
--- a/netlink/parser.c
+++ b/netlink/parser.c
@@ -1016,7 +1016,7 @@ int nl_parser(struct nl_context *nlctx, const struct param_parser *params,
 			buff = tmp_buff_find(buffs, parser->group);
 		msgbuff = buff ? &buff->msgbuff : &nlsk->msgbuff;
 
-		param_dest = dest ? (dest + parser->dest_offset) : NULL;
+		param_dest = dest ? ((char *)dest + parser->dest_offset) : NULL;
 		ret = parser->handler(nlctx, parser->type, parser->handler_data,
 				      msgbuff, param_dest);
 		if (ret < 0)
-- 
2.26.2


  reply	other threads:[~2020-05-28 23:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 23:21 [PATCH ethtool 00/21] netlink interface update for 5.7 release Michal Kubecek
2020-05-28 23:21 ` Michal Kubecek [this message]
2020-06-06 18:47   ` [PATCH ethtool 01/21] netlink: fix build warnings Heiko Thiery
2020-05-28 23:21 ` [PATCH ethtool 02/21] netlink: fix nest type grouping in parser Michal Kubecek
2020-05-29 14:28   ` Andrew Lunn
2020-05-28 23:21 ` [PATCH ethtool 03/21] netlink: fix msgbuff_append() helper Michal Kubecek
2020-05-29 14:29   ` Andrew Lunn
2020-05-28 23:21 ` [PATCH ethtool 04/21] update UAPI header copies Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 05/21] netlink: add more ethtool netlink message format descriptions Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 06/21] selftest: omit test-features if netlink is enabled Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 07/21] netlink: add netlink handler for gfeatures (-k) Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 08/21] netlink: add netlink handler for sfeatures (-K) Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 09/21] netlink: add netlink handler for gprivflags (--show-priv-flags) Michal Kubecek
2020-05-28 23:21 ` [PATCH ethtool 10/21] netlink: add netlink handler for sprivflags (--set-priv-flags) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 11/21] netlink: add netlink handler for gring (-g) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 12/21] netlink: add netlink handler for sring (-G) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 13/21] netlink: add netlink handler for gchannels (-l) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 14/21] netlink: add netlink handler for schannels (-L) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 15/21] netlink: add netlink handler for gcoalesce (-c) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 16/21] netlink: add netlink handler for scoalesce (-C) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 17/21] netlink: add netlink handler for gpause (-a) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 18/21] netlink: add netlink handler for spause (-A) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 19/21] netlink: add netlink handler for geee (--show-eee) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 20/21] netlink: add netlink handler for seee (--set-eee) Michal Kubecek
2020-05-28 23:22 ` [PATCH ethtool 21/21] netlink: add netlink handler for tsinfo (-T) Michal Kubecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb60cbfe99071fca4b0ea9e62d67a2341d8dd652.1590707335.git.mkubecek@suse.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.