public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hedberg Johan (Nokia-D/Helsinki)" <johan.hedberg@gmail.com>
To: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] Code consitency for signal strength in HFP maemo6
Date: Mon, 12 Jul 2010 14:36:44 -0300	[thread overview]
Message-ID: <20100712173644.GB18755@jh-x301> (raw)
In-Reply-To: <1278954361-3876-1-git-send-email-dmitriy.paliy@nokia.com>

Hi Dmitriy,

On Mon, Jul 12, 2010, Dmitriy Paliy wrote:
> This patch simplifies and makes maemo6 telephony driver code consistent
> with libscnet API regarding SignalBarsChanged. RSSI percents and RSSI
> dBs are not among the parameters when SignalBarsChanged emited.
> Therefore, these parameters are removed. Names are changed to reflect
> libscnet d-bus interface notations. Comments and debug information are
> updated in places where units or operations are unclear.
> ---
>  audio/telephony-maemo6.c |   46 +++++++++++++++++++++++-----------------------
>  1 files changed, 23 insertions(+), 23 deletions(-)

This patch has also been pushed upstream, but I had to make the
following manual fixes before that:

> +	 /* Init as 0 meaning inactive mode. In modem power off state */
> +	 /* can be be -1, but we treat all values as 0s regardless */ 
> +	 /* inactive or power off. */

All three lines have tabs and spaces for intentation (one tab + one
space) and the second line has an extra space at the end before the
newline character.

> +static void update_signal_strength(int32_t signal_strength_bars)

The variable name is unnecessarlily long. Simply signal_bars is better
imho.

> +	if (signal_strength_bars < 0) {
> +		DBG("signal strength smaller than expected: %d<0", signal_strength_bars);
> +		signal_strength_bars = 0;
> +	} else if (signal_strength_bars > 5) {
> +		DBG("signal strength greater than expected: %d>5", signal_strength_bars);
> +		signal_strength_bars = 5;

You're going beyond the 80 character limit here and the extra long
variable name isn't really helping out with that.

> +	telephony_update_indicator(maemo_indicators, "signal", signal_strength_bars);

Same here.

Normally I'd have asked you to fix these things, but since we're trying
to get a new release out I went ahead and did it myself. So in the
future please pay attention to this kind of issues :)

Johan

      reply	other threads:[~2010-07-12 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 17:06 [PATCH 2/2] Code consitency for signal strength in HFP maemo6 Dmitriy Paliy
2010-07-12 17:36 ` Hedberg Johan (Nokia-D/Helsinki) [this message]

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=20100712173644.GB18755@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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