]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.drivers/bnx2x-Casting-page-alignment.patch
Merge branch 'master' into next
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / bnx2x-Casting-page-alignment.patch
CommitLineData
2cb7cef9
BS
1From 6dc7d8c843024c2636cf52d3f93047acbcd765f2 Mon Sep 17 00:00:00 2001
2From: Eilon Greenstein <eilong@broadcom.com>
3Date: Mon, 9 Mar 2009 00:52:17 +0000
4Subject: [PATCH] bnx2x: Casting page alignment
5References: bnc#481074
6
7Adding a proper cast to the argument of PAGE_ALIGN macro so that the output
8won't depend on its original type. Without this cast aligned value will be
9truncated to the size of the argument type.
10
11Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
12Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
13Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
14Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Brandon Philips <bphilips@suse.de>
17---
18 drivers/net/bnx2x.h | 2 +-
19 1 files changed, 1 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
22index 15a5cf0..3cf2b92 100644
23--- a/drivers/net/bnx2x.h
24+++ b/drivers/net/bnx2x.h
25@@ -152,7 +152,7 @@ struct sw_rx_page {
26 #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT)
27 #define SGE_PAGE_SIZE PAGE_SIZE
28 #define SGE_PAGE_SHIFT PAGE_SHIFT
29-#define SGE_PAGE_ALIGN(addr) PAGE_ALIGN(addr)
30+#define SGE_PAGE_ALIGN(addr) PAGE_ALIGN((typeof(PAGE_SIZE))addr)
31
32 #define BCM_RX_ETH_PAYLOAD_ALIGN 64
33
34--
351.6.2
36