Skip to content

Commit 495023e

Browse files
geertutorvalds
authored andcommitted
of: Drop superfluous ULL suffix for ~0
There is no need to specify a "ULL" suffix for "all bits set": "~0" is sufficient, and works regardless of type. In fact adding the suffix makes the code more fragile. Fixes: 48ab6d5 ("dma-mapping: fix 32-bit overflow with CONFIG_ARM_LPAE=n") Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 3cea11c commit 495023e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int of_dma_configure_id(struct device *dev, struct device_node *np,
112112
u64 dma_end = 0;
113113

114114
/* Determine the overall bounds of all DMA regions */
115-
for (dma_start = ~0ULL; r->size; r++) {
115+
for (dma_start = ~0; r->size; r++) {
116116
/* Take lower and upper limits */
117117
if (r->dma_start < dma_start)
118118
dma_start = r->dma_start;

0 commit comments

Comments
 (0)