Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fpga: fix for coding style issues

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>

authored by

Nava kishore Manne and committed by
Xu Yilun
57ce2e40 558094cb

+14 -13
+5 -4
drivers/fpga/fpga-mgr.c
··· 148 148 int ret; 149 149 150 150 mgr->state = FPGA_MGR_STATE_WRITE_INIT; 151 - if (!mgr->mops->initial_header_size) 151 + if (!mgr->mops->initial_header_size) { 152 152 ret = fpga_mgr_write_init(mgr, info, NULL, 0); 153 - else 154 - ret = fpga_mgr_write_init( 155 - mgr, info, buf, min(mgr->mops->initial_header_size, count)); 153 + } else { 154 + count = min(mgr->mops->initial_header_size, count); 155 + ret = fpga_mgr_write_init(mgr, info, buf, count); 156 + } 156 157 157 158 if (ret) { 158 159 dev_err(&mgr->dev, "Error preparing FPGA for writing\n");
+3 -3
drivers/fpga/fpga-region.c
··· 18 18 static DEFINE_IDA(fpga_region_ida); 19 19 static struct class *fpga_region_class; 20 20 21 - struct fpga_region *fpga_region_class_find( 22 - struct device *start, const void *data, 23 - int (*match)(struct device *, const void *)) 21 + struct fpga_region * 22 + fpga_region_class_find(struct device *start, const void *data, 23 + int (*match)(struct device *, const void *)) 24 24 { 25 25 struct device *dev; 26 26
+3 -3
drivers/fpga/of-fpga-region.c
··· 189 189 * fpga_image_info struct if there is an image to program. 190 190 * error code for invalid overlay. 191 191 */ 192 - static struct fpga_image_info *of_fpga_region_parse_ov( 193 - struct fpga_region *region, 194 - struct device_node *overlay) 192 + static struct fpga_image_info * 193 + of_fpga_region_parse_ov(struct fpga_region *region, 194 + struct device_node *overlay) 195 195 { 196 196 struct device *dev = &region->dev; 197 197 struct fpga_image_info *info;
+3 -3
include/linux/fpga/fpga-region.h
··· 52 52 53 53 #define to_fpga_region(d) container_of(d, struct fpga_region, dev) 54 54 55 - struct fpga_region *fpga_region_class_find( 56 - struct device *start, const void *data, 57 - int (*match)(struct device *, const void *)); 55 + struct fpga_region * 56 + fpga_region_class_find(struct device *start, const void *data, 57 + int (*match)(struct device *, const void *)); 58 58 59 59 int fpga_region_program_fpga(struct fpga_region *region); 60 60