Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp908353rdb; Sun, 1 Oct 2023 10:25:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDMQXYlslCozR0Dawv17AySH+Jq2jguG/5x0RhUGNREg76kVQEWqvHbyCa0G4bj6c1c/zo X-Received: by 2002:a17:90a:cf01:b0:276:79b6:8bd6 with SMTP id h1-20020a17090acf0100b0027679b68bd6mr6974454pju.15.1696181118556; Sun, 01 Oct 2023 10:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696181118; cv=none; d=google.com; s=arc-20160816; b=putlWFLIy967mz0noVdYgx5dru4gHcHAJrQl0peYUVPURYlYUDsOaC0TdIvd05ifA4 MwSqvfWqvGOqPnmVB4FBk5rBn0Xa2Q3W57/ZA5pNHoL6Oq/W6RkvBUoCLzc8sH+T3qbu H/L0bbB4XO+Ow1JWGNx5jGsVY21haiLGfOqmFoeJ37+DlKpBnrqlrv6BDW6+j8IXoBAE 5BVoF0LiROMJF8zkY+MTRhpEa+Hvr55RX9BIu1DNIcPk1bCRqcS2IbkZM/50IyXRTvJw eoTCGQmDXsOGD0O/xTT4aWHRRGtdKXFq3o/SAT4I3N5iOKbZ/iz3//ZWdeSLEH6C8Qzi /Q3g== 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 :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=g3dlq7OaOX3hkVPFja7fU9+At5tYGZkozOQ3cQ36YQw=; fh=KSSHlxsBAE+ve/olbVHZxG7sQjna6UVXCKo0Q8lcRAg=; b=ngQAEMkjShVlaRfiLze6BEcLPfAH8Cunza0oQNK+dHN+SgUF2vPo0+eExDjRMD34Wq 4+dR2ncd/PN7bqCLW2NFKEmuyeLu4h5csO7f/W2yz+IsDZ/3LoqxyhTjwnQxZHRdIgfD CMqeYZayI/8raguHk98mcDgJ3Lhr025YD2g6lBrpilM5uvZbU/EIy6RMBKq031lpbx+X YSax2HJyKtFTVpoM5Ak9E04Kg/nGfAsS+j1n8y0f1kcIxDolh1OVpY1t+FSUtfe58hP/ Ba3T3t4gqoOjTHbe449GaWGiqTxw3S0G46nO4OnODFwx8yvQfz8e1Bvw6tr/qHbiz7YZ 6k5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BK+ShvYQ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a16-20020a17090abe1000b002774cdc919csi5612680pjs.176.2023.10.01.10.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 10:25:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BK+ShvYQ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 070AA80239D5; Sun, 1 Oct 2023 10:25:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235184AbjJARZO (ORCPT + 99 others); Sun, 1 Oct 2023 13:25:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235213AbjJARZO (ORCPT ); Sun, 1 Oct 2023 13:25:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E25FD9 for ; Sun, 1 Oct 2023 10:25:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBB8AC433C8; Sun, 1 Oct 2023 17:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696181111; bh=z9THaSLh+4LkxfehPRWat3Om/sgsLjT1NL3nJ1KOzbE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=BK+ShvYQO1zwrz9PeB54NbDV8G9zE/zAlYwsEDMDy7TuWStZVAStr1EwyaeDpRg2r qrsbwav0cmLDoaUztsh7EwrPG6FbpvbOFVVjCrKPY+gt0mfhkkX45u64minWagCKBq yVQymWeSeM/yMzmb+JrRaPMgzWCaQSb/+m9XR0yfb41qi0dnnr2HwF5L10J3EnvIoF yVbnCD71PQrkjzCO4qSaNiYSBOQoe67TxUYXcWOaJg7CWPzl8hHWaQLDmRI9ZcwBYd NVfjHOhFYnB1GmQJKUtXnzZsQ8j7erFsEVMCiX+W9baK3sHqRLJjBhrkuT6j1A8rMn DfJ+9ft8wM9sA== Subject: [PATCH RFC 1/2] NFSD: Rewrite synopsis of nfsd_percpu_counters_init() From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Amir Goldstein , Chuck Lever Date: Sun, 01 Oct 2023 13:25:09 -0400 Message-ID: <169618110986.65416.1447879517809565525.stgit@manet.1015granger.net> In-Reply-To: <169618103606.65416.14867860807492030083.stgit@manet.1015granger.net> References: <169618103606.65416.14867860807492030083.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 01 Oct 2023 10:25:14 -0700 (PDT) From: Chuck Lever In function ‘export_stats_init’, inlined from ‘svc_export_alloc’ at /home/cel/src/linux/server-development/fs/nfsd/export.c:866:6: /home/cel/src/linux/server-development/fs/nfsd/export.c:337:16: warning: ‘nfsd_percpu_counters_init’ accessing 40 bytes in a region of size 0 [-Wstringop-overflow=] 337 | return nfsd_percpu_counters_init(&stats->counter, EXP_STATS_COUNTERS_NUM); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cel/src/linux/server-development/fs/nfsd/export.c:337:16: note: referencing argument 1 of type ‘struct percpu_counter[0]’ /home/cel/src/linux/server-development/fs/nfsd/stats.h: In function ‘svc_export_alloc’: /home/cel/src/linux/server-development/fs/nfsd/stats.h:40:5: note: in a call to function ‘nfsd_percpu_counters_init’ 40 | int nfsd_percpu_counters_init(struct percpu_counter counters[], int num); | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Amir Goldstein Signed-off-by: Chuck Lever --- fs/nfsd/stats.c | 2 +- fs/nfsd/stats.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c index 63797635e1c3..12c299a05433 100644 --- a/fs/nfsd/stats.c +++ b/fs/nfsd/stats.c @@ -76,7 +76,7 @@ static int nfsd_show(struct seq_file *seq, void *v) DEFINE_PROC_SHOW_ATTRIBUTE(nfsd); -int nfsd_percpu_counters_init(struct percpu_counter counters[], int num) +int nfsd_percpu_counters_init(struct percpu_counter *counters, int num) { int i, err = 0; diff --git a/fs/nfsd/stats.h b/fs/nfsd/stats.h index cf5524e7ca06..a3e9e2f47ec4 100644 --- a/fs/nfsd/stats.h +++ b/fs/nfsd/stats.h @@ -37,9 +37,9 @@ extern struct nfsd_stats nfsdstats; extern struct svc_stat nfsd_svcstats; -int nfsd_percpu_counters_init(struct percpu_counter counters[], int num); -void nfsd_percpu_counters_reset(struct percpu_counter counters[], int num); -void nfsd_percpu_counters_destroy(struct percpu_counter counters[], int num); +int nfsd_percpu_counters_init(struct percpu_counter *counters, int num); +void nfsd_percpu_counters_reset(struct percpu_counter *counters, int num); +void nfsd_percpu_counters_destroy(struct percpu_counter *counters, int num); int nfsd_stat_init(void); void nfsd_stat_shutdown(void);