From: Milind Arun Choudhary <milindchoudhary@gmail.com>
To: kernel-janitors@lists.osdl.org,
linuxsh-shmedia-dev@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
lethal@linux-sh.org
Subject: [KJ][PATCH] ROUND_UP macro cleanup in arch/sh64/kernel/pci_sh5.c
Date: Thu, 12 Apr 2007 09:51:50 +0530 [thread overview]
Message-ID: <20070412042150.GA11888@arun.site> (raw)
ROUND_UP macro cleanup, use ALIGN where ever appropriate.
Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
---
pci_sh5.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c
index 9dae689..11d1fef 100644
--- a/arch/sh64/kernel/pci_sh5.c
+++ b/arch/sh64/kernel/pci_sh5.c
@@ -376,8 +376,6 @@ irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_NONE;
}
-#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
-
static void __init
pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
struct resource *memr)
@@ -434,8 +432,8 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
mem_res.end -= mem_res.start;
/* Align the sizes up by bridge rules */
- io_res.end = ROUND_UP(io_res.end, 4*1024) - 1;
- mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1;
+ io_res.end = ALIGN(io_res.end, 4*1024) - 1;
+ mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1;
/* Adjust the bridge's allocation requirements */
bridge->resource[0].end = bridge->resource[0].start + io_res.end;
@@ -448,18 +446,16 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
/* adjust parent's resource requirements */
if (ior) {
- ior->end = ROUND_UP(ior->end, 4*1024);
+ ior->end = ALIGN(ior->end, 4*1024);
ior->end += io_res.end;
}
if (memr) {
- memr->end = ROUND_UP(memr->end, 1*1024*1024);
+ memr->end = ALIGN(memr->end, 1*1024*1024);
memr->end += mem_res.end;
}
}
-#undef ROUND_UP
-
static void __init pcibios_size_bridges(void)
{
struct resource io_res, mem_res;
--
Milind Arun Choudhary
next reply other threads:[~2007-04-12 4:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 4:21 Milind Arun Choudhary [this message]
2007-04-12 13:10 ` [KJ][PATCH] ROUND_UP macro cleanup in arch/sh64/kernel/pci_sh5.c Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070412042150.GA11888@arun.site \
--to=milindchoudhary@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@lists.osdl.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxsh-shmedia-dev@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox