Skip to content

Commit

Permalink
of: Drop superfluous ULL suffix for ~0
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
geertu authored and torvalds committed Nov 2, 2020
1 parent 3cea11c commit 495023e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int of_dma_configure_id(struct device *dev, struct device_node *np,
u64 dma_end = 0;

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

0 comments on commit 495023e

Please sign in to comment.