public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Joe Perches <joe@perches.com>
Cc: Simon Wunderlich <sw@simonwunderlich.de>,
	davem@davemloft.net, netdev@vger.kernel.org,
	b.a.t.m.a.n@lists.open-mesh.org,
	Antonio Quartulli <a@unstable.cc>
Subject: Re: [PATCH 17/17] batman-adv: Avoid precedence issues in macros
Date: Fri, 28 Oct 2016 23:27:31 +0200	[thread overview]
Message-ID: <4261316.fWqmHPy2zE@sven-edge> (raw)
In-Reply-To: <1477689186.23018.1.camel@perches.com>

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

On Freitag, 28. Oktober 2016 14:13:06 CEST Joe Perches wrote:
> On Thu, 2016-10-27 at 21:01 +0200, Simon Wunderlich wrote:
> > From: Sven Eckelmann <sven@narfation.org>
> > 
> > It must be avoided that arguments to a macro are evaluated ungrouped (which
> > enforces normal operator precendence). Otherwise the result of the macro
> > is not well defined.
> 
> Curiosity:
> 
> in net/batman-adv/tp_meter.c
[...]
> 	orig_node = batadv_orig_hash_find(bat_priv, tp_vars->other_end);
> 	if (unlikely(!orig_node)) {
> 		err = BATADV_TP_REASON_DST_UNREACHABLE;
> 		tp_vars->reason = err;
> 		goto out;
> 	}
> 
> 	primary_if = batadv_primary_if_get_selected(bat_priv);
> 	if (unlikely(!primary_if)) {
> 		err = BATADV_TP_REASON_DST_UNREACHABLE;
> 		goto out;
> 	}
> 
> err is not used in the out block
> 
> Is the last if block supposed to set tp_vars->reason to err?

This seems to be unrelated to this patch.

But yes, looks to me like it is missing. Do you want to propose a patch or
should I do? Just make sure you Cc Antonio Quartulli <a@unstable.cc> (and of
course b.a.t.m.a.n@lists.open-mesh.org). He is the original author of
33a3bb4a3345 ("batman-adv: throughput meter implementation").

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2016-10-28 21:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 19:01 [PATCH 00/17] pull request for net-next: batman-adv 2016-10-27 Simon Wunderlich
     [not found] ` <20161027190150.7880-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
2016-10-27 19:01   ` [PATCH 01/17] batman-adv: Start new development cycle Simon Wunderlich
2016-10-27 19:01   ` [PATCH 02/17] batman-adv: Add B.A.T.M.A.N. V sysfs files to README Simon Wunderlich
2016-10-27 19:01   ` [PATCH 03/17] batman-adv: Add network_coding and mcast " Simon Wunderlich
2016-10-29 10:33     ` Jiri Pirko
2016-10-29 10:37       ` Sven Eckelmann
2016-10-29 10:56         ` Jiri Pirko
     [not found]           ` <20161029105628.GE1692-6KJVSR23iU488b5SBfVpbw@public.gmane.org>
2016-10-29 11:46             ` Sven Eckelmann
2016-10-29 13:51               ` Jiri Pirko
2018-03-27 15:43           ` [B.A.T.M.A.N.] " Linus Lüssing
2018-05-07  6:34             ` Sven Eckelmann
2018-05-20  4:37               ` Sven Eckelmann
2018-05-20  6:19             ` Jiri Pirko
2018-08-04  9:24               ` [B.A.T.M.A.N.] " Antonio Quartulli
     [not found]                 ` <113e9222-3310-71c6-7cec-c253b9b5d194-2CpIooy/SPIKlTDg6p0iyA@public.gmane.org>
2018-08-04  9:36                   ` Jiri Pirko
2018-08-04 11:19                     ` [B.A.T.M.A.N.] " Antonio Quartulli
     [not found]                       ` <f2964fca-072e-2a6c-4ce9-aa7963465195-2CpIooy/SPIKlTDg6p0iyA@public.gmane.org>
2018-08-04 11:52                         ` Jiri Pirko
2016-10-27 19:01   ` [PATCH 06/17] batman-adv: Remove unused function batadv_hash_delete Simon Wunderlich
2016-10-29 20:28   ` [PATCH 00/17] pull request for net-next: batman-adv 2016-10-27 David Miller
2016-10-27 19:01 ` [PATCH 04/17] batman-adv: Add dat, mcast, nc and neighbor debugfs files to README Simon Wunderlich
2016-10-27 19:01 ` [PATCH 05/17] batman-adv: Document new nc, mcast and tpmeter log levels Simon Wunderlich
2016-10-27 19:01 ` [PATCH 07/17] batman-adv: Move batadv_sum_counter to soft-interface.c Simon Wunderlich
2016-10-27 19:01 ` [PATCH 08/17] batman-adv: Remove unused batadv_icmp_user_cmd_type Simon Wunderlich
2016-10-27 19:01 ` [PATCH 09/17] batman-adv: fix batadv_forw_packet kerneldoc for list attribute Simon Wunderlich
2016-10-27 19:01 ` [PATCH 10/17] batman-adv: remove unsed argument from batadv_dbg_arp() function Simon Wunderlich
2016-10-27 19:01 ` [PATCH 11/17] batman-adv: Allow selecting BATMAN V if CFG80211 is not built Simon Wunderlich
2016-10-27 19:01 ` [PATCH 12/17] batman-adv: Less function calls in batadv_is_ap_isolated() after error detection Simon Wunderlich
2016-10-27 19:01 ` [PATCH 13/17] batman-adv: Remove needless init of variables on stack Simon Wunderlich
2016-10-27 19:01 ` [PATCH 14/17] batman-adv: Use proper name for fragments list head Simon Wunderlich
2016-10-27 19:01 ` [PATCH 15/17] batman-adv: Use proper name for gateway " Simon Wunderlich
2016-10-27 19:01 ` [PATCH 16/17] batman-adv: Use octal permissions instead of macros Simon Wunderlich
2016-10-27 19:01 ` [PATCH 17/17] batman-adv: Avoid precedence issues in macros Simon Wunderlich
2016-10-28 21:13   ` Joe Perches
2016-10-28 21:27     ` Sven Eckelmann [this message]
2016-10-29  1:56       ` Joe Perches
     [not found]         ` <1477706184.23018.3.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2016-10-29  6:52           ` Sven Eckelmann

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=4261316.fWqmHPy2zE@sven-edge \
    --to=sven@narfation.org \
    --cc=a@unstable.cc \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=sw@simonwunderlich.de \
    /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