[PATCH v1] drivers:coresight:Use min macro

Yang Ruibin 11162571 at vivo.com
Thu Aug 22 00:36:00 PDT 2024


Instead of using the min() implementation of
the ternary operator, use real macros.

Signed-off-by: Yang Ruibin <11162571 at vivo.com>
---
 drivers/hwtracing/coresight/coresight-catu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
index bfea880d6..7ea67d56e 100644
--- a/drivers/hwtracing/coresight/coresight-catu.c
+++ b/drivers/hwtracing/coresight/coresight-catu.c
@@ -152,8 +152,7 @@ static void catu_dump_table(struct tmc_sg_table *catu_table)
 		catu_table, catu_table->table_daddr);
 
 	while (offset < buf_size) {
-		table_end = offset + SZ_1M < buf_size ?
-			    offset + SZ_1M : buf_size;
+		table_end = min(offset + SZ_1M, buf_size);
 		table = catu_get_table(catu_table, offset, NULL);
 		for (i = 0; offset < table_end; i++, offset += CATU_PAGE_SIZE)
 			dev_dbg(catu_table->dev, "%d: %llx\n", i, table[i]);
-- 
2.34.1




More information about the linux-arm-kernel mailing list