* [PATCH]ARM/footbridge: fix wrong parenthesis
@ 2010-06-04 9:28 Wan ZongShun
2010-06-07 14:01 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Wan ZongShun @ 2010-06-04 9:28 UTC (permalink / raw)
To: linux-arm-kernel
There is a wrong redundant right parenthesis in this code.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index e3bc3f6..cdbea55 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(__bus_to_virt);
unsigned long __pfn_to_bus(unsigned long pfn)
{
- return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET));
+ return __pfn_to_phys(pfn + (fb_bus_sdram_offset() - PHYS_OFFSET));
}
EXPORT_SYMBOL(__pfn_to_bus);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH]ARM/footbridge: fix wrong parenthesis
2010-06-04 9:28 [PATCH]ARM/footbridge: fix wrong parenthesis Wan ZongShun
@ 2010-06-07 14:01 ` Russell King - ARM Linux
2010-06-07 14:12 ` Wan ZongShun
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2010-06-07 14:01 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jun 04, 2010 at 05:28:41PM +0800, Wan ZongShun wrote:
> There is a wrong redundant right parenthesis in this code.
This patch is wrong.
> unsigned long __pfn_to_bus(unsigned long pfn)
> {
> - return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET));
> + return __pfn_to_phys(pfn + (fb_bus_sdram_offset() - PHYS_OFFSET));
It makes no sense to add byte address offsets to a PFN. The correct
solution is to delete the right paren at the end of the line instead.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH]ARM/footbridge: fix wrong parenthesis
2010-06-07 14:01 ` Russell King - ARM Linux
@ 2010-06-07 14:12 ` Wan ZongShun
0 siblings, 0 replies; 3+ messages in thread
From: Wan ZongShun @ 2010-06-07 14:12 UTC (permalink / raw)
To: linux-arm-kernel
So should I send a true one again or fix it by your self?
2010/6/7, Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Fri, Jun 04, 2010 at 05:28:41PM +0800, Wan ZongShun wrote:
>> There is a wrong redundant right parenthesis in this code.
>
> This patch is wrong.
>
>> unsigned long __pfn_to_bus(unsigned long pfn)
>> {
>> - return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET));
>> + return __pfn_to_phys(pfn + (fb_bus_sdram_offset() - PHYS_OFFSET));
>
> It makes no sense to add byte address offsets to a PFN. The correct
> solution is to delete the right paren at the end of the line instead.
>
--
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel at lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
* linux-arm-NUC900 mailing list
mail addr:NUC900 at googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com at gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-07 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-04 9:28 [PATCH]ARM/footbridge: fix wrong parenthesis Wan ZongShun
2010-06-07 14:01 ` Russell King - ARM Linux
2010-06-07 14:12 ` Wan ZongShun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).