Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp764888rdb; Thu, 18 Jan 2024 20:08:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1lB9NslQWe/QkOa4NVaAt+PgYzayvvRC9Ap5IITal/pZ2qfUt85gTWtQFS17LWMje+dVV X-Received: by 2002:a17:902:ed06:b0:1d6:fd75:9fd8 with SMTP id b6-20020a170902ed0600b001d6fd759fd8mr511477pld.11.1705637290284; Thu, 18 Jan 2024 20:08:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705637290; cv=pass; d=google.com; s=arc-20160816; b=RmJojImHmAhbOmmQI7gR/PSGJOeAnK5h0ncYZJxGZrVIyHHEopXbDafKFyHRKYZv+K MwnIoSindEhH/qnrc6Tfb6IisnBGnbz+aG+ngCWzsf8y1FGYlCT6KCdmd03eaCENNFY/ 1+5EMBPX3QxaksLji7ZOFHCk+9jQifh5B1Cs3D+uNnTVn5FwLtVDUjYUWoRv8o+6Ekc/ qUWA6ee13ehIJQDbXW5W3O0FNy9EbGd9nEAKX8QMnLq2oSO0LrUTDsyVny/LkcGcpsmG GHZaGLke6RKZqAAiQ+AKTy2mWin6bYUe/ytfmyQrDiEJMSncjyAwqy0zs2KbKYYzbT5S 971A== 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=uVJDI8Av8JIkW3qp8NXElwHq6/3MK+TAHkHyddmUi5I=; fh=Bniw+6GSTGRfFyC55GB3Thz1GNqaKHZWIdADbDjMDXE=; b=sNgm6F65p+tmRupBlAbb+tz4D7xujGuMFNfv5HxjkE0uicjLMgrn0H/5mtQPOsTHfl gY++4y97a6/I+4zHTOSdoYGvtF9eiAqYRY7p9aZRek3mhbJYh7ftp5Tj+gaKSCcE3NYS OHhgvOi/k1UDmYkdMPCdOyzj7BAK9kpe0vPBMOODcQMq56lZ6kCn1w0Zs+6W3nsrYsKF bHC/lwC0dGfY0D5REY//w90JvXEQZ2kOWYS/JxyRIgIN3Xvz7ZE7C2Jcxp7TvV7isqHd 4X19/bMIZ6DAeYZcTpb44NSnozJ1JyX++TuGhavHM7aZikJ0yo4RchZB44b3T6Gn6Uxc JF8w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-30758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 t8-20020a170902bc4800b001d6f3a92b6dsi2542709plz.179.2024.01.18.20.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 20:08:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30758-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=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-30758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 DF6842864ED for ; Fri, 19 Jan 2024 04:08:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F3A879F2; Fri, 19 Jan 2024 04:07:38 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 D08651C15; Fri, 19 Jan 2024 04:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705637257; cv=none; b=qaoidY0soZQtN/OY7MF/4j/WnbTfOemktz1m15mdXp2MaZezXFdypPZges+3XpHMOZ2B2EAsLwVB9dxNYAJ1rI7kEODT8qtlTSzByYlB6yZKs3DOgMVT3GfOcP+Fvok4wZzw5jFOArHmSCHeKXWOhiraJRTPRVQV+EiCIsKxg5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705637257; c=relaxed/simple; bh=AOy4v0CB7AxenOdzrzI/1u6KpR6P+kRay885wVReU9U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J6e1Hr3onm4wrXG3REfhLXnojFYsRog+NfR1/IRnzFP/U3dQTDc8aCrjjEdqBoh003VNWICTwsLN1FiC4U2AAdDReX0CoPYMG+nZz6pi6WfOK6X5jssPYZGmSekqwMACtQF4P1iEKOz4WAIswkMdHA23A+K+De1HemR7kFbgTcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4TGR010Yr9zGpqH; Fri, 19 Jan 2024 12:07:13 +0800 (CST) Received: from kwepemm600003.china.huawei.com (unknown [7.193.23.202]) by mail.maildlp.com (Postfix) with ESMTPS id ACEFC1402DE; Fri, 19 Jan 2024 12:07:33 +0800 (CST) Received: from ubuntu2204.huawei.com (10.67.174.22) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Jan 2024 12:07:33 +0800 From: Yang Jihong To: , , , , , , , , , , CC: Subject: [PATCH 3/3] perf data: Minor code style alignment cleanup Date: Fri, 19 Jan 2024 04:03:04 +0000 Message-ID: <20240119040304.3708522-4-yangjihong1@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240119040304.3708522-1-yangjihong1@huawei.com> References: <20240119040304.3708522-1-yangjihong1@huawei.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-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600003.china.huawei.com (7.193.23.202) Minor code style alignment cleanup for perf_data__switch() and perf_data__write(). No functional change. Signed-off-by: Yang Jihong --- tools/perf/builtin-record.c | 7 ++++--- tools/perf/util/data.c | 8 ++++---- tools/perf/util/data.h | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 5e3ea5cf1429..0b6f29fa0064 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1853,16 +1853,17 @@ record__switch_output(struct record *rec, bool at_exit) } fd = perf_data__switch(data, timestamp, - rec->session->header.data_offset, - at_exit, &new_filename); + rec->session->header.data_offset, + at_exit, &new_filename); if (fd >= 0 && !at_exit) { rec->bytes_written = 0; rec->session->header.data_size = 0; } - if (!quiet) + if (!quiet) { fprintf(stderr, "[ perf record: Dump %s.%s ]\n", data->path, timestamp); + } if (rec->switch_output.num_files) { int n = rec->switch_output.cur_file + 1; diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c index 550675ce0b78..08c4bfbd817f 100644 --- a/tools/perf/util/data.c +++ b/tools/perf/util/data.c @@ -413,7 +413,7 @@ ssize_t perf_data_file__write(struct perf_data_file *file, } ssize_t perf_data__write(struct perf_data *data, - void *buf, size_t size) + void *buf, size_t size) { if (data->use_stdio) { if (fwrite(buf, size, 1, data->file.fptr) == 1) @@ -424,9 +424,9 @@ ssize_t perf_data__write(struct perf_data *data, } int perf_data__switch(struct perf_data *data, - const char *postfix, - size_t pos, bool at_exit, - char **new_filepath) + const char *postfix, + size_t pos, bool at_exit, + char **new_filepath) { int ret; diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h index effcc195d7e9..110f3ebde30f 100644 --- a/tools/perf/util/data.h +++ b/tools/perf/util/data.h @@ -80,7 +80,7 @@ int perf_data__open(struct perf_data *data); void perf_data__close(struct perf_data *data); ssize_t perf_data__read(struct perf_data *data, void *buf, size_t size); ssize_t perf_data__write(struct perf_data *data, - void *buf, size_t size); + void *buf, size_t size); ssize_t perf_data_file__write(struct perf_data_file *file, void *buf, size_t size); /* @@ -91,8 +91,8 @@ ssize_t perf_data_file__write(struct perf_data_file *file, * Return value is fd of new output. */ int perf_data__switch(struct perf_data *data, - const char *postfix, - size_t pos, bool at_exit, char **new_filepath); + const char *postfix, + size_t pos, bool at_exit, char **new_filepath); int perf_data__create_dir(struct perf_data *data, int nr); int perf_data__open_dir(struct perf_data *data); -- 2.34.1