Subject: Re: [PATCH] tipc: Remove redundant tsk->published flag

From: George Spelvin <[email-masked]>
Date: Sun, 19 Apr 2020 08:56:57 +0000

On Sat, Apr 18, 2020 at 03:32:11PM -0700, David Miller wrote:
> From: George Spelvin <[email-masked]>
> 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.