From: Yordan Karadzhov <y.karadz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Sameeruddin shaik <sameeruddin.shaik8@gmail.com>
Subject: Re: [PATCH] trace-cmd: Add CODING_STYLE and CONTRIBUTE documents
Date: Tue, 6 Apr 2021 11:18:07 +0300 [thread overview]
Message-ID: <7ef527d0-b17e-6292-d8f5-dc730a1751aa@gmail.com> (raw)
In-Reply-To: <20210405151959.1d6901b2@gandalf.local.home>
Hi Steven,
On 5.04.21 г. 22:19, Steven Rostedt wrote:
> Unless variables are tightly related, it is expected that each variable be on
> +its own line and not grouped by type. That is,
> +
> + int r, cpus = 0;
> +
> +is to be discouraged, as the two variables are not related to each other.
> +But if you had a bunch of counters:
> +
> + int i, j, k;
> +
> +That would be fine, as the variables are all related as they are all for the
> +same purpose (arbitrary counters). The same may go with pointers;
> +
> +
> + char *begin, *end;
> +
Maybe we should include an explanation what to do in cases like this:
struct instance_wrapper *iw, **iw_ptr;
Let's say, the two are closely related in the code of the function,
however technically speaking the types are different. Is it OK to have
both on the same line?
Thanks!
Yordan
next prev parent reply other threads:[~2021-04-06 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 19:19 [PATCH] trace-cmd: Add CODING_STYLE and CONTRIBUTE documents Steven Rostedt
2021-04-06 8:18 ` Yordan Karadzhov [this message]
2021-04-06 12:39 ` Steven Rostedt
2021-04-06 9:37 ` Tzvetomir Stoyanov
2021-04-06 12:47 ` Steven Rostedt
2021-04-07 0:58 ` sameeruddin shaik
2021-04-06 12:36 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ef527d0-b17e-6292-d8f5-dc730a1751aa@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sameeruddin.shaik8@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).