summaryrefslogtreecommitdiff
path: root/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
AgeCommit message (Collapse)Author
2022-02-08staging: drop fpgaboot driverTong Zhang
The gs_fpgaboot driver is totally broken since 2014 and no one even noticed the driver is not probing. Given the quality of the driver and its current state it makes sense to drop it. Signed-off-by: Tong Zhang <ztong0001@gmail.com> Link: https://lore.kernel.org/r/20220204190847.3809405-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: gs_fpgaboot: add SPDX identifiersMichael Straube
This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: gs_fpgaboot: pr_err() strings should end with newlinesArvind Yadav
pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-28staging: gs_fpgaboot: return valid error codesJacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-28staging: gs_fpgaboot: change char to u8Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-28staging: gs_fpgaboot: add buffer overflow checksJacob von Chorus
Four fields in struct fpgaimage are char arrays of length MAX_STR (256). The amount of data read into these buffers is controlled by a length field in the bitstream file read from userspace. If a corrupt or malicious firmware file was supplied, kernel data beyond these buffers can be overwritten arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25Staging: gs_fpgaboot: Use octal permissions '0444'Shyam Saini
Fixed following checkpatch warning WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: gs_fpgaboot: Remove FSF address from GPL noticeRehas Sachdeva
This patch fixes the checkpatch.pl warning: CHECK: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: gs_fpgaboot: Add space around '+'.Sandhya Bankar
Add space around '+'. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: gs_fpgaboot: Remove unnecessary blank lines.Sandhya Bankar
Remove unnecessary blank lines. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: gs_fpgaboot: Fix alignment to match open parenthesis.Sandhya Bankar
Fix alignment to match open parenthesis. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: gs_fpgaboot: drop wrapper function 'finish_driver'Eva Rachel Retuya
Remove the function 'finish_driver' since a direct call to platform_device_unregister() is intuitive enough to signify the original intention of the function being removed. Coccinelle semantic patch used to detect this: @@ identifier wrapper, func; type T; @@ *T wrapper(...) { ( return func(...); | func(...); ) } Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07Staging: gs_fpgaboot: fix data types in gs_fpgaboot.cBen Marsh
This is a patch to gs_fpgaboot.c to convert data types to kernel types as identified by checkpatch.pl. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07Staging: gs_fpgaboot: fix memory allocation in gs_fpgaboot.cBen Marsh
This is a patch for gs_fpgaboot.c that fixes a memory allocation problem identified by checkpatch.pl. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01staging: Remove <linux/moduleparam.h> header.Navya Sri Nizamkari
This patch drops #include <linux/moduleparam.h> in all the staging driver files that also include #include <linux/module.h> as module.h includes moduleparam.h already. The following semantic patch is used to make these changes: @ includesmodule @ @@ @ depends on includesmodule @ @@ - #include <linux/moduleparam.h> Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: gs_fpgaboot: fix a compiler warning with make W=2Devendra Naga
The below warning is fixed: drivers/staging/gs_fpgaboot/gs_fpgaboot.c: In function ‘gs_load_image’: drivers/staging/gs_fpgaboot/gs_fpgaboot.c:196:58: warning: declaration of ‘file’ shadows a global declaration [-Wshadow] drivers/staging/gs_fpgaboot/gs_fpgaboot.c:45:14: warning: shadowed declaration is here [-Wshadow] by renaming file function argument of gs_load_image with fw_file. Signed-off-by: Devendra Naga <devendranaga4@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: gs_fpgpaboot: fix compiler warning with make W=1Devendra Naga
the following compiler warning has been fixed: drivers/staging/gs_fpgaboot/gs_fpgaboot.c: In function ‘gs_read_bitstream’: drivers/staging/gs_fpgaboot/gs_fpgaboot.c:160:6: warning: variable ‘size’ set but not used [-Wunused-but-set-variable] CC drivers/staging/gs_fpgaboot/io.o LD drivers/staging/gs_fpgaboot/gs_fpga.o LD drivers/staging/gs_fpgaboot/built-in.o by removing the size variable. Signed-off-by: Devendra Naga <devendranaga4@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: gs_fpgaboot: cleanup in gs_fpgaboot_init functionDevendra Naga
the error path is cleanup to return the correct (function call return value) error code. Signed-off-by: Devendra Naga <devendranaga4@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: gs_fpgaboot: Fix "out of memory" error handlingDzmitry Sledneu
Fix "out of memory" error handling Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: gs_fpgaboot: Use print_hex_dump_bytes instead of pr_infoJoe Perches
Use print_hex_dump_bytes instead of pr_info Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com> Reviewed-by: Insop Song <insop.song@gainspeed.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: gs_fpgaboot: remove unnecessary 'out of memory' messageEbru Akagunduz
This patch fixes "Possible unnecessary 'out of memory' message" checkpatch.pl warning in gs_fpgaboot.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging: gs_fpgaboot: Fixed code style issuesRocco Folino
Fixed missing a blank line after declarations warning Signed-off-by: Rocco Folino <lordzen87@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15staging: gs_fpgaboot: remove __TIMESTAMP__ macroArnd Bergmann
We specifically build the kernel with -Werror=date-time to detect such macros, which gives us this error: gs_fpgaboot/gs_fpgaboot.c:376:44: error: macro "__TIMESTAMP__" might prevent reproducible builds [-Werror=date-time] pr_info("built at %s UTC\n", __TIMESTAMP__); The obvious fix is to remove the printk output line. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Insop Song <insop.song@gainspeed.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14staging: fpgaboot: fix coccinelle warningsFengguang Wu
drivers/staging/gs_fpgaboot/gs_fpgaboot.c:191:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: coccinelle/misc/semicolon.cocci CC: Insop Song <insop.song@gainspeed.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14staging: fpgaboot: fix coccinelle warningsFengguang Wu
drivers/staging/gs_fpgaboot/gs_fpgaboot.c:305:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Insop Song <insop.song@gainspeed.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: fpgaboot: Xilinx FPGA firmware download driverInsop Song
This driver downloads Xilinx FPGA firmware using gpio pins. It loads Xilinx FPGA bitstream format firmware image and program the Xilinx FPGA using SelectMAP (parallel) mode. Signed-off-by: Insop Song <insop.song@gainspeed.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>