fpga: fix for coding style issues
authorNava kishore Manne <nava.manne@xilinx.com>
Sat, 23 Apr 2022 17:02:32 +0000 (22:32 +0530)
committerXu Yilun <yilun.xu@intel.com>
Tue, 10 May 2022 08:03:52 +0000 (16:03 +0800)
fixes the below checks reported by checkpatch.pl:
- Lines should not end with a '('
- Alignment should match open parenthesis

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
Link: https://lore.kernel.org/r/20220423170235.2115479-3-nava.manne@xilinx.com
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
drivers/fpga/fpga-mgr.c
drivers/fpga/fpga-region.c
drivers/fpga/of-fpga-region.c
include/linux/fpga/fpga-region.h

index d49a9ce..24dee27 100644 (file)
@@ -148,11 +148,12 @@ static int fpga_mgr_write_init_buf(struct fpga_manager *mgr,
        int ret;
 
        mgr->state = FPGA_MGR_STATE_WRITE_INIT;
-       if (!mgr->mops->initial_header_size)
+       if (!mgr->mops->initial_header_size) {
                ret = fpga_mgr_write_init(mgr, info, NULL, 0);
-       else
-               ret = fpga_mgr_write_init(
-                   mgr, info, buf, min(mgr->mops->initial_header_size, count));
+       } else {
+               count = min(mgr->mops->initial_header_size, count);
+               ret = fpga_mgr_write_init(mgr, info, buf, count);
+       }
 
        if (ret) {
                dev_err(&mgr->dev, "Error preparing FPGA for writing\n");
index b0ac18d..485948e 100644 (file)
@@ -18,9 +18,9 @@
 static DEFINE_IDA(fpga_region_ida);
 static struct class *fpga_region_class;
 
-struct fpga_region *fpga_region_class_find(
-       struct device *start, const void *data,
-       int (*match)(struct device *, const void *))
+struct fpga_region *
+fpga_region_class_find(struct device *start, const void *data,
+                      int (*match)(struct device *, const void *))
 {
        struct device *dev;
 
index 50b8305..a598d03 100644 (file)
@@ -189,9 +189,9 @@ static int child_regions_with_firmware(struct device_node *overlay)
  *   fpga_image_info struct if there is an image to program.
  *   error code for invalid overlay.
  */
-static struct fpga_image_info *of_fpga_region_parse_ov(
-                                               struct fpga_region *region,
-                                               struct device_node *overlay)
+static struct fpga_image_info *
+of_fpga_region_parse_ov(struct fpga_region *region,
+                       struct device_node *overlay)
 {
        struct device *dev = &region->dev;
        struct fpga_image_info *info;
index 3b87f23..9d4d329 100644 (file)
@@ -52,9 +52,9 @@ struct fpga_region {
 
 #define to_fpga_region(d) container_of(d, struct fpga_region, dev)
 
-struct fpga_region *fpga_region_class_find(
-       struct device *start, const void *data,
-       int (*match)(struct device *, const void *));
+struct fpga_region *
+fpga_region_class_find(struct device *start, const void *data,
+                      int (*match)(struct device *, const void *));
 
 int fpga_region_program_fpga(struct fpga_region *region);