From patchwork Mon Apr 8 21:26:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161949 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172244jan; Mon, 8 Apr 2019 14:28:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo/GXWECCyuab9ajphCbThHKO8LBPQoId148DB/S6rSHfxDpF1m4vtqVnEta6TzUttTcnY X-Received: by 2002:a62:6490:: with SMTP id y138mr32297682pfb.230.1554758895635; Mon, 08 Apr 2019 14:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758895; cv=none; d=google.com; s=arc-20160816; b=h9M1gkjU/A3RJr7fxseKXSRdky7KVjkQtTxc5hM4Yxxot1fe9SwsD8BaQV67irIQx2 3NHpwzgb4T7HVS3GrZZ0JurrcK8d/eQPMK67oo+U2GNVdhfXnXZQvIZarwQH7m/Ydud3 W3LJ4UfyZFxZHY51Fsf464HhGUzORI9INyJn1ywv8crtA3qojU0lkj34WkN/7j7+Il4c aEWGcfkurl5XFf12gZ2FiY8igxBZCLbwi2NKb/KnuY7vfN0l+wzctAL5xrFOhBgWmlsr m9O8SDxCGEcwHz4cpRjA1g11oe77anXc5XQnt1zRT3MlpuA/jNgO13daKFGyaVizYYGE hxNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XiabR71IOQTGYg0SyygtIZeSwowqtViGDbaEKgA/Gd8=; b=OMpBNDqajJFeUSEkp6FI4CyvdhWbfLHPsPP8B2gk08dMb8U6MdnnKS2F00w6p87s3X Z1X69XKT9bB3yyfH7sTOG0oq0PFrzv1se2Heb4Yfq7ecoE6w5ewJ3mlvTGGVyIXPSCPv +yW7Iudb65/kh56sdnfUagFOyFZ4IX2JI5ErtybQQywArrotksqw/i1N8Y0cbHS4sFWA AsCIWHvy2YsVpgtQUU+pLKGaokM4SYwxCdx8U2IcZu4mFhLCOTTJEmW9boLra7wY/2jU YdoTGUu+Qm3Z/ibNclq9cmAXO2HBbXotffBy9AAMghtbH55ilqthzPBpV6tWHp3MGgXn IXKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37si3909051pla.97.2019.04.08.14.28.15; Mon, 08 Apr 2019 14:28:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729325AbfDHV2O (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:14 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:34741 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfDHV2N (ORCPT ); Mon, 8 Apr 2019 17:28:13 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mow4E-1gYA3B1D6U-00qR62; Mon, 08 Apr 2019 23:28:03 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Julian Wiedmann , Ursula Braun Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Kittipon Meesompop , linux-kernel@vger.kernel.org Subject: [PATCH 04/12] s390: qeth: address type mismatch warning Date: Mon, 8 Apr 2019 23:26:17 +0200 Message-Id: <20190408212648.2407234-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:+QJU0uJxcc6xEbQFznVyL0iC3/HwW742Nz5nMKVxDCcza0Vsbs3 CeF6aQuoUkeYzjFzTXZ0dsCKyGtaQm0aCegCCk+8QgfIXmA2JcWO8VbtWsxSEcgvgEsKaq7 fRMdc2Nz2wdHcHRrRWFIRCOGsC6W/JXeKKGChmNmjpt2OZkOdSAJGTqdh4ZTse8SJgjBct5 Ukc/DZR9TWhDihkEz6a6Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Js6QLh8dEi4=:2WKLJ1YqPSrMciIZ6UXtdB hbjJhkTr+iACVzmmWtwrh54IOiRI0FRTl3akDmdkjhSZHglcSMTykMeEi7MJ3jsI7oYI3Fx2v CLgmIu+Tw5Luy71NZbO7M7a6S7n5xEXxVpVPPHwRzj49fAupP9RQg0UyI+F13Dd82aKACJmhN zoXeqtYjs9AMezdTo3SlZN9e2vvZ1lhB+C3pT5mbEh0tSyVFoY5TY3hGaBOmXB07Im6Lg8yGL 8hTrH2fF5RICvwVsyWIzXqmEUoMoRHz01dP1kaCksGzM8/WHLaUGE9xBY4tYEyqOnu9mUU+Y2 en+adaLqpX2rzJVmmP/G424Yx6rUBST4WZp0DPktnXzq+e+2bq/biyVHHBKff/2CW8RmLjJvs KQ+edLxIqi1MYBPgpXxKLjABKkqqlSscxX4Q5D4w0MNErfMeD4w0W9A9ZESarHL2W1oaeyTVQ YZwWcGoLCn0vgIBv7rD/XYgQawnrzaS3hwtq5936ROcYd0Ql4ZQtF6+7QTPScLQoow0OhHjQ3 9fCd0ZtfQqV5lKk5InRR3GlJNrL8duIpuMM+XEq/uufWaGmSiVkTxWx2+YuaeSk/ny8kAI816 74f5SbPwzyI9IVfYekabs8XV5C5Zz7IQcxPL1HiSjRmxpm3TRf4JqIctLpx5LPc8Y0Xk4XK2w 05pT+gWWtQZaz2z2WLFcKtBXmlOg5AoFVvdUYD9NNIK5OxEk24WNGv8Xo+jHrcEgAEY6otdAT 11QtMd0Qbx7OQukYEXmFF+xQ8gBegdR6STllSw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Arnd Bergmann --- drivers/s390/net/qeth_core.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index c851cf6e01c4..d603dfea97ab 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -163,6 +163,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) { @@ -176,9 +182,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) \