]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From 6dc7d8c843024c2636cf52d3f93047acbcd765f2 Mon Sep 17 00:00:00 2001 |
2 | From: Eilon Greenstein <eilong@broadcom.com> | |
3 | Date: Mon, 9 Mar 2009 00:52:17 +0000 | |
4 | Subject: [PATCH] bnx2x: Casting page alignment | |
5 | References: bnc#481074 | |
6 | ||
7 | Adding a proper cast to the argument of PAGE_ALIGN macro so that the output | |
8 | won't depend on its original type. Without this cast aligned value will be | |
9 | truncated to the size of the argument type. | |
10 | ||
11 | Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com> | |
12 | Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> | |
13 | Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com> | |
14 | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> | |
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
16 | Signed-off-by: Brandon Philips <bphilips@suse.de> | |
17 | --- | |
18 | drivers/net/bnx2x.h | 2 +- | |
19 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
20 | ||
21 | diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h | |
22 | index 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 | -- | |
35 | 1.6.2 | |
36 |