diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-09-25 10:27:26 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-09-30 01:11:09 +0200 |
commit | 21e9a1dd01b17095192ea86decc0c2081451612e (patch) | |
tree | 77fab22d38bc83004992b1f85b55abaaa14d5619 /drivers/base | |
parent | Linux 6.12-rc1 (diff) | |
download | linux-21e9a1dd01b17095192ea86decc0c2081451612e.tar.xz linux-21e9a1dd01b17095192ea86decc0c2081451612e.zip |
regmap-irq: Consistently use memset32() in regmap_irq_thread()
The commit 4d60cac951fd ("regmap-irq: Add no_status support") adds
an additional branch into IRQ thread handler in regmap. It wisely
chose to use memset32() as it might be optimised on some architectures
and hence give a performance benefit. At the same time the old code
continue using simple memset(). Update the old code to use memset32().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240925082726.620622-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index a750e48a26b8..33ec28e3a802 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -364,14 +364,11 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) memset32(data->status_buf, GENMASK(31, 0), chip->num_regs); } else if (chip->num_main_regs) { unsigned int max_main_bits; - unsigned long size; - - size = chip->num_regs * sizeof(unsigned int); max_main_bits = (chip->num_main_status_bits) ? chip->num_main_status_bits : chip->num_regs; /* Clear the status buf as we don't read all status regs */ - memset(data->status_buf, 0, size); + memset32(data->status_buf, 0, chip->num_regs); /* We could support bulk read for main status registers * but I don't expect to see devices with really many main |