Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3577958yba; Mon, 8 Apr 2019 23:46:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCFjmlrzmH9R58wh8gdvIWmtosZZbot62TVXaqgkiuYf9U50kvktAjOWCNaGuIyB0tEwXq X-Received: by 2002:a17:902:28a9:: with SMTP id f38mr15270656plb.295.1554792399422; Mon, 08 Apr 2019 23:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554792399; cv=none; d=google.com; s=arc-20160816; b=0jJPwlvZbnrLeMVL/5Iw0pj9TPVCRl8InqO+Xu4MgNh2O9IlQmBuqWPyEjJA+y7IZi U0vl2Um5LNfZNIdHPRFf7zD8XUAsW2bhCT58iRgKVum68NCU9j7uxOtIpLkkccgCFHzc i3VLzu1jF7sUgJcHG9j/gxPfcAgvGUrWCqtMP/moS6tXfGgVu8x4b4eF4cNaBWS5wYT0 3swhNKy1LaFLF8dvNEFlJMvHI5h4PdhKBiOhjeuMa1zXI1lIakqRCz0lNVTPWM72tZmd yziDBcvBS9SPlyIqMuJ/JdpP52S2wZy1K9kkoNrcjeSXAj0kt/aDaovSt6AmFND/MY32 cTbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=H3AGjhJG/qECk6YIraAzXhJt9zQXwQlyVHfKeK5Cpu0=; b=x87l5AFrQa5WVJ1tyOWq6M2xnLsT0ZU4n1V9RGSrvgma6gZfk0H95y3SSNmYOp278o lSjiI4Ri8Mp7iX3mSZvnAivZo0lHDM+44PGvkUeaCb1n4w3aRZhvrJYL4RSOUrPm7r76 NMo7d1Blcyktdh8yjjRkrqGZgOBTUrZDIz+MGqYtoK3N6YrpWNxiHxgRfIbu8jgrkoka oDCbN3x8nlDhgZJ/xUbunp8NaIRycTeVLvF6wa0E2H73tK94u4hDZc3BZVEqZsPAhoai Gm3k2/ZyDvTXCqB07XYVUOsmpH8vggW0Swv23PUhm9BQ7JUQjN73H3MgrhFtWjOIDdn8 w7ew== 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 g37si6724150plb.180.2019.04.08.23.46.23; Mon, 08 Apr 2019 23:46:39 -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 S1726574AbfDIGpO (ORCPT + 99 others); Tue, 9 Apr 2019 02:45:14 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:37080 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfDIGpO (ORCPT ); Tue, 9 Apr 2019 02:45:14 -0400 Received: by mail-qk1-f193.google.com with SMTP id c1so9587740qkk.4; Mon, 08 Apr 2019 23:45:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H3AGjhJG/qECk6YIraAzXhJt9zQXwQlyVHfKeK5Cpu0=; b=FMvfqC5N/ZZgDEqG2FBeomBJHLYArVRwLSutF98J3t/1/w7f1ELaH2/OG2/4xjjDcf LH5Ku/O9+/M7IrLIVCmVwGGcfVPi9abNsCGraj/FYRGsxqZFw6qrwVzEi3fimDzAcgUj Lky2OFp56V31oDELkkMdpS+S8wVPr5pUdi3SIGxwTf9kXMiXqrL1RJXPG0Gm+JrKkrHg DeijuXf2tWmRb6gImE5g+3FfU43fZ5YVYfSm1KW82vGDEE3oElvwza6Pk4aRuWriuGTE O+447StXRtOdzFySVKyVpVkfQaOB/onkS4T/Od5wc2M8tNksZY43uzb+0pNmFS+POD+b zqXw== X-Gm-Message-State: APjAAAX21FvNZh6snlWoEFO0W6VMGwayybAqgxdYOYUpqav8k4Vl33j1 LjeN1M+/ZtkQsQgxTBCaNekUT1riRfKrukeZeco= X-Received: by 2002:a37:9e8a:: with SMTP id h132mr25649612qke.74.1554792313330; Mon, 08 Apr 2019 23:45:13 -0700 (PDT) MIME-Version: 1.0 References: <20190408212648.2407234-1-arnd@arndb.de> <20190408212648.2407234-4-arnd@arndb.de> <20190408221632.GB18333@archlinux-i9> In-Reply-To: <20190408221632.GB18333@archlinux-i9> From: Arnd Bergmann Date: Tue, 9 Apr 2019 08:44:56 +0200 Message-ID: Subject: Re: [PATCH 04/12] s390: qeth: address type mismatch warning To: Nathan Chancellor Cc: Martin Schwidefsky , Heiko Carstens , Julian Wiedmann , Ursula Braun , clang-built-linux@googlegroups.com, Nick Desaulniers , linux-s390 , "David S. Miller" , Kittipon Meesompop , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 9, 2019 at 12:16 AM Nathan Chancellor wrote: > > On Mon, Apr 08, 2019 at 11:26:17PM +0200, Arnd Bergmann wrote: > > 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 > > I wonder if it is better to just change the func parameter to type long. > I guess it's better to keep the type safety to make sure values aren't > unintentionally mixed but the body of the functions is the same so does > the type actually matter? I think using the right enum type makes most sense here, as this seems to be something that is easy to confuse. Arnd