public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Stefan Raspl <raspl@linux.ibm.com>,
	Ursula Braun <ubraun@linux.ibm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Julian Wiedmann <jwi@linux.ibm.com>
Subject: [PATCH net-next 1/8] s390: qeth: address type mismatch warning
Date: Thu, 25 Apr 2019 18:25:54 +0200	[thread overview]
Message-ID: <20190425162601.91997-2-jwi@linux.ibm.com> (raw)
In-Reply-To: <20190425162601.91997-1-jwi@linux.ibm.com>

From: Arnd Bergmann <arnd@arndb.de>

clang produces a harmless warning for each use for the qeth_adp_supported
macro:

drivers/s390/net/qeth_l2_main.c:559:31: warning: implicit conversion from enumeration type 'enum qeth_ipa_setadp_cmd' to
      different enumeration type 'enum qeth_ipa_funcs' [-Wenum-conversion]
        if (qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE))
            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/s390/net/qeth_core.h:179:41: note: expanded from macro 'qeth_adp_supported'
        qeth_is_ipa_supported(&c->options.adp, f)
        ~~~~~~~~~~~~~~~~~~~~~                  ^

Add a version of this macro that uses the correct types, and
remove the unused qeth_adp_enabled() macro that has the same
problem.

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index fbaf434e2e34..86cae5e8e2c2 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -165,6 +165,12 @@ struct qeth_vnicc_info {
 	bool rx_bcast_enabled;
 };
 
+static inline int qeth_is_adp_supported(struct qeth_ipa_info *ipa,
+		enum qeth_ipa_setadp_cmd func)
+{
+	return (ipa->supported_funcs & func);
+}
+
 static inline int qeth_is_ipa_supported(struct qeth_ipa_info *ipa,
 		enum qeth_ipa_funcs func)
 {
@@ -178,9 +184,7 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa,
 }
 
 #define qeth_adp_supported(c, f) \
-	qeth_is_ipa_supported(&c->options.adp, f)
-#define qeth_adp_enabled(c, f) \
-	qeth_is_ipa_enabled(&c->options.adp, f)
+	qeth_is_adp_supported(&c->options.adp, f)
 #define qeth_is_supported(c, f) \
 	qeth_is_ipa_supported(&c->options.ipa4, f)
 #define qeth_is_enabled(c, f) \
-- 
2.16.4

  reply	other threads:[~2019-04-25 16:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 16:25 [PATCH net-next 0/8] s390/qeth: updates 2019-04-25 Julian Wiedmann
2019-04-25 16:25 ` Julian Wiedmann [this message]
2019-04-25 16:25 ` [PATCH net-next 2/8] s390/qeth: remove RX seqno in skb->cb Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 3/8] s390/qeth: clean up stale buffer state documentation Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 4/8] s390/qeth: use IS_* helpers for checking device type Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 5/8] s390/qeth: don't clear Output buffers on every queue init Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 6/8] s390/qeth: cache max number of available buffer elements Julian Wiedmann
2019-04-25 16:26 ` [PATCH net-next 7/8] s390/qeth: extract helper to determine L2 cast type Julian Wiedmann
2019-04-25 16:26 ` [PATCH net-next 8/8] s390/qeth: trust non-IP cast type in qeth_l3_fill_header() Julian Wiedmann
2019-04-26 15:14 ` [PATCH net-next 0/8] s390/qeth: updates 2019-04-25 David Miller

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=20190425162601.91997-2-jwi@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=ubraun@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox