Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2984174rwb; Fri, 16 Dec 2022 08:45:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXvgXf+2XVlflUZhs9QK8uCIaQRsRM1nOTXNmfBz16jZ4ziyK953G5OLC29A5Yz+R07SPYAU X-Received: by 2002:a05:6a20:be1d:b0:af:b909:2b3f with SMTP id ge29-20020a056a20be1d00b000afb9092b3fmr6864613pzb.34.1671209112586; Fri, 16 Dec 2022 08:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671209112; cv=none; d=google.com; s=arc-20160816; b=XvQsvZHSZa6mvMg/2BE5a+OxSGOj1/dPhGBXD4ZiO1SWJ9SprrbBCBOhsnEOK5UKtz WTlw5exXWhkGBVs3SDjbSBCFX4HitslyRu00NdGusRYgM24QCBXeHhcFBA2sOMZzwcSY MQ6DqvIBjNuctsR/kbW5Us/UJZMxOeKnr7SDK2pjqkGTRuqlTynw0OZ2CufrGp+fmmRf U1d6s898byK7vwjiC7SxKVJuwoR1MQLppBG/XZil4YTUbck2NMDc5aCPvKfRf0kzV24w Z7SiBI2JYNStsVTneTtaY6dNDVD5rsiS3el7nDRLfSoaUeA7z2cATOkBwkyhTeXgIjyA VDRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=O1qjP7+KqmrUFY+SnaTsk+GxzcwVKXxOCE9bngVZS8Y=; b=s1uhxbDmqNcEYQ95ZS90wNYLOizA7zzBOgtwZK9y+eTDQ/2fgWN+Db11wC4DgZ6PAl EFlOVWakNSlAJiy3R1VbNd1b9MrTdUXMYx85blfo9lKlHGjidYsx2snTlQxsmGISqfhS SjzQI4hZJBcPRIiQqA45cRRfjHYFOIBtfR4NlSmFUPwTZcYcZB0R+Z9lUJDbuj2rWKay sb6SArLMwVUpzvVFZQlFwZNZ418jU+g0Qm214W3yyrWr8EGAhuc46xfuWxmf3guM+V+Q uUIKgbaboePOIyMsmZcZPRN2hiYdZhQY9yZOdRZULvHKUlL20Nb/0Ygq027lGL59uZS/ P97Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=gShdK6XX; 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 r12-20020a170902e3cc00b00188e9ec511dsi2547228ple.397.2022.12.16.08.45.02; Fri, 16 Dec 2022 08:45:12 -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=gShdK6XX; 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 S230479AbiLPQHH (ORCPT + 68 others); Fri, 16 Dec 2022 11:07:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232658AbiLPQGT (ORCPT ); Fri, 16 Dec 2022 11:06:19 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AFC3B11 for ; Fri, 16 Dec 2022 08:03:24 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id d15so2746001pls.6 for ; Fri, 16 Dec 2022 08:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=O1qjP7+KqmrUFY+SnaTsk+GxzcwVKXxOCE9bngVZS8Y=; b=gShdK6XXiivLeNg7J6NrWJKdwX8H3oI/vll5yGqyUsWhvthrYgVG5ynkc+WQzHH6l1 pjy9eObYteoQhqshKUAviHYpmueiXHDFQRhZV//Pe2VOORb/xOLa63xIAgjPKFh97gGi peQ2otoqOZL2tAvtc3WutLb0CcYgEQddXA3RPMe1cj1aauHQAz4FJAoKfrvmvTpb5ZW8 PNrAgfXlbXmRsFQr71pATmhnYCzNmRbWDkvgb8CtNo6YuDcXLh5GDxV3+OffnwZLz19D 6SGGPfe9btPIz8tvTTNAMwamlx79cAk/km8jKXjPY6V3PfUmAy2TEhDnZumkDK+I3u/q MKRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O1qjP7+KqmrUFY+SnaTsk+GxzcwVKXxOCE9bngVZS8Y=; b=iChgfjC741jqF8S/Jt9fBLx52oyQPoTkfckMDEjb5/X2/XoGkI4lHjhODzulMIa4o3 Hu48Irmd05LBbvXTkgptKZgtHetkETqy1oz+Rpqi8kulxfz0DxedOgadh/Ie/zM4lLgE tzql7zwA2Y/Dy/DPSFmCOyLUL7Jja0fZGPp9d6FgzNxuRfF4lvieW1FYRTSEqltzarGG yPZOc9lPrRlZzAK9GR3TquWBOKGAbQ3lVYEOslLYi4eWb7xCae3ZBBWBCjRW6ivBL3F4 Ud5hf7LbVZNJyECO1O0ff3zKLNtPB4jamgI1ks3d31LT9Vy9ryaSUgV0Qa/siHIwC0Au FW6w== X-Gm-Message-State: ANoB5pnhz31iOZFxOI4rr0JrUjy7zUtIDklUNAARQ9zWVdxmAds51423 DbLgHCAp5iWArXOoDj3wp0ov3VN94PhjARrT X-Received: by 2002:a17:90b:2401:b0:219:89c2:b70b with SMTP id nr1-20020a17090b240100b0021989c2b70bmr41208487pjb.16.1671206603701; Fri, 16 Dec 2022 08:03:23 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id e24-20020a17090ac21800b0020ae09e9724sm1525281pjt.53.2022.12.16.08.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 08:03:22 -0800 (PST) Date: Fri, 16 Dec 2022 08:03:22 -0800 (PST) X-Google-Original-Date: Fri, 16 Dec 2022 07:34:37 PST (-0800) Subject: Re: [PATCH] RDMA/rxe: Avoid unused variable warnings on 32-bit targets In-Reply-To: CC: jgg@nvidia.com, zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rivosinc.com From: Palmer Dabbelt To: yanjun.zhu@linux.dev Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 On Thu, 15 Dec 2022 19:11:39 PST (-0800), yanjun.zhu@linux.dev wrote: > 在 2022/12/16 7:28, Palmer Dabbelt 写道: >> From: Palmer Dabbelt >> > > In > https://patchwork.kernel.org/project/linux-rdma/patch/1669905568-62-2-git-send-email-yangx.jy@fujitsu.com/ > > In this link, it seems that a similar commit for this problem. > Please check it. That one also fixes the compile issues for me. > > Thanks > Zhu Yanjun > >> 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);