Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp706213pxj; Fri, 28 May 2021 13:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu3QudJ7tcWgN2+TD+eFjywEjObbO6Lari0uNYNEwMrvRcnCweAx5W2MYpjvvYvPFF3WPL X-Received: by 2002:a6b:7b08:: with SMTP id l8mr8194209iop.50.1622234320484; Fri, 28 May 2021 13:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622234320; cv=none; d=google.com; s=arc-20160816; b=ZMoQsYMrZzF/+bnvrJv+o0sqwCRNvJxyTXytHyod51KUbHQ5kIDaxg9KcIr+OmqM3a c4FxV2y0vf/RfbUnaCZjNeRoWd9INQZTBh9saBBRMBDTiKxpDbJ1IyiHCQJr7sPq+U0n 5vfamDNb/gg+4NSNqxlx7x1DcpCvVl6lf6J2QvNbeb1DA3zKzSiu5Mf9aKKchsnWw6ss E8BNr9C/W2WuffAWhIDKPcz7vnd9O6OuYX9SbMe0jbykOIuuSurKrcGnltwmQtziWCnD bqgcPnfemjHtqF0W0iimjfu2ZwLHGDQ0LTFN4EY6C0Of8h5utFIKhUF0lT58bcawJgqb Ua7Q== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=b57glHfs/VujPKgiIntG2uc0YfkZvDSnGp8ktS9hi8E=; b=HqkrrM3+I6TWrh/ldyY+7ewvkF2g5BjrKyhKeB15Z62VEAhKpz8SCL+JftKiJm3YWu NMgByBO9LFvOt5QEORKNk6Uru4nVxUaB7wmu8d8Kx2rea0r+NX3F1XT4BuvCQV9hKrn4 gDKNkFVcFVuDRG78CHqGKM5A2lGssExfy8yAuUxe4U8ARZWNUdrFSz9gvTMH5je/5O2G VH+9BZKsyr+yJY13gwMpPhBjqIrbrSTqWOtHtZFBL08ne17m73aQ5Fffb8db8c6hCcOl 81ZwLPRdBZAT8qw9qxcghPzcB+Qf3rnbvNbF7YYvtGgFcjwR2KCKcoXGcF2AUSA5gHqO qQYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si6042409jad.124.2021.05.28.13.38.25; Fri, 28 May 2021 13:38:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbhE1UjZ (ORCPT + 99 others); Fri, 28 May 2021 16:39:25 -0400 Received: from smtprelay0034.hostedemail.com ([216.40.44.34]:34182 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229482AbhE1UjY (ORCPT ); Fri, 28 May 2021 16:39:24 -0400 Received: from omf06.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 6C38E8778; Fri, 28 May 2021 20:37:47 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA id F410D2448B8; Fri, 28 May 2021 20:37:45 +0000 (UTC) Message-ID: <0a78bd39b9ef40114bc7527709a533143415f0aa.camel@perches.com> Subject: Re: [PATCH 6/6] pgo: Fixup code style issues. From: Joe Perches To: Jarmo Tiitto , samitolvanen@google.com Cc: wcw@google.com, nathan@kernel.org, ndesaulniers@google.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Date: Fri, 28 May 2021 13:37:44 -0700 In-Reply-To: <20210528201213.459483-1-jarmo.tiitto@gmail.com> References: <20210528201213.459483-1-jarmo.tiitto@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.39 X-Stat-Signature: 6wbnunbh3ar94pm7g95koecf5msryydf X-Rspamd-Server: rspamout02 X-Rspamd-Queue-Id: F410D2448B8 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18rjO0VftHNOo2CzdbAdYacbJQbxOtJvIs= X-HE-Tag: 1622234265-802280 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-05-28 at 23:12 +0300, Jarmo Tiitto wrote: > Signed-off-by: Jarmo Tiitto This should have some commit description like: Do not initialize statics and use tab indentation. Some would suggest this should be 2 separate patches. > diff --git a/kernel/pgo/instrument.c b/kernel/pgo/instrument.c [] > + if (start <= p && p < end) { Generally clearer / more commonly written using [] if (p >= start && p < end) > + /* vmlinux core node */ > + if (&vnds[current_node + 1] >= vnds_end) > + return NULL; /* Out of nodes */ > + > + current_node++; > + > + /* Make sure the node is entirely within the section > + */ > + if (&vnds[current_node] >= vnds_end || > + &vnds[current_node + 1] > vnds_end) > + return NULL; > + > + return &vnds[current_node]; > + > + } else { I suggest getting ride of the else and unindenting the block below too in yet another separate patch so the function fits in 80 columns. > + /* maybe an module node > + * find in what module section p points into and > + * then allocate from that module > + */ ...