All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters
@ 2026-07-20 11:28 Prajval Chaudhary
  2026-07-20 11:37 ` Andy Shevchenko
  2026-07-20 11:49 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Prajval Chaudhary @ 2026-07-20 11:28 UTC (permalink / raw)
  To: andy, hansg, mchehab
  Cc: error27, sakari.ailus, gregkh, linux-kernel, linux-media,
	linux-staging, Prajval Chaudhary

Hi Andy, Dan, Hans,

Thank you for the review and catching this. 

In this v3, I have completely dropped the changes to the debug 
parameters to keep the staging debug facilities fully intact as requested.

This patch now strictly focuses on removing the 'pad_w' and 'pad_h' 
module parameters and converting them into internal driver constants.

Remove the 'pad_w' and 'pad_h' module parameters to prevent userspace
from overriding internal ISP hardware padding boundaries. Convert them
into internal driver constants instead.

This partially addresses the 'Remove unnecessary/unwanted module
parameters' task in the driver's TODO file, while keeping the debug
facilities intact as requested by maintainers.

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

diff --git a/drivers/staging/media/atomisp/pci/atomisp_common.h b/drivers/staging/media/atomisp/pci/atomisp_common.h
index a2462fc306fb..7c6c0124ff72 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_common.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_common.h
@@ -22,8 +22,8 @@
 
 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 812230397409..d117fea2860c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -64,13 +64,9 @@ MODULE_PARM_DESC(dbg_func,
  * 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;
-module_param(pad_w, int, 0644);
-MODULE_PARM_DESC(pad_w, "extra data for ISP processing");
+const int pad_w = 16;
 
-int pad_h = 16;
-module_param(pad_h, int, 0644);
-MODULE_PARM_DESC(pad_h, "extra data for ISP processing");
+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] 3+ messages in thread

* Re: [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters
  2026-07-20 11:28 [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters Prajval Chaudhary
@ 2026-07-20 11:37 ` Andy Shevchenko
  2026-07-20 11:49 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-07-20 11:37 UTC (permalink / raw)
  To: Prajval Chaudhary
  Cc: andy, hansg, mchehab, error27, sakari.ailus, gregkh, linux-kernel,
	linux-media, linux-staging

On Mon, Jul 20, 2026 at 04:58:07PM +0530, Prajval Chaudhary wrote:
> Hi Andy, Dan, Hans,
> 
> Thank you for the review and catching this. 
> 
> In this v3, I have completely dropped the changes to the debug 
> parameters to keep the staging debug facilities fully intact as requested.
> 
> This patch now strictly focuses on removing the 'pad_w' and 'pad_h' 
> module parameters and converting them into internal driver constants.

This must not be the part of the commit message. See below.

> Remove the 'pad_w' and 'pad_h' module parameters to prevent userspace
> from overriding internal ISP hardware padding boundaries. Convert them
> into internal driver constants instead.
> 
> This partially addresses the 'Remove unnecessary/unwanted module
> parameters' task in the driver's TODO file, while keeping the debug
> facilities intact as requested by maintainers.

If it partially addresses, then I recommend to finish the task.
Half-baked solutions usually are not welcome (only as a discussion
starter or so). I already told that the whole debug facility in
this driver should be aligned with the kernel APIs and tools.
Have you read my previous replies?

> Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
> ---

Here is the space to add comments like you put in the above text.

>  drivers/staging/media/atomisp/pci/atomisp_common.h | 4 ++--
>  drivers/staging/media/atomisp/pci/atomisp_v4l2.c   | 8 ++------

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters
  2026-07-20 11:28 [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters Prajval Chaudhary
  2026-07-20 11:37 ` Andy Shevchenko
@ 2026-07-20 11:49 ` Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2026-07-20 11:49 UTC (permalink / raw)
  To: Prajval Chaudhary
  Cc: andy, hansg, mchehab, sakari.ailus, gregkh, linux-kernel,
	linux-media, linux-staging

On Mon, Jul 20, 2026 at 04:58:07PM +0530, Prajval Chaudhary wrote:
> Hi Andy, Dan, Hans,
> 
> Thank you for the review and catching this. 
> 
> In this v3, I have completely dropped the changes to the debug 
> parameters to keep the staging debug facilities fully intact as requested.
> 
> This patch now strictly focuses on removing the 'pad_w' and 'pad_h' 
> module parameters and converting them into internal driver constants.
> 
> Remove the 'pad_w' and 'pad_h' module parameters to prevent userspace
> from overriding internal ISP hardware padding boundaries. Convert them
> into internal driver constants instead.
> 
> This partially addresses the 'Remove unnecessary/unwanted module
> parameters' task in the driver's TODO file, while keeping the debug
> facilities intact as requested by maintainers.
> 
> Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
> ---

No.  The real answer requires is a bit complicated and requires
some thought.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-20 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 11:28 [PATCH v3] staging: media: atomisp: Remove pad_w and pad_h module parameters Prajval Chaudhary
2026-07-20 11:37 ` Andy Shevchenko
2026-07-20 11:49 ` Dan Carpenter

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.