Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1282738pxb; Fri, 21 Jan 2022 14:17:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzhquBdA2LX+PqFW0w8OdCBWbzTJy3E4U2WFWwT/k1WKmyUBe8j2PzItn4WiPCYf8YhH2a X-Received: by 2002:a17:902:b606:b0:14a:a893:f7f7 with SMTP id b6-20020a170902b60600b0014aa893f7f7mr5645977pls.60.1642803430918; Fri, 21 Jan 2022 14:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642803430; cv=none; d=google.com; s=arc-20160816; b=1G1+4JQxk1DiHZTeXlDp7k6sb24ZHqJ8jjeL069AWlEXmuine7W2fI59NQ53gN/eQX F1PUTuPaggTqMygts4XR04Vn5TGJUy0rO/N48Hc6CdHSmSW6GR9E0lgppwhzoPoa24CP VYjJyzGFGMVPN7m0locsWZVrQoDF845qNUvZRV6UYRpJQ5sSmnI0O1s75tKImnr0nIsf AUiACk4uOxbw98+bZ578WK8U3OQfPTobpHxOKwqAY4G0tbyzA+PsIGBxU0JFigpoUpB6 mJXdmHidmFu/OuCSQ9S4PdrLfnhqsQjV4h6UpSMseaK/Qjbd0AexgTvQfZF5C+LFW1DM 4nRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sA8kW5IUXvgUaS8EINQ5uOPdCx1tdexwAGGQdvNG+oc=; b=MnJGxs9P9qgwAmAp3mFTD4kut+m0XCaQBgnWQve1V4jiyOp0mGGUzSJZPNaGlnURTe rO4MBynPF4d9bgtLUFkJg3vqLpbyG9iNnBjC54tWHX6fHV0rzldHt2jwbg3E0hcUVeSt an4xAgiS/eWDBDvw3KgSRY0kW9aSYhNMHdX/181rGN+7QLvKNIOeVBROgNnaLI++CuWl UkNeiS9UB4Qne324xbajx/ERtqTL8XzP5W5Swi5GnCijT7VxQDQCiBM4ZstQDyqSI93J /jHVyLKLPyLJwGj0OwuFGNWoS3ObwPxO7rZ1B5ocJJMRyAfzK3A/jTdANrf3noMbv4iU +MDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=tlBYKVCI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id om4si15187802pjb.48.2022.01.21.14.16.58; Fri, 21 Jan 2022 14:17:10 -0800 (PST) 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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=tlBYKVCI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356660AbiATOud (ORCPT + 99 others); Thu, 20 Jan 2022 09:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355000AbiATOu3 (ORCPT ); Thu, 20 Jan 2022 09:50:29 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E502C06161C; Thu, 20 Jan 2022 06:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=sA8kW5IUXvgUaS8EINQ5uOPdCx1tdexwAGGQdvNG+oc=; b=tlBYKVCI/68e3/DbYEZBkxzg0g 4JJApXwqheJzidUEupziizgK5CCr9CXKESKnL/XTmkC0Y9mUt8Fgi1fiu+AjRyDuEPhzC/s9vOCoT D2huYhnLNa+qEvqWB2XLULGY6rrtMfOhhC5jspVnisN1lJQU3b/uWB3RwVd3ysBsPfes3Als5Ll/E /phUxbqm/DlrSCbKivT41R/YluR+AUg88M41GmifbTeLr0BEwonCY0e5UDfcuId42gXvd6TM8BaY0 grjO3dCaKzTtpj5ju8VR2sh20xIItTsvaqjsXMO6mTEy8PoeAROlHz4p8H1VtcB8LHsQ3c047uJSV gSO8ApQg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAYlg-00Byti-0o; Thu, 20 Jan 2022 14:50:28 +0000 Date: Thu, 20 Jan 2022 06:50:27 -0800 From: Luis Chamberlain To: Palmer Dabbelt Cc: keescook@chromium.org, yzaikin@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] perf_events: sysctl: Avoid unused one_thousand definition Message-ID: References: <20220119194019.27703-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220119194019.27703-1-palmer@rivosinc.com> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 19, 2022 at 11:40:19AM -0800, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > The variable "one_thousand" is only used under CONFIG_PERF_EVENTS=y, but > is unconditionally defined. This can fire a warning. > > Signed-off-by: Palmer Dabbelt > > --- > > I went with an #ifdef instead of a __maybe_unused because that's what > the other code is using, and I left the one_thousand in order despite > that requiring another #ifdef. > --- > kernel/sysctl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index ef77be575d87..81a6f2d47f77 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -122,7 +122,9 @@ static unsigned long one_ul = 1; > static unsigned long long_max = LONG_MAX; > static int one_hundred = 100; > static int two_hundred = 200; > +#ifdef CONFIG_PERF_EVENTS > static int one_thousand = 1000; > +#endif Please use linux-next, this has changed quite a bit there. You can git grep for SYSCTL_ONE_THOUSAND. Luis