From patchwork Thu Aug 22 07:36:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Ruibin <11162571@vivo.com> X-Patchwork-Id: 13772892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37420C3DA4A for ; Thu, 22 Aug 2024 07:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=m2iD67AaaqjbDxHWPgzY3HiLCZs/CrQmezHszyl2IHg=; b=oK2PRXGOB/aPTqhPcYvGuV40Ph imYCyHGaLynJnRMEUFcBX8XHZfN9nvtj1nsDTr+jdUCvVbKcXCh7VpvfcBlVZpsN5/5BROdqUGdRE to9u8OgxcrIc3qZANQz2G0MBhetGXl1i0alm16rCWr/Wdk2A6H6UMmItmGAJDuET2I3CkWQhI6uEq AWW/Mpj6E7ZPmsxrqYU0gE5+re++skgr7p+Hc2iIFgd9zDbnbqi7UkxFE2w78GwcDQUEW06jrWtNP dsiT+EYs2g6izwk+4qlVpd/QTG5dh8/awOJHtqdyqE4kV+D5sHfPcs/aaf7cRKc8p2Rj1di17PLh1 vAggS17A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh2Nf-0000000Btmj-38rG; Thu, 22 Aug 2024 07:37:15 +0000 Received: from mail-tyzapc01on20627.outbound.protection.outlook.com ([2a01:111:f403:2011::627] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh2Mw-0000000Btjf-1uhR for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 07:36:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FFpKkavrDqtoHIvtHsK51meMbeacyvg00CzeLID8X6ah0FnAZM1rKnGdcTr3E80tE+WtrX/au6SugryE86+Sbn1ne8MxfVOPTmBqIA8eHIaEbWSubngzT8EfvWIbxHoEwfZZ0XzQyjAuO3Tc3DO+gIJorERsj2SLHmFpNWyLS+RqMurGvr2u+iVEasJV0MI9FuDOVV2PzggozYiyTfW5uqjLKJZPvkrJpJaCBiTbZcvynjccsZFm+LTBg58vkfODwJjo9C6BKSCBK9XkbMQU4nyKL5MV+KY3YOC85iNuVdjceMG6Z0Kr50+ZGTPM2PDOVVe1EUcFiaUzqAlNxBfTNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m2iD67AaaqjbDxHWPgzY3HiLCZs/CrQmezHszyl2IHg=; b=ezcldmlrjJoMjhhfQZ3TVglWV6pQ22j6rHw1/VmJBXqk+1mZR6lyvDCJ9j7XMxUP7bWTV6B0quVtirnhlw7I9U2ZVfec/wEDML4zly4elK4H2RuvP3h8PQs6iz5cQrxlxTz6vaqBthjJl7mnNnAiuJQLCadl7YInPNNLl6G/o6e5dVzrnDIn2O0PsY2ddxwyemPfcIlt+KSG9lG60VlMsJbWAObJDGeIl1i4GBP+jcQb+6Te8DDWlqkJiaYOmkna7dXE/py0wp7sg+44LXExu1jTAK/G8KviIymEzIgsAyIbjTD0fkw5/azacApELNHBTWnpM6NWtvD//QyKo96ZUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m2iD67AaaqjbDxHWPgzY3HiLCZs/CrQmezHszyl2IHg=; b=T/TZdrBRzKyR8VWvvkDHYo/2vaS3jG8wlN5N5X1l6PRYkj1qPjXIuLlw3GOWnaC2tCSmHl/xz/6J8a1VoVv+MkNJHgaypPEe0Tcxi+AAX8+H3k6s7nDd4XGP81u1s+OrTDvt7lHAy6iO0gqU2DEcnTTkgGPHBHPU9u8GoEdlATkJ3R5xPW9vOYhEtICw4AK2h5CHyj5Sh2KuGL2Kd4cBEk5qmoKsC8/7zcBYo2ceDoMnQIfAbuDlLkfgyvvRf/zzg7kjiUMmNsyBDvpvBR0kr80Tud7rgMEaxeL6ZnWOMB4qG4w/vJLoL+X3GlGIiFj3RvUKQD/wzJw5uZR6NDLOUQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) by TYSPR06MB6289.apcprd06.prod.outlook.com (2603:1096:400:411::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Thu, 22 Aug 2024 07:36:11 +0000 Received: from TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268]) by TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268%6]) with mapi id 15.20.7875.019; Thu, 22 Aug 2024 07:36:11 +0000 From: Yang Ruibin <11162571@vivo.com> To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Yang Ruibin <11162571@vivo.com> Subject: [PATCH v1] drivers:coresight:Use min macro Date: Thu, 22 Aug 2024 15:36:00 +0800 Message-Id: <20240822073600.1359333-1-11162571@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYAPR01CA0109.jpnprd01.prod.outlook.com (2603:1096:404:2a::25) To TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6263:EE_|TYSPR06MB6289:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c67b55e-77fb-47c3-b554-08dcc27d17f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014|81742002; X-Microsoft-Antispam-Message-Info: qMYRwPewZQJDUOph3CMWHewrkUzjaRe4AtImFRD5e83Me3cNyYjrsLDArFkysSqTTV2vInMFu7RETbgPNVmlmI2Efg1Qtn5Wl7Y2ffyZO4ffxe2K1M3+4uzwr6OQQ3/UJmiVJ1RSSgySLCV0ZFQRxl+7DHQKwe6wNNfBNcUcD2tmh3MCaRxTxAj9ots7mgzVYDtDvsmKRfODX23AEVdJ64a9xZ1I/ECyTX31GJX9Uka2aERfPlaUA19FT3WqEfIjgVTXT39TSCxqISUU7oauIoN7V954UdP9GHxKqVv6bd/oEhWy0I13veZpJDwia9ZlLUuKv/uch++txWQdxMEd3xA005WuAuuAg5enJpYP8culKS+DxFoMnHkqMGEkKXIGS8+w1qJkLmTMWqsZpU0Mbu2rF67TF4GgIo+6xgFV79BRB5nobMcjQwAYfFlSa/xtP5OBhRj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263.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014)(81742002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Tw/0nTGUSEFo81OD158boAEr1MyNNOKzt02YOXAiGfj0NBokJ/r18IG3qQOKcVhpXxXKkOakNpnYr9despdQqrOIaEBch87hxJJnd6rKHvwimglBAPP3+fPt3mibiJlV+juOhOFbSd4/70PsoVd1YJJ303KlxuPEf9HJBmuvTZPRHucdM+K+KFnEMwl4ZZ4oO6jToEq1QfO6RN1ZgHGMhj5lRzMl3Gv7SrpRkThjVN/gzIEf5N1CTETvJ0HkAX65jBRJS754Zt4RCvILOPgB1QfrRJWQ/nNr/iC048RZjZKEtkdIKcLrlvvvNvM6H2V/O7s5NdM6NIt2pAGvfA33DtbwLC19kjJKI3PrjscKzGT5ZXDAFpjSaTlOtjStusp9JaD2S1IU1SvsXxJu+JEX0j2JUGNe/rc6mfq9vBf25IBhm04fKRJr7peDfss7JjqDts+EZcci6GVVBMh3UAT4N3F4qZlX5X5ahJ/3addVpE5npEsqKy/5L2KaNdV6bFxlrM//0s50/HQj/WR1Kx5QQkEfgz1rWiPhnd3nh8SMz/Z4K/3uVNMkZqHoKabg7pEzy2bH5fXDE2XMJJyxhecOtn3sa8SVINMTOVhyw8Ahkx21icIQkCBHL39Ie1mVO9irQBPoG6004irloZ2NdJPdwJsahelGX49bSMwZGAB/5Zx4McHYgU/q/D58rIcC4CD2tLwNtuJ+ZZbCd6vG2uKslpurLnW9t8nQ5JdUJE+FkGNdXmXm/PJcO9oohKDwyEq/YPLDA40Egx3SQX3trw2rLopHnB3ZmTej/XISqsRjaB1jO0cS0HiU80IWP+Xu4XDkDXm7fEill+H49lpFrPr2w+H+BLehWdnCNygbUUuOErx+V0nC61G75pgsuNbnk6mhsyznYFHwYrtHC7WMpNKQCdG0GC6sWNAwr91+xPxRIHSeqLWiQJdrSJVbgcFZ8vcIECwfmjsRHePqPAtFUc2UtS0F9CNHzcZFtUENziUyzuPqXxn2PoyNj4EeBJ2l4mCNtk9p3nY63lQutsnBi9fFYeBUS82Pe1HUFTWWOGVvcJxnK992oGW5Ow5iqOVZTBoDFWyoDlppQQ2SNp1o1I1OFw4bhnZZ+Rf1HFmKD+SL2eLXeZcymW10y3H4GiwpKOHS4ZKIYabkk4VrJjKT1p8zAPWTZJXIye4j68tDw9wd2//0kPmi55vBmoXeRS/4PPKpVArR2WMIxcHJKI7YGZzwf3zUXmux5YPW+Hms7RaO7mo56zO4RDiHzCGUMmkZaUVpJcwZ3ni/P6tJ++MqlAwmQLCa9SFgklXRMiKLd9rKjAE9DtHRCMj+k/WOkX26FupKIO3NcQFcfkVBDrpEm8mNpIsfUwMhIoGrX/D/ITFGE/26dgO2j8A0M8WGCoSaEaZeJHD44ylD4k+vDWz/J6r3E6SFxNqUsWHcako/3u1hhHBBXgg/DP4Z3eWrS48KJhtA6ruMUuATfohHCctsD19lITavPP3sFCP/wovNICRm+sMa5fzxj338UvAGkRaJB4BYJiZ8K4UxNVkz9hZYvZHJ7iRf90v8ksYOqiEtijap8bE53WkpX26eIQRix1yrGDxt X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c67b55e-77fb-47c3-b554-08dcc27d17f9 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6263.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 07:36:11.0401 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 10pRDPzNM7NWhvOEMlEv0b5sQmSPhK3MzWnLV4/JJkgxfNV3lmXSTe+4tSgpAS+NSSRlaN54ET3++f18rDw++w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6289 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_003630_506199_AB8605EB X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of using the min() implementation of the ternary operator, use real macros. Signed-off-by: Yang Ruibin <11162571@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]);