Skip to contentSkip to conversation

mfd: lpc_ich: Use ALIGN_DOWN()

PATCH Applied Ilpo Järvinen 2 participants 2 messages Dec 29, 2023 – Jan 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: lpc_ich: Use ALIGN_DOWN()

Instead of open coding, use ALIGN_DOWN() for alignment.

---
 drivers/mfd/lpc_ich.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mfd/lpc_ich.c +2 -1
index 73a0e7f9bd31..f14901660147 100644
@@ -38,6 +38,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/align.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/errno.h>
@@ -1321,7 +1322,7 @@ static int lpc_ich_init_spi(struct pci_dev *dev)
 	case INTEL_SPI_BYT:
 		pci_read_config_dword(dev, SPIBASE_BYT, &spi_base);
 		if (spi_base & SPIBASE_BYT_EN) {
-			res->start = spi_base & ~(SPIBASE_BYT_SZ - 1);
+			res->start = ALIGN_DOWN(spi_base, SPIBASE_BYT_SZ);
 			res->end = res->start + SPIBASE_BYT_SZ - 1;
 
 			info->set_writeable = lpc_ich_byt_set_writeable;
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw

Re: (subset) [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN()

Quoted 3 lines · Ilpo Järvinen

Instead of open coding, use ALIGN_DOWN() for alignment.

Applied, thanks!

[1/1] mfd: lpc_ich: Use ALIGN_DOWN()

      commit: 39852f0bbf9f29f2e4946d20c764ed7eb85d4a24

--
Lee Jones [李琼斯]