lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230518134718.926663-1-trix@redhat.com>
Date:   Thu, 18 May 2023 09:47:18 -0400
From:   Tom Rix <trix@...hat.com>
To:     akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Tom Rix <trix@...hat.com>
Subject: [PATCH] mm/page_owner: set page_owner_* storage-class-specifier to static

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 <trix@...hat.com>
---
 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;
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ