Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp339292ybl; Fri, 9 Aug 2019 06:49:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuqNkktWCErVieFWrvImDytqmCyRzbgtmrioYJT12om6OIhqHfPPePR0hn2NrXQVL3sNtc X-Received: by 2002:a65:448a:: with SMTP id l10mr17283011pgq.327.1565358561299; Fri, 09 Aug 2019 06:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565358561; cv=none; d=google.com; s=arc-20160816; b=NM/lC2jTcCMCJj5TjQoSV98YhlsS2Jx592ms7R83+JA+hSN/sKaWi898kvVEfl1TuI 316PzRKNiO5xbV0om4ag+ZxGrdiPZMzmbNzU1bOFq5oNp9EoQxxUCdaSVXzXZLd0OVp8 RW//sbJXR00T8Wlp3BSQoJXfE/Y+OB8jQ7YoWUN4Iqnip46/eOwp8FqwjvrLqg0MfxtG 0hUpk4HAdHdcTdPhYxQnfIT5zb5wQJCPDZ7h676fWVm6ZCqMGTqLcRgTdr6WHA/fcXYO IvDxrVYoqVa9Tj/lo0XYyVeU7M+5jII+AVcbfGH4stRR5xvws/lOyQdhrNRlYI9ATcHs J+ag== 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=pnpai7/9sKo8/ze4rXvTgKuEh9F6nC8qeTeo+DVWVas=; b=Y9Oi3knphA72zZDIBog2Vkd56GdgEJNXw98XWHeNRGDHvXT1gaDrm0lZqw3c2CLXTT WPpT0qrkHRXWZ0vu9lAKVwEFlJiJNxKIoYDAlNmzUWI9ewQw7SsWqbF79eBIgOiBIyNk a/PFUYh1RY7G5AGU96qqZo/07+o8H8Kzg8l+r/P+uo6bKzDekEzEXyECbKYf09cFqutH z1mNr80B4TWCbFYqzXuULpEty7mr94yh/D8DBIzT8NWcN30+b6CMqA7031pO/GC9mGZR vf7SfJ5xRTxWZodOHkpI8ODxtdlGzEjo4yFDsRO4CQXqbi9dUua5uOUso5U++e/Wwh6K t95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ROY1N4Nh; 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 t3si56368302pfh.218.2019.08.09.06.49.05; Fri, 09 Aug 2019 06:49:21 -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=ROY1N4Nh; 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 S2406873AbfHINru (ORCPT + 99 others); Fri, 9 Aug 2019 09:47:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:37872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436628AbfHINrr (ORCPT ); Fri, 9 Aug 2019 09:47:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 2CE4C21783; Fri, 9 Aug 2019 13:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565358466; bh=VpUaPtBQSyxfzF0SQEcUpF4jUmm349/aEi0TrQXcHvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ROY1N4NhcbIf2YXVpqWBz5yde7snrRzEvL0UvfBjJQkfr7fxMbXzk0L8+eIYfL5ig 14TxBn0/LrGBg/mH8rcebjjcYOfcOqxmNJGr9MVytT+hWpIB+aH05p+UAUHtX6IEPi NHLNKgSC/5GBwTv0VcUM3WC85x9tIX0wsEJgcM3A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jason Gunthorpe Subject: [PATCH 4.9 11/32] [PATCH] IB: directly cast the sockaddr union to aockaddr Date: Fri, 9 Aug 2019 15:45:14 +0200 Message-Id: <20190809133923.318510362@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809133922.945349906@linuxfoundation.org> References: <20190809133922.945349906@linuxfoundation.org> User-Agent: quilt/0.66 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 Like commit 641114d2af31 ("RDMA: Directly cast the sockaddr union to sockaddr") we need to quiet gcc 9 from warning about this crazy union. That commit did not fix all of the warnings in 4.19 and older kernels because the logic in roce_resolve_route_from_path() was rewritten between 4.19 and 5.2 when that change happened. Cc: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/core/sa_query.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -1109,7 +1109,6 @@ int ib_init_ah_from_path(struct ib_devic .net = rec->net ? rec->net : &init_net}; union { - struct sockaddr _sockaddr; struct sockaddr_in _sockaddr_in; struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; @@ -1117,12 +1116,13 @@ int ib_init_ah_from_path(struct ib_devic if (!device->get_netdev) return -EOPNOTSUPP; - rdma_gid2ip(&sgid_addr._sockaddr, &rec->sgid); - rdma_gid2ip(&dgid_addr._sockaddr, &rec->dgid); + rdma_gid2ip((struct sockaddr *)&sgid_addr, &rec->sgid); + rdma_gid2ip((struct sockaddr *)&dgid_addr, &rec->dgid); /* validate the route */ - ret = rdma_resolve_ip_route(&sgid_addr._sockaddr, - &dgid_addr._sockaddr, &dev_addr); + ret = rdma_resolve_ip_route((struct sockaddr *)&sgid_addr, + (struct sockaddr *)&dgid_addr, + &dev_addr); if (ret) return ret;