From: George Spelvin <lkml@SDF.ORG>
To: David Miller <davem@davemloft.net>
Cc: tung.q.nguyen@dektech.com.au, jmaloy@redhat.com,
ying.xue@windriver.com, netdev@vger.kernel.org, lkml@sdf.org
Subject: Re: [PATCH] tipc: Remove redundant tsk->published flag
Date: Sun, 19 Apr 2020 08:56:57 +0000 [thread overview]
Message-ID: <20200419085657.GA26904@SDF.ORG> (raw)
In-Reply-To: <20200418.153211.649575253431491187.davem@davemloft.net>
On Sat, Apr 18, 2020 at 03:32:11PM -0700, David Miller wrote:
> From: George Spelvin <lkml@sdf.org>
> Date: Thu, 16 Apr 2020 03:27:35 GMT
>
>> @@ -3847,7 +3839,7 @@ int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf)
>> size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
>> struct tipc_sock *tsk;
>> struct publication *p;
>> - bool tsk_connected;
>> + bool tsk_connected, tsk_published;
>>
>
> Please preserve the reverse christmas tree ordering of local variables
> here.
Happy to, but is that actually defined anywhere? "Preserve" implies that
it was present before the patch, and I can't infer a rule which is obeyed
by the pre-patch declarations:
int i = 0;
size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
struct tipc_sock *tsk;
struct publication *p;
bool tsk_connected;
One option is to sort by the full line length, including initialization:
size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
struct tipc_sock *tsk;
struct publication *p;
bool tsk_connected;
int i = 0;
The other is to sort by the *declaration* length:
struct tipc_sock *tsk;
struct publication *p;
bool tsk_connected;
size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
int i = 0;
Looking at the local variable declarations in the rest of the file isn't
producing any clarity.
Thank you.
next prev parent reply other threads:[~2020-04-19 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 3:27 [PATCH] tipc: Remove redundant tsk->published flag George Spelvin
2020-04-18 22:32 ` David Miller
2020-04-19 8:56 ` George Spelvin [this message]
2020-04-20 14:06 ` Jon Maloy
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=20200419085657.GA26904@SDF.ORG \
--to=lkml@sdf.org \
--cc=davem@davemloft.net \
--cc=jmaloy@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tung.q.nguyen@dektech.com.au \
--cc=ying.xue@windriver.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).