Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1707503ybt; Thu, 18 Jun 2020 15:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRpQrJnRfMa2IVBui22NRQCk46QzQjFNrQOrRe0K2t7xkV6bspBHfL1X3VX1+LLEUN32+H X-Received: by 2002:a17:906:490f:: with SMTP id b15mr837730ejq.180.1592519295907; Thu, 18 Jun 2020 15:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592519295; cv=none; d=google.com; s=arc-20160816; b=m74dvZ1YRwP5aM4mrSBzJVKHWzgDIO5Oy4IC26D7tMRS3Y8AEJrCXI9K8oEfqF31Dc Nn3HVQDQBha8CYVPo05QByTi5XimutzFBZwAxyo+QGL5LaHxiHPp1Av7t35tF9LVjx/M lp4JWS+x+1WJa+tRcTlStDBCwKwpyamO9dZ+9g4I3BUqrOk/OxFBxtwieSspozKDJAQh ASL/uI47XI+3kmKoMfDHUUQdurpwtPScb6q7aYE0sNxhOecrhdSs0SuGcKAK+w4t1xX7 PdjEgsq7umSll2YfHbJVDspQufatDrDtWlj4B3SZaz90ieNCj50moSUJxJEoFBNqgIza 58oA== 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 :wdcironportexception:ironport-sdr:ironport-sdr:ironport-sdr :dkim-signature; bh=iBi/u2U0YmZyCr4FVIcC59BKYIPqj3bKU/RIIYOEzb4=; b=emkq4tF98m1xVWxx7lp50GLWlGHKJNB7xgxrdNc9eA6QpAGmxPuB5HVvSFSkxnUaaI ReuGFkb7hcgn75KV8FrhzmMGS3YKdszozxn1WgFlZ/8MEV5cjR5Hqw30t1w4LaNfwBBH H49nQmtVmlhmD791yVD4y4vJ4i9LvtTBtZOu8nVKQMp6JXkamK3HNimQKmkMSkMNPQAg eEpsiGYhYm1199k6PPaj8tlAe6LNl0CJbtVcCs7ixBCUDfrNnFW6CnaPff4h3PLpMPcj 3VrjJLn2Gu1tGU2x3NY9+0ebZkSuHHo2/MaNKNSDVc6KaltnRERQUivjNXOUdQ7fCvCR lbTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UCkLZZdc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si2481869ejr.72.2020.06.18.15.27.48; Thu, 18 Jun 2020 15:28:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UCkLZZdc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730828AbgFRUCs (ORCPT + 99 others); Thu, 18 Jun 2020 16:02:48 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:16855 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730714AbgFRUCq (ORCPT ); Thu, 18 Jun 2020 16:02:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592510567; x=1624046567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gJuYaqcKR+OMZ7sPr5EK6CTqXx7WnxJVT3V/UoaoUYA=; b=UCkLZZdcDTo5oXLXKzeJk1GOYlrTgqkchBcrKP2JClc9xOKkMO2iNMf8 Bb83lyoW5P6uu62ozDd1lkyjymmCtJ+jpYXAfjGgEqIVfooEZA2ZYSC3m ciSJEejkjxeBCOHbj9AcgCiZH0mWPVpy+3DCuRDiRy2xRkHdAlMiAcGTO OQiOaLHaexSB5+viK3fLsFtfD39Bre0Wjb5+vk/ccSXAOOPksvRL2pIVP +N0ACGQiUfSAOtzx8mcXeJM4vGYfLCzmerj4cfSyJS9kR9TiUZc8/akYq lPRlDYU+Rk1Qu1gYR7KZM9/Wj5jpp+FF6qMZ4qPE22rci27fs/Vuiq5+K g==; IronPort-SDR: ILU2r48T7kblUQvxAN0an4u6NfzqwC+9koRWMrqmuxM250Ep55LnMiJ/m4KP7NJD0MkFFSMBZz NwRhkrDGJDVBXjQAkX2Sunc5K0fdhCS3D3w4TOofS1u8MDeW10NehjxlKaEkP4GMXyrUMBJIQw gVddJ7i+aFKhRXHTydyYlEPTycCiHWymC15ZFYTBdDDQEWn19lkr7QhiQBDt3lKwOKPnxQdV0h BofBirRpeAG2WFwfgOFiUMiNvpTUfy+9Ms6faCeyTo5MyCCMyhi0QD76Q6a0tb76RTn7SJXRrK NWg= X-IronPort-AV: E=Sophos;i="5.75,252,1589212800"; d="scan'208";a="140608375" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Jun 2020 04:02:46 +0800 IronPort-SDR: LKJNZlmvBCiB+DykRE8Uz/BbBy4U6ukRmQmjmu3TW6w+xpzoU7sIVM/ybDolXLLGG7bJvqREa0 GELjuqVgCy8PJi0mmEK7dELAE0UKgnMmk= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 12:51:25 -0700 IronPort-SDR: 4x42ejM9hx1A2RKaVuLbvcjCLRTdokmVOWyuf781LTlTNCDoj7DmNk3s2yEx6lMKSh8/mr630K RoEuSZq6Pohw== WDCIronportException: Internal Received: from usa001298.ad.shared (HELO localhost.hgst.com) ([10.86.58.149]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Jun 2020 13:02:44 -0700 From: Niklas Cassel To: Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni Cc: Niklas Cassel , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers Date: Thu, 18 Jun 2020 22:02:34 +0200 Message-Id: <20200618200235.1104587-3-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200618200235.1104587-1-niklas.cassel@wdc.com> References: <20200618200235.1104587-1-niklas.cassel@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Workarounds for gcc issues with initializers and anon unions was first introduced in commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4"). The gcc bug in question has been fixed since gcc 4.6.0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 The minimum gcc version for building the kernel has been 4.6.0 since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), and has since been updated to gcc 4.8.0 in commit 5429ef62bcf3 ("compiler/gcc: Raise minimum GCC version for kernel builds to 4.8"). For that reason, it should now be safe to remove these workarounds and make the code look like it did before commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4") was introduced. Signed-off-by: Niklas Cassel --- drivers/nvme/target/rdma.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index 6731e0349480..238bc55de561 100644 --- a/drivers/nvme/target/rdma.c +++ b/drivers/nvme/target/rdma.c @@ -1535,19 +1535,20 @@ static int nvmet_rdma_cm_accept(struct rdma_cm_id *cm_id, struct nvmet_rdma_queue *queue, struct rdma_conn_param *p) { - struct rdma_conn_param param = { }; - struct nvme_rdma_cm_rep priv = { }; + struct nvme_rdma_cm_rep priv = { + .recfmt = cpu_to_le16(NVME_RDMA_CM_FMT_1_0), + .crqsize = cpu_to_le16(queue->recv_queue_size), + }; + struct rdma_conn_param param = { + .rnr_retry_count = 7, + .flow_control = 1, + .initiator_depth = min_t(u8, p->initiator_depth, + queue->dev->device->attrs.max_qp_init_rd_atom), + .private_data = &priv, + .private_data_len = sizeof(priv), + }; int ret = -ENOMEM; - param.rnr_retry_count = 7; - param.flow_control = 1; - param.initiator_depth = min_t(u8, p->initiator_depth, - queue->dev->device->attrs.max_qp_init_rd_atom); - param.private_data = &priv; - param.private_data_len = sizeof(priv); - priv.recfmt = cpu_to_le16(NVME_RDMA_CM_FMT_1_0); - priv.crqsize = cpu_to_le16(queue->recv_queue_size); - ret = rdma_accept(cm_id, ¶m); if (ret) pr_err("rdma_accept failed (error code = %d)\n", ret); -- 2.26.2