[resend,v1,1/1] logic_pio: Use RESOURCE_SIZE_MAX definition

Message ID 20240202154744.473467-1-andriy.shevchenko@linux.intel.com
State New
Headers
Series [resend,v1,1/1] logic_pio: Use RESOURCE_SIZE_MAX definition |

Commit Message

Andy Shevchenko Feb. 2, 2024, 3:45 p.m. UTC
  Use a predefined limit instead of hardcoding it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v1: resent with the main contributrs in the Cc list
Initial contribution was here more than a few months ago:
https://lore.kernel.org/r/20230911224500.16677-1-andriy.shevchenko@linux.intel.com
followed by
20231016132611.1201402-1-andriy.shevchenko@linux.intel.com

 lib/logic_pio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index 2ea564a40064..1cab23e4f856 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -175,7 +175,7 @@  resource_size_t logic_pio_to_hwaddr(unsigned long pio)
 	if (range)
 		return range->hw_start + pio - range->io_start;
 
-	return (resource_size_t)~0;
+	return RESOURCE_SIZE_MAX;
 }
 
 /**