[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190508112842.11654-6-alexandru.ardelean@analog.com>
Date: Wed, 8 May 2019 14:28:30 +0300
From: Alexandru Ardelean <alexandru.ardelean@...log.com>
To: <linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<linux-ide@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-rpi-kernel@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-rockchip@...ts.infradead.org>, <linux-pm@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<intel-gfx@...ts.freedesktop.org>, <linux-omap@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <linux-wireless@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <devel@...verdev.osuosl.org>,
<linux-usb@...r.kernel.org>, <kvm@...r.kernel.org>,
<linux-fbdev@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
<cgroups@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-security-module@...r.kernel.org>,
<linux-integrity@...r.kernel.org>, <alsa-devel@...a-project.org>
CC: <gregkh@...uxfoundation.org>, <andriy.shevchenko@...ux.intel.com>,
Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: [PATCH 04/16] powerpc/xmon: use new match_string() helper/macro
The change is purely cosmetic at this point in time, but it does highlight
the change done in lib/string.c for match_string().
Particularly for this change, if a regname is removed (replaced with NULL)
in the list, the match_string() helper will continue until the end of the
array and ignore the NULL.
This would technically allow for "reserved" regs, though here it's not the
case.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
---
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
index efca104ac0cb..b84a7fc1112b 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3231,7 +3231,7 @@ scanhex(unsigned long *vp)
regname[i] = c;
}
regname[i] = 0;
- i = __match_string(regnames, N_PTREGS, regname);
+ i = match_string(regnames, regname);
if (i < 0) {
printf("invalid register name '%%%s'\n", regname);
return 0;
--
2.17.1
Powered by blists - more mailing lists