From patchwork Tue May 2 18:07:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 89437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp809456vqo; Tue, 2 May 2023 11:17:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HhH51OOJm5NLMN1BwPS7h19AEwRJrZf6gEDmGVY4pBYmFbFp5MTtWKEZNMHDc+d9GdEvY X-Received: by 2002:a17:902:f682:b0:1a9:85f2:5df6 with SMTP id l2-20020a170902f68200b001a985f25df6mr22984056plg.6.1683051441219; Tue, 02 May 2023 11:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683051441; cv=none; d=google.com; s=arc-20160816; b=YMo1WlD5SeZJclMbXQbjf8Rx1Jainenxe3IQajlZgjk6JHGbynkzEhd2IwvP5UyzQv vnp3rs8v+COrbdltv8LXIRvvpKkawO4DOO/Br6g1Fu/jpTfHfHZ6Qgly9CCjU1cnLJiB G1SY+CKvCv+KwXqcLzC91ouSn3tS9xbqe3LHv0k8RPOG8m6d39FBACpCQD8QfMu4FwYS CK6dG4q8F8ANjhchSSikaURmqL7BQqcvlWlK7xEcD8fewApRnxwox83l1IQjBRAUVjnD XmMGso2eMUTeXIYUcuz+hVSk3h/w4H5hyqijqH1oiDa1V8zrX5Rs5m3JNYgneQaS/7EY PGeg== 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:date:subject:cc:to:from:dkim-signature; bh=N6mCYnN9DA30kBXb3G+hAjObknC+PiKLk5wLjv+kTMk=; b=Gq/LltwuQ/giEIOF11Jh0F0CIH09s1sgaNvft1O0vXDQDEMEef1gE28GTfXc6Jv3Nh 7THDqndB6PNETaW4dAPhfCkB+jA7H8P0AVCW/PmdzQ00F9Z6Rf+Uz+LACQJ3liY7XuhM GSC5dS4jWJ0Yz0/p2shD+x6ZIrnizszw/MssGShoZFFSZkvZ3n6KjR92OEHBqEPH5h8g sXVdT8FwivN5EMZg1nn2aBwiSwAN40JOsgBSrstqusdGKogj/2U5q50c4hMBKE9z7nTn QCtGkrVLgO2SyYGQKOzgOkZG6YDtVgFLzi0hwKaxL3SEK2zUSnUziRWn2tN6uegs1FhF 3gJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DkhZpXji; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 33-20020a630f61000000b0052117aaa3c2si32174646pgp.225.2023.05.02.11.17.07; Tue, 02 May 2023 11:17:21 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=DkhZpXji; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233705AbjEBSIL (ORCPT + 99 others); Tue, 2 May 2023 14:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233644AbjEBSIK (ORCPT ); Tue, 2 May 2023 14:08:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94CCAF3 for ; Tue, 2 May 2023 11:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683050840; 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; bh=N6mCYnN9DA30kBXb3G+hAjObknC+PiKLk5wLjv+kTMk=; b=DkhZpXjifUHWN5zwM4AMiTSbAVJS4xfqvZn8PRzQMS2iHtHCE4v+nw9t3GLqy9LNHCmcWy NSC1RyXgRXPL+W3JuMG7BpP7acUEze9aTz4jzzo1+SVBCxARhLi0LzrU/uof8MAfdG9jgx DdpjAfWMwzMKPEoni+g4A15HkRRq7j8= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-281-T9P0zxT8NzGJakVshLzSqQ-1; Tue, 02 May 2023 14:07:19 -0400 X-MC-Unique: T9P0zxT8NzGJakVshLzSqQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-61afc445dd5so18069796d6.3 for ; Tue, 02 May 2023 11:07:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683050838; x=1685642838; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N6mCYnN9DA30kBXb3G+hAjObknC+PiKLk5wLjv+kTMk=; b=ZkqxehTJMb1mVJ3/JVmSWNR+TUkqWMGG+LBCZYMIeV/l6rI8QZWjSkT3RmzU5nI3X3 LOEjQwRfoMLF3Is1iS514v0rXldB3HcenLhNcMYiZC95aBhCBj8VnwsoMK9tbdjWHLJx gZU+JHWEQYSF+gfhgrmJfwB/kqieWE8jP08DviEiplMFwTwVLL9whdCzq0+8sO/TQHQ5 GkYP1W7jQMtndaeo/DB4KVeJMuvRBzBaa2cj+ygqsNPyZR+YHvA30vEvpUzwDQl2i9xA v3u00p6dlBsmF9bO7ma+UkuN8J6ZFijx/mAVC6cuSWccHEKjW31gYr1IZpvrjlitF+OT jCGg== X-Gm-Message-State: AC+VfDx5ZIHbGyC734XL8epoAIskWn3dwpbScVBUC0W/OmS0KLFdNfqc FzVQSwYWRvnVBtO+Z0GVVeU6FRPtCYG1UFk/Rre4eAK66D4Dp909ab0TuINzyzaeuFFKIfHjwfi xsArAkZx21ZneE+XEToJ/6Z1P X-Received: by 2002:a05:6214:c4c:b0:5cc:e059:efa3 with SMTP id r12-20020a0562140c4c00b005cce059efa3mr7170300qvj.23.1683050838390; Tue, 02 May 2023 11:07:18 -0700 (PDT) X-Received: by 2002:a05:6214:c4c:b0:5cc:e059:efa3 with SMTP id r12-20020a0562140c4c00b005cce059efa3mr7170265qvj.23.1683050838119; Tue, 02 May 2023 11:07:18 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id y15-20020a0c8ecf000000b005e7648f9b78sm9626671qvb.109.2023.05.02.11.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 11:07:17 -0700 (PDT) From: Tom Rix To: chuck.lever@oracle.com, jlayton@kernel.org, trond.myklebust@hammerspace.com, anna@kernel.org Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL Date: Tue, 2 May 2023 14:07:13 -0400 Message-Id: <20230502180713.2930022-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764807348034762704?= X-GMAIL-MSGID: =?utf-8?q?1764807348034762704?= gcc with W=1 and ! CONFIG_SYSCTL fs/lockd/svc.c:80:51: error: ‘nlm_port_max’ defined but not used [-Werror=unused-const-variable=] 80 | static const int nlm_port_min = 0, nlm_port_max = 65535; | ^~~~~~~~~~~~ fs/lockd/svc.c:80:33: error: ‘nlm_port_min’ defined but not used [-Werror=unused-const-variable=] 80 | static const int nlm_port_min = 0, nlm_port_max = 65535; | ^~~~~~~~~~~~ The only use of these variables is when CONFIG_SYSCTL is defined, so their definition should be likewise conditional. Signed-off-by: Tom Rix Reviewed-by: Jeff Layton --- fs/lockd/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index bb94949bc223..04ba95b83d16 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -77,9 +77,9 @@ static const unsigned long nlm_grace_period_min = 0; static const unsigned long nlm_grace_period_max = 240; static const unsigned long nlm_timeout_min = 3; static const unsigned long nlm_timeout_max = 20; -static const int nlm_port_min = 0, nlm_port_max = 65535; #ifdef CONFIG_SYSCTL +static const int nlm_port_min = 0, nlm_port_max = 65535; static struct ctl_table_header * nlm_sysctl_table; #endif