From patchwork Thu May 18 13:47:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 13246839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66E22C77B7D for ; Thu, 18 May 2023 13:47:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 06D22900005; Thu, 18 May 2023 09:47:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 01DCA900003; Thu, 18 May 2023 09:47:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E28AB900005; Thu, 18 May 2023 09:47:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D2824900003 for ; Thu, 18 May 2023 09:47:41 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3714D120890 for ; Thu, 18 May 2023 13:47:38 +0000 (UTC) X-FDA: 80803503396.24.E1A247A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 21D9CA0006 for ; Thu, 18 May 2023 13:47:34 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=c3tYzKoV; spf=pass (imf15.hostedemail.com: domain of trix@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=trix@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684417655; a=rsa-sha256; cv=none; b=uIFW+sa+OpIuGgWNMZ0ZYOK4iG6YLRgAhWVBtjKe1QFy0hNIS0AZfOxI9Uu4ik2z4stp3i x2HOvbFKm4H8gtWcddDJRR2fihYX2LP4B+9YFm6QJhJfkieITQxG5oZXKVm45Ffv5EgCVS 4BVVryATAr26AyoFx/Of2w93J8ZFaJQ= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=c3tYzKoV; spf=pass (imf15.hostedemail.com: domain of trix@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=trix@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684417655; h=from:from:sender: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: references:dkim-signature; bh=y/zMvJoA0jxELE6MkSwxZtfc5VUZ8p2ZHnGCxRaD2+0=; b=gpuFMQaDusw4qwLb3oyBLdZBzAqFj4hLGydqenz60YKnVMwkHJiDZPs1D4DjuubUhdNaMq En3tZgTqUa+aQOBcBAUyn285DVaR7dUbmJmw/p6dpdz33dqEO/ns3QyW1n2niL3CF/6WQ9 ue7OmdFL3IMVQfX1Zqx7d4QUjoCuykI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684417654; 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=y/zMvJoA0jxELE6MkSwxZtfc5VUZ8p2ZHnGCxRaD2+0=; b=c3tYzKoVLICRNAb9MhrMjwdD+iqpIVxSYVlvqmYWu6GdIQA5nVtL+t5+ACaQk/lVk9sp3u 1okZNxgGvtcezShYNRc8MyeJZk42Ms9ylag7lHJQ8OzZ1buYfImicdNT5SganTzOyQbBY/ xhXAZFaiYtdJJcJUwh5oaiVxcksHuV8= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-640-QJK3eDqoNA-x9IvnCjxAuA-1; Thu, 18 May 2023 09:47:33 -0400 X-MC-Unique: QJK3eDqoNA-x9IvnCjxAuA-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6238c64280fso20188256d6.2 for ; Thu, 18 May 2023 06:47:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684417653; x=1687009653; 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=y/zMvJoA0jxELE6MkSwxZtfc5VUZ8p2ZHnGCxRaD2+0=; b=SOgtHuw6r2ZJVVLkYoBH09tvvCFW0bsxVN3BIxCbbcFW/ZcEw9hvyr868KKd3Sg1Ni aAOm7MKe+VMVn5NyyUABT6kjAAUpq6auda93CCxMVWT+zA3LNobCoNsv3gqomG8oP9hc EZksVW5nTkvufgGzIxC9EaehjNbK54fxTLbRn5FXgrggaOWBWtazqRqw8W7lTm3/WZ2I PaotZMmFgb+s/m4QMHe8Dk7T72oATYMsBCnaWUr7fM92UUIvSrDVqGYO5RD6qVQmGB44 W2WU4D/VoMEmLQQwX4u+PKcGsAIlFunj99xfABvYSenzVZ4i5YbVIWpEDR9mhzo2/DcX vXqQ== X-Gm-Message-State: AC+VfDzbhwWUAF1+nzjEGn6bBVFUlIU9AcsSfZhoDcOlp3mYzqB4R8Fe a5uIEjUrKBBOa2kK9Q/Qzc5IH5LYHWZbgm0cysxYx5toFy+jmP5gpO+ch5D//lC9bUl8Sh0qrUq +Ei5sKE8TfgI= X-Received: by 2002:a05:6214:21e9:b0:5df:47e2:8df5 with SMTP id p9-20020a05621421e900b005df47e28df5mr5299267qvj.31.1684417652951; Thu, 18 May 2023 06:47:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6NaKD0GJKZBq33VNwx7c38UKOXjG19K19hCC/BkDDOBeGLqN73Np5MduQXiNAKqj5O8kgPww== X-Received: by 2002:a05:6214:21e9:b0:5df:47e2:8df5 with SMTP id p9-20020a05621421e900b005df47e28df5mr5299219qvj.31.1684417652372; Thu, 18 May 2023 06:47:32 -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 dm13-20020ad44e2d000000b006238b37fb05sm521737qvb.119.2023.05.18.06.47.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 06:47:32 -0700 (PDT) From: Tom Rix To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] mm/page_owner: set page_owner_* storage-class-specifier to static Date: Thu, 18 May 2023 09:47:18 -0400 Message-Id: <20230518134718.926663-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspam-User: X-Stat-Signature: mo14hy8ub9zqeeghs75711tgchon67rc X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 21D9CA0006 X-HE-Tag: 1684417654-350804 X-HE-Meta: U2FsdGVkX1+Ml7S3jRvnxQt8zGPuV5LFeI8EKvZr+URmAZIYQ2Q+He7Cyy/HetC5XP8EBH2RUZOMjBj4rjiiSTPVg9dgLFu7iQT6s2Z1imp5d3c85a1Jn3rewm4gzDfmDKD6M1XGK9GtD4QQ9P5CwQZbWC7EUjG9GeyDfpw0Ak3Djn9feX4nOSO7GVCOIiqGLPbxHgqDBQrfBb30pJUx8BLCeEjXuob/F+euwP6Oi3m3MnXaxc41eCZVclfc6K8eMW5Evk/uRJt2wcMoaDy1/lzkhTaac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RNWmrM3Do9wDhzALqB8/yo9+OyOaOykLhXUZ9rf6SQfp2BV7DZ/AoRp38O/hSQvndGQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: smatch reports mm/page_owner.c:739:30: warning: symbol 'page_owner_stack_operations' was not declared. Should it be static? mm/page_owner.c:748:5: warning: symbol 'page_owner_threshold_get' was not declared. Should it be static? mm/page_owner.c:754:5: warning: symbol 'page_owner_threshold_set' was not declared. Should it be static? This variable and functions are only used in their defining file, so it should be static Signed-off-by: Tom Rix --- mm/page_owner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 28c519fc9372..f37c0b722b51 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -736,7 +736,7 @@ static int page_owner_stack_open(struct inode *inode, struct file *file) sizeof(unsigned long)); } -const struct file_operations page_owner_stack_operations = { +static const struct file_operations page_owner_stack_operations = { .open = page_owner_stack_open, .read = seq_read, .llseek = seq_lseek, @@ -745,13 +745,13 @@ const struct file_operations page_owner_stack_operations = { unsigned long page_owner_stack_threshold; -int page_owner_threshold_get(void *data, u64 *val) +static int page_owner_threshold_get(void *data, u64 *val) { *val = page_owner_stack_threshold; return 0; } -int page_owner_threshold_set(void *data, u64 val) +static int page_owner_threshold_set(void *data, u64 val) { page_owner_stack_threshold = val; return 0;