Thread (29 messages) 29 messages, 4 authors, 2019-05-28
STALE2561d

[PATCH 12/16] rdmacg: use new match_string() helper/macro

From: Alexandru Ardelean <hidden>
Date: 2019-05-08 11:30:37
Also in: alsa-devel, cgroups, dri-devel, intel-gfx, kvm, linux-arm-kernel, linux-clk, linux-fbdev, linux-gpio, linux-ide, linux-integrity, linux-mm, linux-mmc, linux-omap, linux-pci, linux-pm, linux-rockchip, linux-security-module, linux-tegra, linux-usb, linux-wireless, linuxppc-dev, lkml
Subsystem: control group (cgroup), the rest · Maintainers: Tejun Heo, Johannes Weiner, Michal Koutný, Linus Torvalds

The `rdmacg_resource_names` array is a static array of strings.
Using match_string() (which computes the array size via ARRAY_SIZE())
is possible.

The change is mostly cosmetic.
No functionality change.

Signed-off-by: Alexandru Ardelean <redacted>
---
 kernel/cgroup/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c
index 65d4df148603..71c3d305bd1f 100644
--- a/kernel/cgroup/rdma.c
+++ b/kernel/cgroup/rdma.c
@@ -367,7 +367,7 @@ static int parse_resource(char *c, int *intval)
 	if (!name || !value)
 		return -EINVAL;
 
-	i = __match_string(rdmacg_resource_names, RDMACG_RESOURCE_MAX, name);
+	i = match_string(rdmacg_resource_names, name);
 	if (i < 0)
 		return i;
 
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help