Skip to contentSkip to conversation

staging: media: atomisp: Fix formatting issues and minor code issue

PATCH In review Jonathan Bergh 2 participants 2 messages Feb 25, 2024 – Feb 26, 2024

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

PATCH 1/1 staging: media: atomisp: Fix formatting issues and minor code issue

This patch fixes the following code style and formatting issues:
* Ensure multiline block comments are correctly formatted
* Remove extra braces not required for single line conditional statements

---
 drivers/staging/media/atomisp/pci/atomisp_drvfs.c         | 2 +-
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 7 +++----
 drivers/staging/media/atomisp/pci/atomisp_subdev.c        | 3 ++-
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_drvfs.c +1 -1
index 1df534bf54d3..8ef25d2f8b87 100644
@@ -34,7 +34,7 @@
  *        bit 0: binary list
  *        bit 1: running binary
  *        bit 2: memory statistic
-*/
+ */
 struct _iunit_debug {
 	struct device_driver	*drv;
 	struct atomisp_device	*isp;
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +3 -4
index 139ad7ad1dcf..804ffff245f3 100644
@@ -1416,13 +1416,12 @@ static int gmin_get_config_var(struct device *maindev,
 	if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE))
 		status = efi.get_variable(var16, &GMIN_CFG_VAR_EFI_GUID, NULL,
 					  (unsigned long *)out_len, out);
-	if (status == EFI_SUCCESS) {
+	if (status == EFI_SUCCESS)
 		dev_info(maindev, "found EFI entry for '%s'\n", var8);
-	} else if (is_gmin) {
+	else if (is_gmin)
 		dev_info(maindev, "Failed to find EFI gmin variable %s\n", var8);
-	} else {
+	else
 		dev_info(maindev, "Failed to find EFI variable %s\n", var8);
-	}
 
 	return ret;
 }
drivers/staging/media/atomisp/pci/atomisp_subdev.c +2 -1
index a87fc74159e2..f8efaef2c055 100644
@@ -394,7 +394,8 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			 * (of the desired captured image before
 			 * scaling, or 1 / 6 of what we get from the
 			 * sensor) in both width and height. Remove
-			 * it. */
+			 * it.
+			 */
 			crop[pad]->width = roundup(crop[pad]->width * 5 / 6,
 						   ATOM_ISP_STEP_WIDTH);
 			crop[pad]->height = roundup(crop[pad]->height * 5 / 6,
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Jonathan,

Quoted 5 lines · Jonathan Bergh

This patch fixes the following code style and formatting issues:
* Ensure multiline block comments are correctly formatted
* Remove extra braces not required for single line conditional statements

Thanks, patch looks good to me:

(I'll apply this to my atomisp-branch the next time I'm working on that branch).

Regards,

Hans

Quoted 54 lines
---
 drivers/staging/media/atomisp/pci/atomisp_drvfs.c         | 2 +-
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 7 +++----
 drivers/staging/media/atomisp/pci/atomisp_subdev.c        | 3 ++-
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_drvfs.c +1 -1
index 1df534bf54d3..8ef25d2f8b87 100644
@@ -34,7 +34,7 @@
  *        bit 0: binary list
  *        bit 1: running binary
  *        bit 2: memory statistic
-*/
+ */
 struct _iunit_debug {
 	struct device_driver	*drv;
 	struct atomisp_device	*isp;
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +3 -4
index 139ad7ad1dcf..804ffff245f3 100644
@@ -1416,13 +1416,12 @@ static int gmin_get_config_var(struct device *maindev,
 	if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE))
 		status = efi.get_variable(var16, &GMIN_CFG_VAR_EFI_GUID, NULL,
 					  (unsigned long *)out_len, out);
-	if (status == EFI_SUCCESS) {
+	if (status == EFI_SUCCESS)
 		dev_info(maindev, "found EFI entry for '%s'\n", var8);
-	} else if (is_gmin) {
+	else if (is_gmin)
 		dev_info(maindev, "Failed to find EFI gmin variable %s\n", var8);
-	} else {
+	else
 		dev_info(maindev, "Failed to find EFI variable %s\n", var8);
-	}
 
 	return ret;
 }
drivers/staging/media/atomisp/pci/atomisp_subdev.c +2 -1
index a87fc74159e2..f8efaef2c055 100644
@@ -394,7 +394,8 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			 * (of the desired captured image before
 			 * scaling, or 1 / 6 of what we get from the
 			 * sensor) in both width and height. Remove
-			 * it. */
+			 * it.
+			 */
 			crop[pad]->width = roundup(crop[pad]->width * 5 / 6,
 						   ATOM_ISP_STEP_WIDTH);
 			crop[pad]->height = roundup(crop[pad]->height * 5 / 6,