lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/16] mm/vmpressure.c: use new match_string() helper/macro
Date
__match_string() is called on 2 static array of strings in this file. For
this reason, the conversion to the new match_string() macro/helper, was
done in this separate commit.

Using the new match_string() helper is mostly a cosmetic change (at this
point in time). The sizes of the arrays will be computed automatically,
which would only help if they ever get expanded.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
mm/vmpressure.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index d43f33139568..b8149924f078 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -378,7 +378,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,

/* Find required level */
token = strsep(&spec, ",");
- level = __match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token);
+ level = match_string(vmpressure_str_levels, token);
if (level < 0) {
ret = level;
goto out;
@@ -387,7 +387,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
/* Find optional mode */
token = strsep(&spec, ",");
if (token) {
- mode = __match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token);
+ mode = match_string(vmpressure_str_modes, token);
if (mode < 0) {
ret = mode;
goto out;
--
2.17.1
\
 
 \ /
  Last update: 2019-05-08 13:32    [W:0.181 / U:28.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site