LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Maxime Jourdan <mjourdan@baylibre.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v8 2/3] media: meson: add v4l2 m2m video decoder driver
Date: Thu, 6 Jun 2019 15:24:09 +0200	[thread overview]
Message-ID: <CAMO6naxtUA82inWZKhJ99zmcDiBZZXeDpgMYeOaqLH_cqso40Q@mail.gmail.com> (raw)
In-Reply-To: <a5676c4e-9c79-5ee4-fb3d-924602ef912e@xs4all.nl>

Hi Hans,
On Thu, Jun 6, 2019 at 2:32 PM Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> While preparing this series for merging I came across the following checkpatch
> and sparse warnings:
>
> checkpatch:
>
> CHECK: Alignment should match open parenthesis
> #159: FILE: drivers/staging/media/meson/vdec/codec_mpeg12.c:83:
> +       ret = amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, 0 },
> +                                       (u32[]){ 8, 0 });
>
> HV: I think this doesn't need changing, this is easier to read.
>
> CHECK: Alignment should match open parenthesis
> #968: FILE: drivers/staging/media/meson/vdec/vdec.c:185:
> +static int vdec_queue_setup(struct vb2_queue *q,
> +               unsigned int *num_buffers, unsigned int *num_planes,
>
> CHECK: Alignment should match open parenthesis
> #1755: FILE: drivers/staging/media/meson/vdec/vdec.c:972:
> +       core->regmap_ao = syscon_regmap_lookup_by_phandle(dev->of_node,
> +                                                        "amlogic,ao-sysctrl");
>
> CHECK: struct mutex definition without comment
> #1949: FILE: drivers/staging/media/meson/vdec/vdec.h:85:
> +       struct mutex lock;
>
> CHECK: struct mutex definition without comment
> #2085: FILE: drivers/staging/media/meson/vdec/vdec.h:221:
> +       struct mutex lock;
>
> CHECK: struct mutex definition without comment
> #2116: FILE: drivers/staging/media/meson/vdec/vdec.h:252:
> +       struct mutex bufs_recycle_lock;
>
> CHECK: spinlock_t definition without comment
> #2120: FILE: drivers/staging/media/meson/vdec/vdec.h:256:
> +       spinlock_t ts_spinlock;
>
> CHECK: Alignment should match open parenthesis
> #2247: FILE: drivers/staging/media/meson/vdec/vdec_1.c:108:
> +       amvdec_write_dos_bits(core, VLD_MEM_VIFIFO_CONTROL,
> +               (0x11 << MEM_FIFO_CNT_BIT) | MEM_FILL_ON_LEVEL |
>
> CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt
> #2313: FILE: drivers/staging/media/meson/vdec/vdec_1.c:174:
> +       udelay(10);
>
> CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt
> #2354: FILE: drivers/staging/media/meson/vdec/vdec_1.c:215:
> +       udelay(10);
>
> CHECK: Alignment should match open parenthesis
> #2413: FILE: drivers/staging/media/meson/vdec/vdec_ctrls.c:19:
> +       sess->ctrl_min_buf_capture = v4l2_ctrl_new_std(ctrl_handler, NULL,
> +                               V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 1);
>
>
> sparse:
>
> SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/codec_mpeg12.c
> /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/codec_mpeg12.c:201:25:  warning: symbol 'codec_mpeg12_ops' was not
> declared. Should it be static?
> SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c
> /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c:417:5:  warning: symbol 'vdec_vb2_buf_prepare' was not declared.
> Should it be static?
> SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c
> /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c:85:5:  warning: symbol 'vdec_1_stbuf_power_up' was not declared.
> Should it be static?
> /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c:85:5: warning: no previous prototype for 'vdec_1_stbuf_power_up'
> [-Wmissing-prototypes]
> /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c:417:5: warning: no previous prototype for 'vdec_vb2_buf_prepare'
> [-Wmissing-prototypes]
>
> Can you fix these issues?
>

Sure, preparing a V9. I'll add sparse to my list of tools to use
before sending a patch.

Maxime

>
> Regards,
>
>         Hans

  reply	other threads:[~2019-06-06 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 16:18 [PATCH v8 0/3] Add Amlogic " Maxime Jourdan
2019-06-05 16:18 ` [PATCH v8 1/3] dt-bindings: media: add Amlogic Video Decoder Bindings Maxime Jourdan
2019-06-05 16:18 ` [PATCH v8 2/3] media: meson: add v4l2 m2m video decoder driver Maxime Jourdan
2019-06-06 12:32   ` Hans Verkuil
2019-06-06 13:24     ` Maxime Jourdan [this message]
2019-06-05 16:18 ` [PATCH v8 3/3] MAINTAINERS: Add meson video decoder Maxime Jourdan

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=CAMO6naxtUA82inWZKhJ99zmcDiBZZXeDpgMYeOaqLH_cqso40Q@mail.gmail.com \
    --to=mjourdan@baylibre.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mchehab@kernel.org \
    --cc=narmstrong@baylibre.com \
    --subject='Re: [PATCH v8 2/3] media: meson: add v4l2 m2m video decoder driver' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).