Skip to contentSkip to conversation

staging: media: atomisp: Make pmic_name array const

PATCH In review John Singleton 3 participants 8 messages Oct 12 – Oct 15 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 staging: media: atomisp: Make pmic_name array const

Add const to pmic_name[] as advised by checkpatch to ensure the pointer itself remains unmodified. The array is read and never modified, so this change safe.

---
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +1 -1
index a1d3a16921ea..d628fe4dca6d 100644
@@ -109,7 +109,7 @@ static enum {
 	PMIC_CRYSTALCOVE
 } pmic_id;
 
-static const char *pmic_name[] = {
+static const char * const pmic_name[] = {
 	[PMIC_UNSET]		= "ACPI device PM",
 	[PMIC_REGULATOR]	= "regulator driver",
 	[PMIC_AXP]		= "XPower AXP288 PMIC",
Signature · 1 line
2.56.0.385.gd3acb90ef8-goog
#1 lore raw

PATCH 2/3 staging: media: atomisp: Remove extraneous dev_dbg

Remove dev_dbg calls that (per checkpatch) are duplicative wrt ftrace.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c  | 2 --
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ----
 2 files changed, 6 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +0 -2
index 6cd500d9fd26..a7c28c261320 100644
@@ -262,8 +262,6 @@ int atomisp_reset(struct atomisp_device *isp)
 	/* Reset ISP by power-cycling it */
 	int ret = 0;
 
-	dev_dbg(isp->dev, "%s\n", __func__);
-
 	ret = atomisp_power_off(isp->dev);
 	if (ret < 0)
 		dev_err(isp->dev, "atomisp_power_off failed, %d\n", ret);
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +0 -4
index 812230397409..d83c967fd125 100644
@@ -345,8 +345,6 @@ static int atomisp_save_iunit_reg(struct atomisp_device *isp)
 {
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
 
-	dev_dbg(isp->dev, "%s\n", __func__);
-
 	pci_read_config_word(pdev, PCI_COMMAND, &isp->saved_regs.pcicmdsts);
 	/* isp->saved_regs.ispmmadr is set from the atomisp_pci_probe() */
 	pci_read_config_dword(pdev, PCI_MSI_CAPID, &isp->saved_regs.msicap);
@@ -400,8 +398,6 @@ static int atomisp_restore_iunit_reg(struct atomisp_device *isp)
 {
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
 
-	dev_dbg(isp->dev, "%s\n", __func__);
-
 	pci_write_config_word(pdev, PCI_COMMAND, isp->saved_regs.pcicmdsts);
 	pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, isp->saved_regs.ispmmadr);
 	pci_write_config_dword(pdev, PCI_MSI_CAPID, isp->saved_regs.msicap);
Signature · 1 line
2.56.0.385.gd3acb90ef8-goog
#3 lore raw

PATCH 3/3 staging: media: atomisp: Fix parameter indentation and block comments

In reply to John Singleton

Replace leading spaces with tabs in function parameter lists and format multi-line comments according to kernel coding style.

---
 .../staging/media/atomisp/pci/atomisp_cmd.c   |  21 +--
 .../media/atomisp/pci/atomisp_compat_css20.c  | 136 +++++++++---------
 .../media/atomisp/pci/atomisp_subdev.c        |   2 +-
 3 files changed, 83 insertions(+), 76 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +11 -10
index a7c28c261320..9483113f6c44 100644
@@ -1883,8 +1883,8 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
  * Function to check the zoom region whether is effective
  */
 static bool atomisp_check_zoom_region(
-    struct atomisp_sub_device *asd,
-    struct ia_css_dz_config *dz_config)
+	struct atomisp_sub_device *asd,
+	struct ia_css_dz_config *dz_config)
 {
 	struct atomisp_resolution  config;
 	bool flag = false;
@@ -1918,8 +1918,8 @@ static bool atomisp_check_zoom_region(
 }
 
 void atomisp_apply_css_parameters(
-    struct atomisp_sub_device *asd,
-    struct atomisp_css_params *css_param)
+	struct atomisp_sub_device *asd,
+	struct atomisp_css_params *css_param)
 {
 	if (css_param->update_flag.wb_config)
 		asd->params.config.wb_config = &css_param->wb_config;
@@ -2518,9 +2518,10 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
 		if (sizeof(*cur) != sizeof(dvs2_coefs.grid) ||
 		    memcmp(&dvs2_coefs.grid, cur, sizeof(dvs2_coefs.grid))) {
 			dev_err(asd->isp->dev, "dvs grid mismatch!\n");
-			/* If the grid info in the argument differs from the current
-			grid info, we tell the caller to reset the grid size and
-			try again. */
+			/* If the grid info in the argument differs from the
+			 * current grid info, we tell the caller to reset the
+			 * grid size and try again.
+			 */
 			return -EAGAIN;
 		}
 
@@ -3893,9 +3894,9 @@ enum mipi_port_id atomisp_port_to_mipi_port(struct atomisp_device *isp,
 }
 
 static inline int atomisp_set_sensor_mipi_to_isp(
-    struct atomisp_sub_device *asd,
-    enum atomisp_input_stream_id stream_id,
-    struct camera_mipi_info *mipi_info)
+	struct atomisp_sub_device *asd,
+	enum atomisp_input_stream_id stream_id,
+	struct camera_mipi_info *mipi_info)
 {
 	struct v4l2_control ctrl;
 	struct atomisp_device *isp = asd->isp;
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +71 -65

298 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_subdev.c +1 -1
index 9de9cd884d99..700fcf88a886 100644
@@ -96,7 +96,7 @@ const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code)
 }
 
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-    enum atomisp_input_format atomisp_in_fmt)
+	enum atomisp_input_format atomisp_in_fmt)
 {
 	int i;
 
Signature · 1 line
2.56.0.385.gd3acb90ef8-goog
#4 lore raw

Re: [PATCH 3/3] staging: media: atomisp: Fix parameter indentation and block comments

Quoted 3 lines · John Singleton

Replace leading spaces with tabs in function parameter lists and format multi-line comments according to kernel coding style.

Please, read the mail archive to understand why this patch is no-go.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

PATCH 3/3 staging: media: atomisp: Fix parameter indentation and block comments

In reply to Andy Shevchenko
Quoted 15 lines · John Singleton

Thank you, Andy. Just to confirm from my examination, I think the key issues are:
1) There should be separate patches for the comment-cleanup and the function-header cleanup and
2) The preference is to do this for all files in a directory, rather than a subset.

Is that a fair summary of the concerns?

Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · John Singleton

Replace leading spaces with tabs in function parameter lists and format multi-line comments according to kernel coding style.

Please, read the mail archive to understand why this patch is no-go.

Thank you, Andy. Just to confirm from my examination, I think the key issues are:
1) There should be separate patches for the comment-cleanup and the function-header cleanup and
2) The preference is to do this for all files in a directory, rather than a subset.

Is that a fair summary of the concerns?

Quoted 4 lines
Quoted 4 lines

--
With Best Regards,
Andy Shevchenko

#7 lore raw

Re: [PATCH 3/3] staging: media: atomisp: Fix parameter indentation and block comments

In reply to a message not in the archive
Quoted 8 lines · John Singleton

Thank you, Andy. Just to confirm from my examination, I think the key issues are:
1) There should be separate patches for the comment-cleanup and the function-header cleanup and
2) The preference is to do this for all files in a directory, rather than a subset.

Is that a fair summary of the concerns?

Do not top-post!

Not only, the similar patches were sent many times, you need to collect preliminary work and come up with the best solution out of all.

Quoted 10 lines
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · John Singleton

Replace leading spaces with tabs in function parameter lists and format multi-line comments according to kernel coding style.

Please, read the mail archive to understand why this patch is no-go.

Signature · 2 lines
With Best Regards,
Andy Shevchenko