From: Kevin Hao <[email protected]>

We definitely need a cast for this comparison, so use max_t() to fix
the following build warning.
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types 
lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
drivers/soc/marvell/fwlog.c:61:33: note: in expansion of macro 'max'
   61 |                                 max(rdbuf - fwlog_buf, *ppos);
      |                                 ^~~

Signed-off-by: Kevin Hao <[email protected]>
---
Hi Bruce,

Please help me merge this patch to the following two branches:
  v5.15/standard/cn-sdkv5.4/octeon
  v5.15/standard/preempt-rt/cn-sdkv5.4/octeon

 drivers/soc/marvell/fwlog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/marvell/fwlog.c b/drivers/soc/marvell/fwlog.c
index c61983c4eade..3b0fa9dd5ed9 100644
--- a/drivers/soc/marvell/fwlog.c
+++ b/drivers/soc/marvell/fwlog.c
@@ -58,7 +58,7 @@ static ssize_t fwlogs_read(struct file *file, char __user 
*buf, size_t count, lo
                                        *ppos);
 
                rdlen = fwlog_hdr->fwlog_end - fwlog_hdr->fwlog_base -
-                               max(rdbuf - fwlog_buf, *ppos);
+                               max_t(uint64_t, rdbuf - fwlog_buf, *ppos);
        }
 
        count = min_t(size_t, count, rdlen);
-- 
2.38.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12260): 
https://lists.yoctoproject.org/g/linux-yocto/message/12260
Mute This Topic: https://lists.yoctoproject.org/mt/97621442/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to