Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2482475imd; Fri, 2 Nov 2018 12:10:33 -0700 (PDT) X-Google-Smtp-Source: AJdET5edkCL2bnUtvqJrpLN5XiS9g5coUol8Bj8vyLy+erGGhAWdJihpKI3s6XEapu0fLjFoWxeJ X-Received: by 2002:a63:495b:: with SMTP id y27mr8869877pgk.32.1541185833014; Fri, 02 Nov 2018 12:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541185832; cv=none; d=google.com; s=arc-20160816; b=OuNpBgm2COvAu4dvoohlCIe6Q4vgLJi8X2IYWiuaXqZRxIImqxUwemyFhBMFcsd21v O1BO/2R15QbLjquuGGJT5UphZcUzPmshshTzELZ37ok60wx243CnmKBxmhJudYI3I8eH NDuhaCMNwldXxg9RlZxHB+Z+yYM99M8Z02gPhd5ApZuK5i0D/b3Ng8ozq0M0MIsWmM8K K6exT95pqAbMQftiYI9WGt1TLOiQxdLBrrTUqgAVR6ucrAyB7XDe/G2Fx8TNO1ZJumf/ rbgsDEQ9W+nwzeYp0GzLk8jbIM9w0nMnMwJ7Faov8q/4IGnr1rZ2qT2KHpIwl4lmafsT YSyQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lO5tG5zsPj2g6oikY2ugbi2QKV1XSWJ7t148isHXTAQ=; b=rOPAN0avH9xZ88AVMNa7sxk6RzWSEygE5xLaI0PmvEKqxx/GrUDKD3k1rQQc6U1Q3G JdQCDHu/Q7UrflHKN1oP5zZjAT/2QbhZr89So9ZqbnH8C37PYffqHJdDbGJyhDKokRVO BmFJbw8rvUxnmj815dxu/Q0bFhNLbHTSCy8jmdmyAbpCvrsLmKz1xhzY9RF4wIKXjHp0 YRoYqEjXCkQre7hZwfpNLMywI5bPPRbzrg65CzdM9viXi5YJyk8vLF5kRnFHI6eiuODP s+7rhXDn+8vCQdy16/E2R5Y4YDNML9bULnHHWhGG1PJ6nT4kZAqy+Lli9K1MQLR802ro eIig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iwS0dCfp; 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 s3-v6si35490748pgi.366.2018.11.02.12.10.18; Fri, 02 Nov 2018 12:10:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iwS0dCfp; 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 S1729078AbeKCDr1 (ORCPT + 99 others); Fri, 2 Nov 2018 23:47:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:41470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbeKCDr0 (ORCPT ); Fri, 2 Nov 2018 23:47:26 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6EF352082E; Fri, 2 Nov 2018 18:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183955; bh=RPEpBJ0qIElvSRdMgREDFVkNqnku9DQH+L7SYAfnGRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwS0dCfplEI0eZ92sppyrOiIiEd89EmWdluIDKdVIuqzpdDTEm2EZEaArR6etjp1b y5y0d18PSKFjo8fx0y2kX/NOhtJQ7iyQ+VJhSewg8tlu4Gig/RaOVuv9SCY3dbNys6 BGipTd69TLnS7ZyFWkuVHgRtYFy8eS6aM5bSDF4I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 033/150] qed: Avoid implicit enum conversion in qed_iwarp_parse_rx_pkt Date: Fri, 2 Nov 2018 19:33:15 +0100 Message-Id: <20181102182905.639291405@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 77f2d753819b7d50c16abfb778caf1fe075faed0 ] Clang warns when one enumerated type is implicitly converted to another. drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1713:25: warning: implicit conversion from enumeration type 'enum tcp_ip_version' to different enumeration type 'enum qed_tcp_ip_version' [-Wenum-conversion] cm_info->ip_version = TCP_IPV4; ~ ^~~~~~~~ drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1733:25: warning: implicit conversion from enumeration type 'enum tcp_ip_version' to different enumeration type 'enum qed_tcp_ip_version' [-Wenum-conversion] cm_info->ip_version = TCP_IPV6; ~ ^~~~~~~~ 2 warnings generated. Use the appropriate values from the expected type, qed_tcp_ip_version: TCP_IPV4 = QED_TCP_IPV4 = 0 TCP_IPV6 = QED_TCP_IPV6 = 1 Link: https://github.com/ClangBuiltLinux/linux/issues/125 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c index 90a2b53096e2..51bbb0e5b514 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c @@ -1710,7 +1710,7 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, cm_info->local_ip[0] = ntohl(iph->daddr); cm_info->remote_ip[0] = ntohl(iph->saddr); - cm_info->ip_version = TCP_IPV4; + cm_info->ip_version = QED_TCP_IPV4; ip_hlen = (iph->ihl) * sizeof(u32); *payload_len = ntohs(iph->tot_len) - ip_hlen; @@ -1730,7 +1730,7 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, cm_info->remote_ip[i] = ntohl(ip6h->saddr.in6_u.u6_addr32[i]); } - cm_info->ip_version = TCP_IPV6; + cm_info->ip_version = QED_TCP_IPV6; ip_hlen = sizeof(*ip6h); *payload_len = ntohs(ip6h->payload_len); -- 2.17.1