Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1912748rwb; Thu, 15 Dec 2022 16:32:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ADPMUh9bw8Wr6bBbyB0l4Z+/nNonoOF/RPAmt3EyXrHrpO0xIKpuVIEw6I1YHvqBS+RKm X-Received: by 2002:a17:90b:3c8c:b0:219:8b27:961e with SMTP id pv12-20020a17090b3c8c00b002198b27961emr30602388pjb.28.1671150759915; Thu, 15 Dec 2022 16:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671150759; cv=none; d=google.com; s=arc-20160816; b=tcn1pt78KnvoNcLaOALZbRlWegK8n/Pj6PSYqPacEOh4qaZ/v63t5argpAFNBkI1jO PfNpFtZ0Ymc3UfARORz6aJJwXJy2Mnts1+buw1Mn5lKdA5oTTRBvZC/OboPDQEcceHjT +Jy0WXFgUgAPofGT5SxDaEC2iVqZAYc+VF4pHXJ6HmGFFHYW19mMKaFJhzDn6+FGJ8gl NVqn5/CfKqlwHCpmHxahmu+8jYRW3o8qrvNK5IQcUO7HLG14xmECVcIXhdBfRWXji5D5 aRNgCPRYycUwQEtHhhaH5wZG97L9aP4TaDKgFUEKrnLhgG+mT4NEgq48oXNYVAdRiqzX yNEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:message-id:date:subject:dkim-signature; bh=kQ9ItmDRgbW04LygMs9P/+XkNt2iGLa92u7ZmkVsxPg=; b=ncXlpkpU2W5DjQKztR+rt7xXR4MYrB6VShK8iV0fyP5dTVuLPtVXxxJiBTQ3azUghL rILV1xK8hCfoKkqQvxAfn2CJ5pItluDUtchpbdGVrAe8rDOLA1qkbcZpCQmffy7WsPfg pPSVpYqPN2dJaplR+GyloI0rAm6FAgYDeSEFRv1XT3RosDpuzJD4+HWKU8LhLHxcNeDW IWIkJWMmuj73Xp87/ueVubW8y7wyXk/mqFCrIxi7FGV7a0K7A6Q7HjmxX2m1dSv2Aq+2 xje4VdOBnmIw5iihj1435trXTsLSTcU7eAcJAN7avBIhePfmVKKJb4FECu7gTUSFrUoM F4CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3+h2uaJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nk3-20020a17090b194300b002199a9891desi6237483pjb.141.2022.12.15.16.32.31; Thu, 15 Dec 2022 16:32:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3+h2uaJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbiLOXch (ORCPT + 68 others); Thu, 15 Dec 2022 18:32:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiLOXcf (ORCPT ); Thu, 15 Dec 2022 18:32:35 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7016D4A5B6 for ; Thu, 15 Dec 2022 15:32:34 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id o12so749203pjo.4 for ; Thu, 15 Dec 2022 15:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=kQ9ItmDRgbW04LygMs9P/+XkNt2iGLa92u7ZmkVsxPg=; b=3+h2uaJDaSROOvhBboqSxfpmgcWvz1ocI/sUoSk0anox6Ro9tkY+Mpb7qnGlSAWbot HwE6sDES8qP6LiNBAOCrY4R27F6G8EjGIqNMEvtfvP54d17ZfNqltqikhSSphUyAbU4/ 2yaZ18MrDSAoHsCQkQq663M55YvdNlKljmrvnxnWHkgKuqPMqdVMn4vNQVGY277aTe+H VOXAed9NCFQOPMca8KEXgw/nfixmnkC646RmvPmTXxR3W5+GQ6sOFazodSMi4CcKFYrL AS1xmVxyDVs8DVPbKkdzgbQ9oAL9KpruyhHGWiKLQvCkRJ3vhluI6KkWjTKllhCHzJOD LNQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kQ9ItmDRgbW04LygMs9P/+XkNt2iGLa92u7ZmkVsxPg=; b=LwzhgZxT1u4RpgPC5sE9CGplpITnaKyFYsjLNM1wrIxkU41RZ3kzpwiKtuLA1ncfLA ItXSLn1qxuU32TO8HPe9245qosKjVS7lh4cl6ReG8xSvWRAEw6GR61O9JvqlaHdNBGoy pd6qsct2n/HZBPzcYMNr4B9OYqgI8Ut3wWWYjbTfVXbkiozUyetKAnh3exejyjBqg6+b zZ9czKDcc2OBD8L0KhD/irUzqjvX8aesqaN02suBKZiGEKnd6ZKUk3/L/t1Wv9Vx/fhR lyu34THr1WlKnnW66LAISvyQUlvFgbVQE92K7EvEiFX5GnZeIfQdvsoF8mrgui4fPztU zZyA== X-Gm-Message-State: ANoB5pmFHQz4+xRxXPNH5NBHr+1uYBoN333NfI8ucaEEoU9q3erGoDLX eDs+p8WemhJewUr/EusT9XJFNQ== X-Received: by 2002:a17:902:b087:b0:189:e81b:d25f with SMTP id p7-20020a170902b08700b00189e81bd25fmr29657502plr.56.1671147153845; Thu, 15 Dec 2022 15:32:33 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d50400b00182a9c27acfsm167565plg.227.2022.12.15.15.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 15:32:33 -0800 (PST) Subject: [PATCH] RDMA/rxe: Avoid unused variable warnings on 32-bit targets Date: Thu, 15 Dec 2022 15:28:37 -0800 Message-Id: <20221215232837.30211-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rivosinc.com, Palmer Dabbelt From: Palmer Dabbelt To: jgg@nvidia.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt These variables are not used on 32-bit targets as there's a big ifdef around their use. This results on a handful of warnings for 32-bit RISC-V allyesconfig: CC drivers/infiniband/sw/rxe/rxe_resp.o linux/drivers/infiniband/sw/rxe/rxe_resp.c: In function 'atomic_write_reply': linux/drivers/infiniband/sw/rxe/rxe_resp.c:794:13: error: unused variable 'payload' [-Werror=unused-variable] 794 | int payload = payload_size(pkt); | ^~~~~~~ linux/drivers/infiniband/sw/rxe/rxe_resp.c:793:24: error: unused variable 'mr' [-Werror=unused-variable] 793 | struct rxe_mr *mr = qp->resp.mr; | ^~ linux/drivers/infiniband/sw/rxe/rxe_resp.c:791:19: error: unused variable 'dst' [-Werror=unused-variable] 791 | u64 src, *dst; | ^~~ linux/drivers/infiniband/sw/rxe/rxe_resp.c:791:13: error: unused variable 'src' [-Werror=unused-variable] 791 | u64 src, *dst; | ^~~ cc1: all warnings being treated as errors Fixes: 034e285f8b99 ("RDMA/rxe: Make responder support atomic write on RC service") Signed-off-by: Palmer Dabbelt --- drivers/infiniband/sw/rxe/rxe_resp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index 7a60c7709da0..18977d5a3316 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -788,10 +788,10 @@ static enum resp_states atomic_reply(struct rxe_qp *qp, static enum resp_states atomic_write_reply(struct rxe_qp *qp, struct rxe_pkt_info *pkt) { - u64 src, *dst; - struct resp_res *res = qp->resp.res; - struct rxe_mr *mr = qp->resp.mr; - int payload = payload_size(pkt); + __maybe_unused u64 src, *dst; + __maybe_unused struct resp_res *res = qp->resp.res; + __maybe_unused struct rxe_mr *mr = qp->resp.mr; + __maybe_unused int payload = payload_size(pkt); if (!res) { res = rxe_prepare_res(qp, pkt, RXE_ATOMIC_WRITE_MASK); -- 2.38.1