Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2092167rwb; Thu, 15 Dec 2022 19:35:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QXNRr6KBRQLi2zal4X2Dqo4g+bphyMmTAHMgfXhfV17LzYwfZE2wExnJFKZ5MuvSvE1vE X-Received: by 2002:a05:6a20:1393:b0:aa:29c3:8ddc with SMTP id w19-20020a056a20139300b000aa29c38ddcmr49739721pzh.36.1671161753704; Thu, 15 Dec 2022 19:35:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671161753; cv=none; d=google.com; s=arc-20160816; b=XzYAyNDIxbwld8JAHOhDNdbEtvCBGsasazBhPlnw7INOru8sj/KgEd5nkdXh/LgT9R +H093HKML1Vz/RICr4iAlh5GWBSD5hg7H+eLJn/m1fEQ98myekMwtEUArcw2JH+5E7Om +ogD9SwmCYy02jDTmZLghBxigN5Gns3oDzBNZ1i2L70uAStHVi9mB+YPLqejLbCr8+lM o2/Ex4vYuTl5TyIWDSt9Pu+puqSrD6tCvu1XukhSBxMIqpzDsR9SMCw8XcEwcsUZkPsR fBNo4CKmb5paU1W8Vx11uRIP4NhjA+BK90g0IJV37alu6BXY0g02dWywpIcobW99w3Yq lPSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:mime-version:date:dkim-signature :message-id; bh=sKoswwgot9/dVp0xHFMFvQzO9Poij7sBhLRfbUb1TDw=; b=0rHMwRUHP39BriULubBHFDXGTVWIQXNKxK0CvtOvUeZW+Zb8PKdrd/8udjdLxTmOul NPrU4oLCiSc1ieQqbzTGvzKLL7jmEpp/wiImU/LUfBnav+lqHbtmyDl30RuLsbJRNRQx Q1LyEcMoCBT0uPnD3AzsMix2XPEoOh5L1ZPLO19MehtRLwD3eCDShs0DfuwARRwfyYvg H3nQ9aBKbygA3e+kWC7W+xeY9OEnk1dlCMCYfryRiDinRzQUR5E8Pl15QVLCVEs+ecW/ 69EguqpfFBvQpdDXHOlKleUESyJteATm+dwEfvZo1eCTQtuq1DbWi+QBxnSzMFoyV98B rnFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uLyI9B3l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 66-20020a630145000000b00478f982fefasi1326229pgb.835.2022.12.15.19.35.42; Thu, 15 Dec 2022 19:35:53 -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=@linux.dev header.s=key1 header.b=uLyI9B3l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiLPDTV (ORCPT + 69 others); Thu, 15 Dec 2022 22:19:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiLPDTT (ORCPT ); Thu, 15 Dec 2022 22:19:19 -0500 X-Greylist: delayed 448 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 15 Dec 2022 19:19:18 PST Received: from out-92.mta0.migadu.com (out-92.mta0.migadu.com [IPv6:2001:41d0:1004:224b::5c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C956E3D for ; Thu, 15 Dec 2022 19:19:18 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1671160307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sKoswwgot9/dVp0xHFMFvQzO9Poij7sBhLRfbUb1TDw=; b=uLyI9B3lOZxCdxNU5jyc+noRNaWSZdELWPBx/sqI4mH561vquaTmem+KTz3IRivFThSYb7 aJqdKs7MewogCsCS9+vQFlvkuyWBi3M3zkVTf5+WACUbicf1byakhG1I0xcSZcUI0ET5tZ HUzbQX8ucUtlhtur54A1Dzbj4RWH5F4= Date: Fri, 16 Dec 2022 11:11:39 +0800 MIME-Version: 1.0 Subject: Re: [PATCH] RDMA/rxe: Avoid unused variable warnings on 32-bit targets To: Palmer Dabbelt , jgg@nvidia.com Cc: zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rivosinc.com References: <20221215232837.30211-1-palmer@rivosinc.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yanjun Zhu In-Reply-To: <20221215232837.30211-1-palmer@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 在 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. 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);