Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp85695rdh; Sat, 23 Sep 2023 02:33:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjwl49F5RomUhpuYLCt5Z0bej88tsRu8ebH1WuuHowIR2/ZbCntKZ3VWdOLzQehCN1r3r2 X-Received: by 2002:a05:6e02:b42:b0:34c:f2cb:b2c with SMTP id f2-20020a056e020b4200b0034cf2cb0b2cmr2530230ilu.19.1695461619832; Sat, 23 Sep 2023 02:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695461619; cv=none; d=google.com; s=arc-20160816; b=cgIyfWogL97KUUnlXa0h2UjUdLH7m2G10SD/mLx7xXBYw/63T1WnTFuPI+OVVoDQHJ 2VfG062ajySFDGVXuc+Oi5F6/N8onBN99kLvC2rkoOCHAXqXTGVGizIajqPuh6QYV4Do L58eYZth5xTqoMgZhZ80W+rQTBKJ41aqX5MpjI3lfHPewyHSkgXwIOoPoBUAOoxb8lZz s74Gb1KaqvS7Ojpeie7aI2VSewdkcnbJe5w+7Vdb4B1Q4kfwsLmh5A1Tb74rmfoP4T+S yV91+m6rgymqk9BXg6JtTbcYkJ/WsDoWH7b+HkgNFmHctf3qCbkgL2fgAvGulmu8H21p f0xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gmL06ZMpmAZcvjI7+9mA+sZqLuR+U1EnAjpISAOeglc=; fh=JXx1mv1fB650HoTkc5GIgpDQ5Ey550GcDyaNZ/s6bYc=; b=JhI8gyg4jdf5No/OYSPjvrSMcEdszgEyOXKCU6KkbRXWnRSICbcJt2zuoop7Q+bCVs tr+Us+Tc1Nw8P1w3erzAL2/0zyM8IeOoiSAOFYR++4hGh7Fm2DVxtlPWBS6tNGN9eABL K9DZwlR65P5+1qojO6g2xPq6gWO4UB3+LXlPQ32mUSuZpxTOQFFKjTNjEmVNfATiZgoc LVnlDwmdJIRqkzbErxmMV5mlg/s8C/1EoOBKJvWGX5E6otIOYKrjtTD3nMJZGZ5M4vYO 6SzDtOA/uzwASj+g+oC1bkaQ1qFv33ZXk1+2DySfg1O6EVY8DfcOFPNymICsGBQHPmz3 lpUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bz14-20020a056a02060e00b00578b6e32b60si6428634pgb.126.2023.09.23.02.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 02:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B966180E5B96; Sat, 23 Sep 2023 02:32:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231270AbjIWJcU (ORCPT + 99 others); Sat, 23 Sep 2023 05:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbjIWJcQ (ORCPT ); Sat, 23 Sep 2023 05:32:16 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DDA4196; Sat, 23 Sep 2023 02:32:10 -0700 (PDT) Received: from kwepemm000003.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Rt3ks6Pzxz15NJV; Sat, 23 Sep 2023 17:29:57 +0800 (CST) Received: from ubuntu2204.huawei.com (10.67.174.22) by kwepemm000003.china.huawei.com (7.193.23.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 23 Sep 2023 17:32:07 +0800 From: Yang Jihong To: , , , , , , , , , , CC: Subject: [PATCH 1/4] perf bench messaging: Fix coding style issues for sched-messaging Date: Sat, 23 Sep 2023 09:30:34 +0000 Message-ID: <20230923093037.961232-2-yangjihong1@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230923093037.961232-1-yangjihong1@huawei.com> References: <20230923093037.961232-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.22] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000003.china.huawei.com (7.193.23.66) X-CFilter-Loop: Reflected X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 23 Sep 2023 02:32:36 -0700 (PDT) X-Spam-Level: ** Fixed several code style issues in sched-messaging: 1. Use one space around "-" and "+" operators. 2. When a long line is broken, the operator is at the end of the line. Signed-off-by: Yang Jihong --- tools/perf/bench/sched-messaging.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c index fa1f8f998814..6a33118c8f9b 100644 --- a/tools/perf/bench/sched-messaging.c +++ b/tools/perf/bench/sched-messaging.c @@ -98,7 +98,7 @@ static void *sender(struct sender_context *ctx) again: ret = write(ctx->out_fds[j], data + done, - sizeof(data)-done); + sizeof(data) - done); if (ret < 0) err(EXIT_FAILURE, "SENDER: write"); done += ret; @@ -201,8 +201,8 @@ static unsigned int group(pthread_t *pth, int wakefd) { unsigned int i; - struct sender_context *snd_ctx = malloc(sizeof(struct sender_context) - + num_fds * sizeof(int)); + struct sender_context *snd_ctx = malloc(sizeof(struct sender_context) + + num_fds * sizeof(int)); if (!snd_ctx) err(EXIT_FAILURE, "malloc()"); @@ -239,7 +239,7 @@ static unsigned int group(pthread_t *pth, snd_ctx->wakefd = wakefd; snd_ctx->num_fds = num_fds; - pth[num_fds+i] = create_worker(snd_ctx, (void *)sender); + pth[num_fds + i] = create_worker(snd_ctx, (void *)sender); } /* Close the fds we have left */ @@ -288,7 +288,7 @@ int bench_sched_messaging(int argc, const char **argv) total_children = 0; for (i = 0; i < num_groups; i++) - total_children += group(pth_tab+total_children, num_fds, + total_children += group(pth_tab + total_children, num_fds, readyfds[1], wakefds[0]); /* Wait for everyone to be ready */ -- 2.34.1