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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 8823BC3ABD8 for ; Fri, 16 May 2025 17:12:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DB9410EB4E; Fri, 16 May 2025 17:12:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="DVUbUzAq"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CA8710EB4E for ; Fri, 16 May 2025 17:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747415560; x=1778951560; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vVzbZB5HRSgLSfNya0xJtsxDJgCGnyqgU8Tg6Tmrn8I=; b=DVUbUzAqa6XdvsejLtGc9Gfy40/tA6yvCUkYrOGLYRitL+783STflYH8 ykTOzkd6zYDadHQB+AjpHKnCSZYOmmHJ92QcyZI5m/X6ki+EwYyHFx/7k p4em7XyD9w8MM8zEpUTRdnJod16wganztn0tdbl0up2CcPUsgB7jhoyzd 8eTCu6ZAi2OOGAWhGU/F/OKFuPjp8dtRch7q8CP2mb5bjzgWZQwXDgG4Y MpDrDvySvKaE78NZbCt2pDRBMBIytTbJytUwNq6CQdwLDsEwEYVpTqRsS n05fHTXAn+EaIjZAeGwHw56q381OFrjYhSXl7eQu4ceco7LU3kfTblWOQ w==; X-CSE-ConnectionGUID: 0TIdlLPlQ7a89mGFQRFPvw== X-CSE-MsgGUID: 71Bn/zEJSMy1ldCQ/NoY5g== X-IronPort-AV: E=McAfee;i="6700,10204,11435"; a="49297129" X-IronPort-AV: E=Sophos;i="6.15,294,1739865600"; d="scan'208";a="49297129" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2025 10:12:39 -0700 X-CSE-ConnectionGUID: gbk6aiKORxaqIS3ufr0Gpg== X-CSE-MsgGUID: SCiPvJWJQYKS25xjFVNeXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,294,1739865600"; d="scan'208";a="138793542" Received: from unknown (HELO d368ed45d7ae.iind.intel.com) ([10.66.234.123]) by fmviesa007.fm.intel.com with ESMTP; 16 May 2025 10:12:37 -0700 From: Jeevaka Prabu Badrappan To: igt-dev@lists.freedesktop.org Cc: zbigniew.kempczynski@intel.com, kamil.konieczny@intel.com, markyacoub@google.com, seanpaul@google.com, carlos.santa@intel.com, sapna1.singh@intel.com, Jeevaka Prabu Badrappan Subject: [PATCH i-g-t v7 11/14] tools/intel_gpu_top: Replace index with strchr Date: Fri, 16 May 2025 17:11:50 +0000 Message-ID: <20250516171153.74079-12-jeevaka.badrappan@intel.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516171153.74079-1-jeevaka.badrappan@intel.com> References: <20250516171153.74079-1-jeevaka.badrappan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" As index is deprecated, replace index with strchr. Signed-off-by: Jeevaka Prabu Badrappan Reviewed-by: Zbigniew KempczyƄski --- tools/intel_gpu_top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 68d27089b..54e71e559 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -290,7 +290,7 @@ get_pmu_config(int dirfd, const char *name, const char *counter) if (ret <= 0) return -1; - p = index(buf, '0'); + p = strchr(buf, '0'); if (!p) return -1; -- 2.49.0