reviewed by each subsystem.
Signed-off-by: Alexandru Ardelean
---
include/linux/string.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linux/string.h b/include/linux/string.h
index 7149fcdf62df..34491b075449 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
differs.
Signed-off-by: Alexandru Ardelean
---
arch/powerpc/xmon/xmon.c | 2 +-
arch/x86/kernel/cpu/mtrr/if.c| 2 +-
drivers/ata/pata_hpt366.c| 2 +-
drivers/ata/pata_hpt37x.c| 2 +-
drivers/base/d
doing some
cosmetic changes, which are aimed at grouping the users of
`match_string()`.
Signed-off-by: Alexandru Ardelean
---
Changelog v1 -> v2:
* split the initial series into just 3 patches that fix the
`match_string()` helper and start introducing a new version of this
helper, wh
The `lcd_types` array is a static array of strings.
Using match_string() (which computes the array size via ARRAY_SIZE())
is possible.
This reduces the array by 1 element, since the NULL (at the end of the
array) is no longer needed.
Signed-off-by: Alexandru Ardelean
---
drivers/video/fbdev
computed automatically,
which would only help if they ever get expanded.
Signed-off-by: Alexandru Ardelean
---
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
The `sched_feat_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
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion
The `DRIVER_STRING` 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
---
drivers/staging/gdm724x/gdm_tty.c | 3 +--
1 file changed, 1
The `generic_edid_name` 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
---
drivers/gpu/drm/drm_edid_load.c | 2 +-
1 file changed, 1
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
---
kernel/cgroup/rdma.c | 2 +-
1 file changed, 1
-by: Alexandru Ardelean
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 07a5bcaa0067..68b0db5ef5e9 100644
--- a/drivers/pinc
The change is also cosmetic, but it also does a tighter coupling between
the enums & the string values. This way, the ARRAY_SIZE(phy_types) that is
implicitly done in the match_string() macro is also a bit safer.
Signed-off-by: Alexandru Ardelean
---
drivers/mmc/host/sdhci-xenon-phy.c
The change is mostly cosmetic.
The `energy_perf_strings` array is static, so match_string() can be used
(which will implicitly do a ARRAY_SIZE(energy_perf_strings)).
The only small benefit here, is the reduction of the array size by 1
element.
Signed-off-by: Alexandru Ardelean
---
drivers
struct), so
using the match_string() (which does an ARRAY_SIZE((con->endpoint)) should
be fine.
The recent change to match_string() (to ignore NULL entries up to the size
of the array) shouldn't affect this.
Signed-off-by: Alexandru Ardelean
---
drivers/base/devcon.c | 2 +-
1 file ch
n't), but this fixes
that.
Signed-off-by: Alexandru Ardelean
---
arch/x86/kernel/cpu/mtrr/if.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 4ec7a5f7b94c..e67820a044cc 100644
--- a/arch/x86/kerne
and ignore the NULL.
Signed-off-by: Alexandru Ardelean
---
sound/pci/oxygen/oxygen_mixer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index 13c2fb75fd71..961fd1cbc712 100644
--- a/sound/pci/oxygen
NULL.
This would technically allow for "reserved" regs, though here it's not the
case.
Signed-off-by: Alexandru Ardelean
---
arch/powerpc/xmon/xmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
ind
This change re-introduces `match_string()` as a macro that uses
ARRAY_SIZE() to compute the size of the array.
The macro is added in all the places that do
`match_string(_a, ARRAY_SIZE(_a), s)`, since the change is pretty
straightforward.
Signed-off-by: Alexandru Ardelean
---
drivers/clk/bcm
ositive value does
not make any difference: the iteration will stop at the first NULL
element.
Signed-off-by: Alexandru Ardelean
---
arch/powerpc/xmon/xmon.c | 2 +-
arch/x86/kernel/cpu/mtrr/if.c| 2 +-
drivers/ata/pata_h
ge-able way.
The first patch is important, the others can be dropped.
Signed-off-by: Alexandru Ardelean
Alexandru Ardelean (16):
lib: fix match_string() helper when array size is positive
treewide: rename match_string() -> __match_string()
lib,treewide: add new match_string() helper/mac
in the series will focus on doing some
cosmetic changes, which are aimed at grouping the users of
`match_string()`.
Signed-off-by: Alexandru Ardelean
---
lib/string.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/string.c b/lib/string.c
index 3ab861c1a857
doing some
cosmetic changes, which are aimed at grouping the users of
`match_string()`.
Signed-off-by: Alexandru Ardelean
---
lib/string.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/string.c b/lib/string.c
index 3ab861c1a857..76edb7bf76cb 100644
--- a/lib
21 matches
Mail list logo