Linux kernel staging patches
 help / color / mirror / Atom feed
From: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
To: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Shevchenko <andy@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Prajval Chaudhary <prajvalchaudhari733@gmail.com>
Subject: [PATCH 2/2] staging: media: atomisp: Mark pad_w and pad_h as const constants
Date: Sun, 19 Jul 2026 19:33:50 +0530	[thread overview]
Message-ID: <20260719140350.8266-3-prajvalchaudhari733@gmail.com> (raw)
In-Reply-To: <20260719140350.8266-1-prajvalchaudhari733@gmail.com>

Now that the user-facing module parameters for pad_w and pad_h
have been removed, these variables are strictly internal driver
configurations. Mark them as const to prevent accidental runtime
modification and allow compiler optimization.

This completes the internal cleanup follow-up resulting from
addressing the driver's module parameter TODO item.

Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp_common.h | 6 ++----
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c   | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_common.h b/drivers/staging/media/atomisp/pci/atomisp_common.h
index a2462fc306fb..aa230c3708dd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_common.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_common.h
@@ -20,10 +20,8 @@
 
 #include "ia_css.h"
 
-extern int dbg_level;
-extern int dbg_func;
-extern int pad_w;
-extern int pad_h;
+extern const int pad_w;
+extern const int pad_h;
 
 /* Minimum padding requirements for ISP2400 (BYT) */
 #define ISP2400_MIN_PAD_W		12
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 5c2f5996a03f..5ca7e79fd1e5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -53,9 +53,9 @@
  * output res, and isp output res. however since we do not have this yet,
  * the chosen solution is the next best thing.
  */
-int pad_w = 16;
+const int pad_w = 16;
 
-int pad_h = 16;
+const int pad_h = 16;
 
 /*
  * FIXME: this is a hack to make easier to support ISP2401 variant.
-- 
2.34.1


  parent reply	other threads:[~2026-07-19 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 14:03 [PATCH 0/2] staging: media: atomisp: Clean up unnecessary module parameters Prajval Chaudhary
2026-07-19 14:03 ` [PATCH 1/2] staging: media: atomisp: Remove unused and unwanted debug " Prajval Chaudhary
2026-07-19 17:05   ` Andy Shevchenko
2026-07-20 10:38   ` Dan Carpenter
2026-07-20 10:59     ` Andy Shevchenko
2026-07-19 14:03 ` Prajval Chaudhary [this message]
2026-07-19 17:02 ` [PATCH 0/2] staging: media: atomisp: Clean up unnecessary " Andy Shevchenko

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=20260719140350.8266-3-prajvalchaudhari733@gmail.com \
    --to=prajvalchaudhari733@gmail.com \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.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 \
    /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