Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp355374lqs; Tue, 5 Mar 2024 04:20:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWO1c+D57pWqnlm+MNnNRnhHdUD4BKhPnJIEOGvlU24AIhyJJeyVKb4En0kuB9+BCtY1fJjvyP8j85kLlGsLbyrQlt/7oyi91exrRsmLw== X-Google-Smtp-Source: AGHT+IEhOszxKGflJ8nC7WucBRV34cCH9RDuMF5thp7GpJ6xv5zLJtcm4i29DEHZof3n7NiYSnD7 X-Received: by 2002:a05:6a20:4391:b0:19c:b0f6:25c with SMTP id i17-20020a056a20439100b0019cb0f6025cmr1959935pzl.45.1709641254053; Tue, 05 Mar 2024 04:20:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709641254; cv=pass; d=google.com; s=arc-20160816; b=yDdO26WE+SNXsncsUya7D+szIj5OtCiaxOo0I6XdNnGQoKX3knDS5Vm51TjLgRzY+J 6m+nrm91mZ5QSY2YquRKfBu3kE0xIWrfLPTMurKXuwlQiciNENSoBewC2EDaFnFoQZsz EFeXUQciPEn+tuL2CWm23ZPxEQjP3wsBYPfej4BmkP1h/8U8/XZz0EAQfenrILPuJWyq hLVIr/+UIhJ0si+/DNDYvqRyLk9QZfycDwPgo6eQeAA8o8EQIafO4CS/2mBDEMjbH344 /A8SDVE5IfvgJ7OuIGwypxo5FVN5L631Z2pPgOT7q743XBKmgs75bpVbfBPPwdvoZR+X 3IBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=VilDjt51Rn6F3kqjdOtFZqjpu1TXq0zPU3x7vTFOXWo=; fh=mzP25rL236Tp7a3Ps6/6PoyBtBCMxNOzm4moGQaxjxc=; b=M4sEWNgmIfvcbwzib/Qc62AV1uSyHrItfBkNH+xchNvJLXUMLyEb6FEUJ6PE45yWc9 V7nc9pJRHTngTi/Ex2h4+AUfAbqTKP5jqsEJBU0e+0nS6M518DTX7hi1/7UTdLy6Nag8 auZ2ygN7n3fHuJQQm7fRfDq+ke9brNWaErgHjOu29Wu/6T3TbwkYJCLkenzvWmTJBU7a nFVph/umDEW6hLUaeKhDbSEe8zOSNEQsBtYfbUO9pbQ93KRiK7kxfL60WU0H+gMCS9xB S+rrczF1BB14XwxLDvq5OByICQp0UodeHfw9GCRivNkf0N4hsaBfXRzYiFrBhztqjn9t 1igA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=andestech.com dmarc=pass fromdomain=andestech.com); spf=pass (google.com: domain of linux-kernel+bounces-92352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=andestech.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f6-20020a056a000b0600b006e55837b214si9583748pfu.197.2024.03.05.04.20.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 04:20:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=andestech.com dmarc=pass fromdomain=andestech.com); spf=pass (google.com: domain of linux-kernel+bounces-92352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=andestech.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8881284E06 for ; Tue, 5 Mar 2024 12:20:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD0745B5A3; Tue, 5 Mar 2024 12:20:29 +0000 (UTC) Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC48559B5E for ; Tue, 5 Mar 2024 12:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.248.80.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641229; cv=none; b=XFDBCSyh2tE7UsKw98SoV7nW1dxLQSpf11WQfaA6GL7MlJ5tYWuqI6XVaBEqoPP1i7/TXwGMJrasxMzrBjG3giqCUNw0bcrGNvRskgQsxi4Gme/gqcbYM9F0KU126RAfs0UoODuZNQ+HyoODbaeH0ygvuzBh76pDbW4znB2+O+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641229; c=relaxed/simple; bh=Z4ag4dmgkwg6QKinQ/3ZUdEqVOO6seGs6xNzDBwT5gs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eaVyAyHREtHdREt8zM7qMVYQn1t+hrVkSbNS0inAW0O4WvT45hAemLU5IPJXSwMf/N0f+gL+KUDGB1g7wPUAAXYQaQpIbf3cGxAqwAhNVIjZbnbj1ghzUFmvKVsA4BrdpUzNKMUXK7bQO6nhdIKwv+zHrpq8/jtzwGg2uPgyzO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com; spf=pass smtp.mailfrom=andestech.com; arc=none smtp.client-ip=60.248.80.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=andestech.com Received: from Atcsqr.andestech.com (localhost [127.0.0.2] (may be forged)) by Atcsqr.andestech.com with ESMTP id 425C5uoP023912 for ; Tue, 5 Mar 2024 20:05:56 +0800 (+08) (envelope-from ben717@andestech.com) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 425C5kAv023873; Tue, 5 Mar 2024 20:05:46 +0800 (+08) (envelope-from ben717@andestech.com) Received: from atctrx.andestech.com (10.0.15.173) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Tue, 5 Mar 2024 20:05:43 +0800 From: Ben Zong-You Xie To: , , , , , , , , , , , , , , CC: , , Ben Zong-You Xie Subject: [PATCH 2/2] perf riscv: Fix the warning due to the incompatible type Date: Tue, 5 Mar 2024 20:05:01 +0800 Message-ID: <20240305120501.1785084-3-ben717@andestech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305120501.1785084-1-ben717@andestech.com> References: <20240305120501.1785084-1-ben717@andestech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL:Atcsqr.andestech.com 425C5uoP023912 In the 32-bit platform, the second argument of getline is expectd to be 'size_t *'(aka 'unsigned int *'), but line_sz is of type 'unsigned long *'. Therefore, declare line_sz as size_t. Signed-off-by: Ben Zong-You Xie --- tools/perf/arch/riscv/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/arch/riscv/util/header.c b/tools/perf/arch/riscv/util/header.c index 4a41856938a8..1b29030021ee 100644 --- a/tools/perf/arch/riscv/util/header.c +++ b/tools/perf/arch/riscv/util/header.c @@ -41,7 +41,7 @@ static char *_get_cpuid(void) char *mimpid = NULL; char *cpuid = NULL; int read; - unsigned long line_sz; + size_t line_sz; FILE *cpuinfo; cpuinfo = fopen(CPUINFO, "r"); -- 2.34.1