public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: bingbu.cao@intel.com
Cc: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com,
	laurent.pinchart@ideasonboard.com, phasta@mailbox.org,
	helgaas@kernel.org, jerry.w.hu@intel.com, hao.yao@intel.com,
	tian.shu.qiu@intel.com, bingbu.cao@linux.intel.com
Subject: Re: [PATCH 6/8] media: staging/ipu7: add IPU7 input system device driver
Date: Tue, 29 Apr 2025 09:53:39 +0200	[thread overview]
Message-ID: <aBCFg37INjUMwL/U@linux.intel.com> (raw)
In-Reply-To: <20250429032841.115107-7-bingbu.cao@intel.com>

Hi

On Tue, Apr 29, 2025 at 11:28:39AM +0800, bingbu.cao@intel.com wrote:
> +unsigned int ipu7_isys_mbus_code_to_bpp(u32 code)
> +{
> +	switch (code) {
> +	case MEDIA_BUS_FMT_RGB888_1X24:
> +		return 24;
> +	case MEDIA_BUS_FMT_YUYV10_1X20:
> +		return 20;
> +	case MEDIA_BUS_FMT_Y10_1X10:
> +	case MEDIA_BUS_FMT_RGB565_1X16:
> +	case MEDIA_BUS_FMT_UYVY8_1X16:
> +	case MEDIA_BUS_FMT_YUYV8_1X16:
> +		return 16;
> +	case MEDIA_BUS_FMT_SBGGR12_1X12:
> +	case MEDIA_BUS_FMT_SGBRG12_1X12:
> +	case MEDIA_BUS_FMT_SGRBG12_1X12:
> +	case MEDIA_BUS_FMT_SRGGB12_1X12:
> +		return 12;
> +	case MEDIA_BUS_FMT_SBGGR10_1X10:
> +	case MEDIA_BUS_FMT_SGBRG10_1X10:
> +	case MEDIA_BUS_FMT_SGRBG10_1X10:
> +	case MEDIA_BUS_FMT_SRGGB10_1X10:
> +		return 10;
> +	case MEDIA_BUS_FMT_SBGGR8_1X8:
> +	case MEDIA_BUS_FMT_SGBRG8_1X8:
> +	case MEDIA_BUS_FMT_SGRBG8_1X8:
> +	case MEDIA_BUS_FMT_SRGGB8_1X8:
> +		return 8;
> +	default:
> +		WARN_ON(1);
> +		return -EINVAL;
> +	}
> +}

We return negative error but return type is unsigned. 
Also we do not check for error on ipu7_isys_setup_video()
when calling this function.

Regards
Stanislaw



  reply	other threads:[~2025-04-29  7:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  3:28 [PATCH 0/8] Intel IPU7 PCI and input system device drivers bingbu.cao
2025-04-29  3:28 ` [PATCH 1/8] media: Rename the IPU PCI device table header and add IPU7 PCI IDs bingbu.cao
2025-04-29  7:57   ` Stanislaw Gruszka
2025-04-29  3:28 ` [PATCH 2/8] media: staging/ipu7: add Intel IPU7 PCI device driver bingbu.cao
2025-04-29  9:46   ` Stanislaw Gruszka
2025-04-29  3:28 ` [PATCH 3/8] media: staging/ipu7: add IPU7 DMA APIs and MMU mapping bingbu.cao
2025-04-29  3:28 ` [PATCH 4/8] media: staging/ipu7: add firmware parse, syscom interface and boot bingbu.cao
2025-04-29  3:28 ` [PATCH 5/8] media: staging/ipu7: add IPU7 firmware ABI headers bingbu.cao
2025-04-29  6:39   ` Sakari Ailus
2025-04-29  3:28 ` [PATCH 6/8] media: staging/ipu7: add IPU7 input system device driver bingbu.cao
2025-04-29  7:53   ` Stanislaw Gruszka [this message]
2025-04-29  8:24   ` Sakari Ailus
2025-05-26  6:52     ` Bingbu Cao
2025-05-26  7:56       ` Sakari Ailus
2025-04-29  3:28 ` [PATCH 7/8] media: staging/ipu7: add Makefile and Kconfig for IPU7 bingbu.cao
2025-04-29  3:28 ` [PATCH 8/8] MAINTAINERS: add maintainers for Intel IPU7 input system driver bingbu.cao

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=aBCFg37INjUMwL/U@linux.intel.com \
    --to=stanislaw.gruszka@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=bingbu.cao@linux.intel.com \
    --cc=hao.yao@intel.com \
    --cc=helgaas@kernel.org \
    --cc=jerry.w.hu@intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=phasta@mailbox.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    /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