* [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN()
@ 2023-12-29 14:50 Ilpo Järvinen
2024-01-11 10:43 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Ilpo Järvinen @ 2023-12-29 14:50 UTC (permalink / raw)
To: Peter Tyser, Lee Jones, linux-kernel; +Cc: Ilpo Järvinen
Instead of open coding, use ALIGN_DOWN() for alignment.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/mfd/lpc_ich.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 73a0e7f9bd31..f14901660147 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -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;
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN()
2023-12-29 14:50 [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN() Ilpo Järvinen
@ 2024-01-11 10:43 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2024-01-11 10:43 UTC (permalink / raw)
To: Peter Tyser, Lee Jones, linux-kernel, Ilpo Järvinen
On Fri, 29 Dec 2023 16:50:59 +0200, Ilpo Järvinen wrote:
> Instead of open coding, use ALIGN_DOWN() for alignment.
>
>
Applied, thanks!
[1/1] mfd: lpc_ich: Use ALIGN_DOWN()
commit: 39852f0bbf9f29f2e4946d20c764ed7eb85d4a24
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-11 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-29 14:50 [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN() Ilpo Järvinen
2024-01-11 10:43 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®