All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Olli Salonen <olli.salonen@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [PATCH 3/5] sp2: improve debug logging
Date: Wed, 01 Oct 2014 22:57:59 +0300	[thread overview]
Message-ID: <542C5CC7.9050000@iki.fi> (raw)
In-Reply-To: <1411976660-19329-3-git-send-email-olli.salonen@iki.fi>

Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

On 09/29/2014 10:44 AM, Olli Salonen wrote:
> Improve debugging output.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>   drivers/media/dvb-frontends/sp2.c | 19 +++++++++++--------
>   1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/sp2.c b/drivers/media/dvb-frontends/sp2.c
> index 1f4f250..320cbe9 100644
> --- a/drivers/media/dvb-frontends/sp2.c
> +++ b/drivers/media/dvb-frontends/sp2.c
> @@ -92,6 +92,9 @@ static int sp2_write_i2c(struct sp2 *s, u8 reg, u8 *buf, int len)
>   			return -EIO;
>   	}
>
> +	dev_dbg(&s->client->dev, "addr=0x%04x, reg = 0x%02x, data = %*ph\n",
> +				client->addr, reg, len, buf);
> +
>   	return 0;
>   }
>
> @@ -103,9 +106,6 @@ static int sp2_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot, u8 acs,
>   	int mem, ret;
>   	int (*ci_op_cam)(void*, u8, int, u8, int*) = s->ci_control;
>
> -	dev_dbg(&s->client->dev, "slot=%d, acs=0x%02x, addr=0x%04x, data = 0x%02x",
> -			slot, acs, addr, data);
> -
>   	if (slot != 0)
>   		return -EINVAL;
>
> @@ -140,13 +140,16 @@ static int sp2_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot, u8 acs,
>   	if (ret)
>   		return ret;
>
> -	if (read) {
> -		dev_dbg(&s->client->dev, "cam read, addr=0x%04x, data = 0x%04x",
> -				addr, mem);
> +	dev_dbg(&s->client->dev, "%s: slot=%d, addr=0x%04x, %s, data=%x",
> +			(read) ? "read" : "write", slot, addr,
> +			(acs == SP2_CI_ATTR_ACS) ? "attr" : "io",
> +			(read) ? mem : data);
> +
> +	if (read)
>   		return mem;
> -	} else {
> +	else
>   		return 0;
> -	}
> +
>   }
>
>   int sp2_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
>

-- 
http://palosaari.fi/

  reply	other threads:[~2014-10-01 19:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29  7:44 [PATCH 1/5] cx23855: add support for DVBSky T980C (no CI support) Olli Salonen
2014-09-29  7:44 ` [PATCH 2/5] sp2: fix incorrect struct Olli Salonen
2014-10-01 19:57   ` Antti Palosaari
2014-09-29  7:44 ` [PATCH 3/5] sp2: improve debug logging Olli Salonen
2014-10-01 19:57   ` Antti Palosaari [this message]
2014-09-29  7:44 ` [PATCH 4/5] cx23885: add I2C client for CI into state and handle unregistering Olli Salonen
2014-10-01 20:02   ` Antti Palosaari
2014-09-29  7:44 ` [PATCH 5/5] cx23855: add CI support for DVBSky T980C Olli Salonen
2014-10-01 20:16   ` Antti Palosaari
2014-09-29 12:05 ` Nibble Max
2014-09-29 12:44   ` Olli Salonen
2014-10-01 19:56 ` [PATCH 1/5] cx23855: add support for DVBSky T980C (no CI support) Antti Palosaari

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=542C5CC7.9050000@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=olli.salonen@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.