mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com,
	geert@glider.be, mchehab@kernel.org, festevam@gmail.com,
	sakari.ailus@iki.fi, robh+dt@kernel.org, mark.rutland@arm.com,
	pombredanne@nexb.com
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
	linux-sh@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 03/10] media: platform: Add Renesas CEU driver
Date: Thu, 22 Feb 2018 11:05:01 +0100	[thread overview]
Message-ID: <bb33d217-76a8-71a6-e7fd-6d449d662784@xs4all.nl> (raw)
In-Reply-To: <1519235284-32286-4-git-send-email-jacopo+renesas@jmondi.org>

On 02/21/18 18:47, Jacopo Mondi wrote:
> Add driver for Renesas Capture Engine Unit (CEU).
> 
> The CEU interface supports capturing 'data' (YUV422) and 'images'
> (NV[12|21|16|61]).
> 
> This driver aims to replace the soc_camera-based sh_mobile_ceu one.
> 
> Tested with ov7670 camera sensor, providing YUYV_2X8 data on Renesas RZ
> platform GR-Peach.
> 
> Tested with ov7725 camera sensor on SH4 platform Migo-R.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I get these warnings when I try to compile this driver:


  CC [M]  drivers/media/platform/renesas-ceu.o
drivers/media/platform/renesas-ceu.c: In function ‘ceu_start_streaming’:
drivers/media/platform/renesas-ceu.c:290:2: warning: ‘cdwdr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  iowrite32(data, priv->base + reg_offs);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/renesas-ceu.c:338:27: note: ‘cdwdr’ was declared here
  u32 camcr, cdocr, cfzsr, cdwdr, capwr;
                           ^~~~~
drivers/media/platform/renesas-ceu.c:290:2: warning: ‘cfzsr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  iowrite32(data, priv->base + reg_offs);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/renesas-ceu.c:338:20: note: ‘cfzsr’ was declared here
  u32 camcr, cdocr, cfzsr, cdwdr, capwr;
                    ^~~~~
drivers/media/platform/renesas-ceu.c:418:8: warning: ‘camcr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  camcr |= mbus_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW ? 1 << 0 : 0;
  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/renesas-ceu.c:338:6: note: ‘camcr’ was declared here
  u32 camcr, cdocr, cfzsr, cdwdr, capwr;
      ^~~~~
drivers/media/platform/renesas-ceu.c: In function ‘ceu_probe’:
drivers/media/platform/renesas-ceu.c:1632:9: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return ret;
         ^~~
cc1: some warnings being treated as errors

The last warning is indeed correct.

The others are only right if pixelformat is illegal, which can't happen.
I'd add a:

	default:
		return -EINVAL;

to the switch, this shuts up the warnings.

So I need a v11 (just for this patch) after all.

Regards,

	Hans

  reply	other threads:[~2018-02-22 10:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 17:47 [PATCH v10 00/10] Renesas Capture Engine Unit (CEU) V4L2 driver Jacopo Mondi
2018-02-21 17:47 ` [PATCH v10 01/10] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi
2018-02-21 17:47 ` [PATCH v10 02/10] include: media: Add Renesas CEU driver interface Jacopo Mondi
2018-02-21 17:47 ` [PATCH v10 03/10] media: platform: Add Renesas CEU driver Jacopo Mondi
2018-02-22 10:05   ` Hans Verkuil [this message]
2018-02-21 17:47 ` [PATCH v10 04/10] ARM: dts: r7s72100: Add Capture Engine Unit (CEU) Jacopo Mondi
2018-02-21 18:29   ` Simon Horman
2018-04-23 15:21     ` jacopo mondi
2018-04-24  8:23       ` Simon Horman
2018-04-24  8:31         ` jacopo mondi
2018-02-21 17:47 ` [PATCH v10 05/10] media: i2c: Copy ov772x soc_camera sensor driver Jacopo Mondi
2018-02-21 17:48 ` [PATCH v10 06/10] media: i2c: ov772x: Remove soc_camera dependencies Jacopo Mondi
2018-02-21 17:48 ` [PATCH v10 07/10] media: i2c: ov772x: Support frame interval handling Jacopo Mondi
2018-02-21 17:48 ` [PATCH v10 08/10] media: i2c: Copy tw9910 soc_camera sensor driver Jacopo Mondi
2018-02-21 17:48 ` [PATCH v10 09/10] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi
2018-02-21 17:48 ` [PATCH v10 10/10] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi

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=bb33d217-76a8-71a6-e7fd-6d449d662784@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=geert@glider.be \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=pombredanne@nexb.com \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®