[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220328204638.273157-1-benni@stuerz.xyz>
Date: Mon, 28 Mar 2022 22:46:38 +0200
From: Benjamin Stürz <benni@...erz.xyz>
To: linux@...tec.co.uk
Cc: krzk@...nel.org, alim.akhtar@...sung.com, linux@...linux.org.uk,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Benjamin Stürz <benni@...erz.xyz>
Subject: [PATCH v2] s3c: Improve readability of bast_pc104_irqmask[]
Replace comments in bast_pc104_irqmask[] with C99's designated
initializers because it makes the code cleaner and easier to read.
Signed-off-by: Benjamin Stürz <benni@...erz.xyz>
---
arch/arm/mach-s3c/bast-irq.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index d299f124e6dc..618b51db3eef 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -28,23 +28,11 @@
/* table of ISA irq nos to the relevant mask... zero means
* the irq is not implemented
*/
-static const unsigned char bast_pc104_irqmasks[] = {
- 0, /* 0 */
- 0, /* 1 */
- 0, /* 2 */
- 1, /* 3 */
- 0, /* 4 */
- 2, /* 5 */
- 0, /* 6 */
- 4, /* 7 */
- 0, /* 8 */
- 0, /* 9 */
- 8, /* 10 */
- 0, /* 11 */
- 0, /* 12 */
- 0, /* 13 */
- 0, /* 14 */
- 0, /* 15 */
+static const unsigned char bast_pc104_irqmasks[16] = {
+ [3] = 1,
+ [5] = 2,
+ [7] = 4,
+ [10] = 8,
};
static const unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 };
--
2.35.1
Powered by blists - more mailing lists