linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: backing-dev: set variables dev_attr_min,max_bytes storage-class-specifier to static
@ 2023-04-08 14:16 Tom Rix
  2023-04-11  3:54 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-04-08 14:16 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Tom Rix

smatch reports
mm/backing-dev.c:266:1: warning: symbol
  'dev_attr_min_bytes' was not declared. Should it be static?
mm/backing-dev.c:294:1: warning: symbol
  'dev_attr_max_bytes' was not declared. Should it be static?

These variables are only used in one file so should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 mm/backing-dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index ad011308cebe..7ed2559b8809 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -263,7 +263,7 @@ static ssize_t min_bytes_store(struct device *dev,
 
 	return ret;
 }
-DEVICE_ATTR_RW(min_bytes);
+static DEVICE_ATTR_RW(min_bytes);
 
 static ssize_t max_bytes_show(struct device *dev,
 			      struct device_attribute *attr,
@@ -291,7 +291,7 @@ static ssize_t max_bytes_store(struct device *dev,
 
 	return ret;
 }
-DEVICE_ATTR_RW(max_bytes);
+static DEVICE_ATTR_RW(max_bytes);
 
 static ssize_t stable_pages_required_show(struct device *dev,
 					  struct device_attribute *attr,
-- 
2.27.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: backing-dev: set variables dev_attr_min,max_bytes storage-class-specifier to static
  2023-04-08 14:16 [PATCH] mm: backing-dev: set variables dev_attr_min,max_bytes storage-class-specifier to static Tom Rix
@ 2023-04-11  3:54 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2023-04-11  3:54 UTC (permalink / raw)
  To: Tom Rix; +Cc: akpm, linux-mm, linux-kernel

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-11  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-08 14:16 [PATCH] mm: backing-dev: set variables dev_attr_min,max_bytes storage-class-specifier to static Tom Rix
2023-04-11  3:54 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox