Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106150669
D27580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27580.diff
View Options
Index: head/sys/dev/mxge/if_mxge.c
===================================================================
--- head/sys/dev/mxge/if_mxge.c
+++ head/sys/dev/mxge/if_mxge.c
@@ -772,7 +772,7 @@
uint32_t *buf, dma_low, dma_high;
int i;
- buf = (uint32_t *)((unsigned long)(buf_bytes + 7) & ~7UL);
+ buf = (uint32_t *)((uintptr_t)(buf_bytes + 7) & ~7UL);
/* clear confirmation addr */
confirm = (volatile uint32_t *)sc->cmd;
@@ -825,7 +825,7 @@
int err, sleep_total = 0;
/* ensure buf is aligned to 8 bytes */
- buf = (mcp_cmd_t *)((unsigned long)(buf_bytes + 7) & ~7UL);
+ buf = (mcp_cmd_t *)((uintptr_t)(buf_bytes + 7) & ~7UL);
buf->data0 = htobe32(data->data0);
buf->data1 = htobe32(data->data1);
@@ -944,7 +944,7 @@
uint32_t *buf, size, dma_low, dma_high;
int status, i;
- buf = (uint32_t *)((unsigned long)(buf_bytes + 7) & ~7UL);
+ buf = (uint32_t *)((uintptr_t)(buf_bytes + 7) & ~7UL);
size = sc->sram_size;
status = mxge_load_firmware_helper(sc, &size);
@@ -3373,7 +3373,7 @@
ss->tx.req_bytes = malloc(bytes, M_DEVBUF, M_WAITOK);
/* ensure req_list entries are aligned to 8 bytes */
ss->tx.req_list = (mcp_kreq_ether_send_t *)
- ((unsigned long)(ss->tx.req_bytes + 7) & ~7UL);
+ ((uintptr_t)(ss->tx.req_bytes + 7) & ~7UL);
/* allocate the tx busdma segment list */
bytes = sizeof (*ss->tx.seg_list) * ss->tx.max_desc;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 5:48 AM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15611613
Default Alt Text
D27580.diff (1 KB)
Attached To
Mode
D27580: Use uintptr_t instead of unsigned long for integers holding pointers.
Attached
Detach File
Event Timeline
Log In to Comment