* [PATCH 1/2] staging: media: atomisp: Remove unused and unwanted debug module parameters
2026-07-19 14:03 [PATCH 0/2] staging: media: atomisp: Clean up unnecessary module parameters Prajval Chaudhary
@ 2026-07-19 14:03 ` Prajval Chaudhary
2026-07-19 17:05 ` Andy Shevchenko
2026-07-20 10:38 ` Dan Carpenter
2026-07-19 14:03 ` [PATCH 2/2] staging: media: atomisp: Mark pad_w and pad_h as const constants Prajval Chaudhary
2026-07-19 17:02 ` [PATCH 0/2] staging: media: atomisp: Clean up unnecessary module parameters Andy Shevchenko
2 siblings, 2 replies; 7+ messages in thread
From: Prajval Chaudhary @ 2026-07-19 14:03 UTC (permalink / raw)
To: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman
Cc: Andy Shevchenko, Sakari Ailus, linux-media, linux-staging,
linux-kernel, Prajval Chaudhary
Remove the unused module parameters 'dbg_level' and 'dbg_func'.
Additionally, remove the 'pad_w' and 'pad_h' module parameters
to prevent userspace from overriding internal ISP hardware padding
boundaries, leaving them as internal driver constants.
This addresses the 'Remove unnecessary/unwanted module parameters'
task in the driver's TODO file.
Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 812230397409..5c2f5996a03f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -44,17 +44,6 @@
/* G-Min addition: pull this in from intel_mid_pm.h */
#define CSTATE_EXIT_LATENCY_C1 1
-/* cross component debug message flag */
-int dbg_level;
-module_param(dbg_level, int, 0644);
-MODULE_PARM_DESC(dbg_level, "debug message level (default:0)");
-
-/* log function switch */
-int dbg_func = 1;
-module_param(dbg_func, int, 0644);
-MODULE_PARM_DESC(dbg_func,
- "log function switch non/printk (default:printk)");
-
/*
* Set to 16x16 since this is the amount of lines and pixels the sensor
* exports extra. If these are kept at the 10x8 that they were on, in yuv
@@ -65,12 +54,8 @@ MODULE_PARM_DESC(dbg_func,
* the chosen solution is the next best thing.
*/
int pad_w = 16;
-module_param(pad_w, int, 0644);
-MODULE_PARM_DESC(pad_w, "extra data for ISP processing");
int pad_h = 16;
-module_param(pad_h, int, 0644);
-MODULE_PARM_DESC(pad_h, "extra data for ISP processing");
/*
* FIXME: this is a hack to make easier to support ISP2401 variant.
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] staging: media: atomisp: Remove unused and unwanted debug module parameters
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
1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-07-19 17:05 UTC (permalink / raw)
To: Prajval Chaudhary
Cc: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Andy Shevchenko, Sakari Ailus, linux-media, linux-staging,
linux-kernel
On Sun, Jul 19, 2026 at 5:09 PM Prajval Chaudhary
<prajvalchaudhari733@gmail.com> wrote:
>
> Remove the unused module parameters 'dbg_level' and 'dbg_func'.
> Additionally, remove the 'pad_w' and 'pad_h' module parameters
> to prevent userspace from overriding internal ISP hardware padding
> boundaries, leaving them as internal driver constants.
>
> This addresses the 'Remove unnecessary/unwanted module parameters'
> task in the driver's TODO file.
So, this patch does the blind removal of the debug parameters. This
driver is in the staging and it is for a reason. Taking this into
account the debug facilities are very useful to have. If you really
would like to help in this area, research how to convert the current
debug facilities to use so-called "trace events" and "trace points".
This is how it should have been done in the Linux kernel.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] staging: media: atomisp: Remove unused and unwanted debug module parameters
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
1 sibling, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2026-07-20 10:38 UTC (permalink / raw)
To: Prajval Chaudhary
Cc: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Andy Shevchenko, Sakari Ailus, linux-media, linux-staging,
linux-kernel
On Sun, Jul 19, 2026 at 07:33:49PM +0530, Prajval Chaudhary wrote:
> Remove the unused module parameters 'dbg_level' and 'dbg_func'.
> Additionally, remove the 'pad_w' and 'pad_h' module parameters
> to prevent userspace from overriding internal ISP hardware padding
> boundaries, leaving them as internal driver constants.
>
> This addresses the 'Remove unnecessary/unwanted module parameters'
> task in the driver's TODO file.
>
> Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
> ---
It's weird that the driver still has lots of references to these varaibles
but the build didn't break for me...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] staging: media: atomisp: Remove unused and unwanted debug module parameters
2026-07-20 10:38 ` Dan Carpenter
@ 2026-07-20 10:59 ` Andy Shevchenko
0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-07-20 10:59 UTC (permalink / raw)
To: Dan Carpenter
Cc: Prajval Chaudhary, Hans de Goede, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Andy Shevchenko, Sakari Ailus, linux-media,
linux-staging, linux-kernel
On Mon, Jul 20, 2026 at 01:38:01PM +0300, Dan Carpenter wrote:
> On Sun, Jul 19, 2026 at 07:33:49PM +0530, Prajval Chaudhary wrote:
> > Remove the unused module parameters 'dbg_level' and 'dbg_func'.
> > Additionally, remove the 'pad_w' and 'pad_h' module parameters
> > to prevent userspace from overriding internal ISP hardware padding
> > boundaries, leaving them as internal driver constants.
> >
> > This addresses the 'Remove unnecessary/unwanted module parameters'
> > task in the driver's TODO file.
> It's weird that the driver still has lots of references to these varaibles
> but the build didn't break for me...
Yeah, but still the debug facility should be updated to use what we have
in the kernel.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] staging: media: atomisp: Mark pad_w and pad_h as const constants
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 14:03 ` Prajval Chaudhary
2026-07-19 17:02 ` [PATCH 0/2] staging: media: atomisp: Clean up unnecessary module parameters Andy Shevchenko
2 siblings, 0 replies; 7+ messages in thread
From: Prajval Chaudhary @ 2026-07-19 14:03 UTC (permalink / raw)
To: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman
Cc: Andy Shevchenko, Sakari Ailus, linux-media, linux-staging,
linux-kernel, Prajval Chaudhary
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] staging: media: atomisp: Clean up unnecessary module parameters
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 14:03 ` [PATCH 2/2] staging: media: atomisp: Mark pad_w and pad_h as const constants Prajval Chaudhary
@ 2026-07-19 17:02 ` Andy Shevchenko
2 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-07-19 17:02 UTC (permalink / raw)
To: Prajval Chaudhary
Cc: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Andy Shevchenko, Sakari Ailus, linux-media, linux-staging,
linux-kernel
On Sun, Jul 19, 2026 at 5:09 PM Prajval Chaudhary
<prajvalchaudhari733@gmail.com> wrote:
>
> This patch series addresses the 'Remove unnecessary/unwanted module
> parameters' task listed in the atomisp driver's TODO file.
>
> The first patch removes the unused debug parameters along with the
> user-facing pad_w and pad_h parameters to safeguard hardware padding
> boundaries. The second patch converts the remaining internal usages
> of pad_w and pad_h to const configurations to enable compiler
> optimizations and enforce type safety.
I understand your eagerness to achieve something with this driver.
Unfortunately this driver is not that easy. If you really want to
continue with it, please buy or lend some cheap Bay Trail or Cherry
Trail tablet with a camera connected to the SH IP.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread