All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: hans.verkuil@cisco.com,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	kernel@stlinux.com, Arnd Bergmann <arnd@arndb.de>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v2 2/4] add stih-cec driver
Date: Wed, 14 Sep 2016 15:17:31 +0200	[thread overview]
Message-ID: <CA+M3ks6AO0VzQQfSstpQj1phhZcq5JOFLZxJEFCOKKEOzWuBoQ@mail.gmail.com> (raw)
In-Reply-To: <16e7882f-2975-281a-eb6e-f27c3ca76fa2@xs4all.nl>

Fixed and tested, thanks.

I will wait for any others comments before send a v3.

Regards,
Benjamin

2016-09-14 14:58 GMT+02:00 Hans Verkuil <hverkuil@xs4all.nl>:
> Hi Benjamin,
>
> Just one comment:
>
> On 09/14/2016 01:24 PM, Benjamin Gaignard wrote:
>> This patch implement CEC driver for stih4xx platform.
>> Driver compliance has been test with cec-ctl and
>> cec-compliance tools.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
>> ---
>>  drivers/staging/media/Kconfig           |   2 +
>>  drivers/staging/media/Makefile          |   1 +
>>  drivers/staging/media/st-cec/Kconfig    |   8 +
>>  drivers/staging/media/st-cec/Makefile   |   1 +
>>  drivers/staging/media/st-cec/stih-cec.c | 382 ++++++++++++++++++++++++++++++++
>>  5 files changed, 394 insertions(+)
>>  create mode 100644 drivers/staging/media/st-cec/Kconfig
>>  create mode 100644 drivers/staging/media/st-cec/Makefile
>>  create mode 100644 drivers/staging/media/st-cec/stih-cec.c
>>
>
> <snip>
>
>> +static void stih_rx_done(struct stih_cec *cec, u32 status)
>> +{
>> +     struct cec_msg *msg = &cec->rx_msg;
>
> You can just say:
>
>         struct cec_msg msg = {};
>
> and drop rx_msg.
>
>> +     u8 i;
>> +
>> +     if (status & CEC_RX_ERROR_MIN)
>> +             return;
>> +
>> +     if (status & CEC_RX_ERROR_MAX)
>> +             return;
>> +
>> +     memset(msg, 0x00, sizeof(*msg));
>> +     msg->len = readl(cec->regs + CEC_DATA_ARRAY_STATUS) & 0x1f;
>> +
>> +     if (!msg-len)
>> +             return;
>> +
>> +     if (msg->len > 16)
>> +             msg->len = 16;
>> +
>> +     for (i = 0; i < msg->len; i++)
>> +             msg->msg[i] = readl(cec->regs + CEC_RX_DATA_BASE + i);
>> +
>> +     cec_received_msg(cec->adap, msg);
>
> cec_received_msg will copy the contents, so it is OK if it is gone after
> this call.
>
>> +}
>
> Regards,
>
>         Hans



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2016-09-14 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 11:24 [PATCH v2 0/4] STIH CEC driver Benjamin Gaignard
2016-09-14 11:24 ` [PATCH v2 1/4] bindings for stih-cec driver Benjamin Gaignard
2016-09-14 11:24 ` [PATCH v2 2/4] add " Benjamin Gaignard
2016-09-14 12:58   ` Hans Verkuil
2016-09-14 13:17     ` Benjamin Gaignard [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=CA+M3ks6AO0VzQQfSstpQj1phhZcq5JOFLZxJEFCOKKEOzWuBoQ@mail.gmail.com \
    --to=benjamin.gaignard@linaro.org \
    --cc=arnd@arndb.de \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@stlinux.com \
    --cc=linux-media@vger.kernel.org \
    --cc=robh@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 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.