All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Yong Zhi <yong.zhi@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Bingbu Cao <bingbu.cao@intel.com>,
	Tianshu Qiu <tian.shu.qiu@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"mailing list: linux-media" <linux-media@vger.kernel.org>,
	"linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: media: staging/intel-ipu3: css - possible typo in array being assigned
Date: Fri, 8 Aug 2025 11:06:03 +0100	[thread overview]
Message-ID: <9b3313da-9cc3-4d3e-b271-05ee36736e4f@gmail.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 2015 bytes --]

Hi,

I believe there maybe a typo in the name of an array being assigned, 
introduced in commit:

commit e11110a5b74487cfc99dad8a5744fe26782f5d9c
Author: Yong Zhi <yong.zhi@intel.com>
Date:   Thu Dec 6 20:03:33 2018 -0500

     media: staging/intel-ipu3: css: Compute and program ccs


The issue is as follows in function imgu_css_acc_process_lines in 
drivers/staging/media/ipu3/ipu3-css-params.c

                         if (pl_idx == 0)
                                 /* First process line */
                                 p_pl[pl_idx].lines = first_process_lines;
                         else if (pl_idx == num_of_sets - 1)
                                 /* Last in grid */
                                 p_pl[pl_idx].lines = 
last_process_lines_in_grid;
                         else if (pl_idx == num_of_process_lines - 1)
                                 /* After the grid */
                                 p_pl[pl_idx].lines = 
process_lines_after_grid;
                         else
                                 /* Inside the grid */
                                 p_pl[pl_idx].lines = process_lines;

                         if (p_tr) {
                                 p_pl[pl_idx].cfg_set = pl_cfg_set;
                                 pl_cfg_set = 1 - pl_cfg_set;
                         }
                         pl_idx++;


The non-null check 'if (p_tr)' seem suspect, should it be 'if (p_pl)' 
instead since p_pl is being assigned (this maybe a cut-n-paste issue 
from a previous hunk of code that does:

                         op_idx++;
                         if (p_tr) {
                                 p_tr[tr_idx].set_number = tr_set_num;
                                 tr_set_num = 1 - tr_set_num;
                         }
                         tr_idx++;

Also, if it is meant to be a check on p_pl then surely the assignments 
to p_pl[] also need a non-null check in the cascaded if/else checks too.

Colin

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 4901 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

             reply	other threads:[~2025-08-08 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 10:06 Colin King (gmail) [this message]
2025-08-08 14:17 ` media: staging/intel-ipu3: css - possible typo in array being assigned Dan Carpenter

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=9b3313da-9cc3-4d3e-b271-05ee36736e4f@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=bingbu.cao@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=yong.zhi@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 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.