summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-06-03staging: speakup: check for null before calling TTY's flush_bufferOkash Khawaja1-1/+2
We should check the flush_buffer method of a tty for null before invoking it. Some drivers such as usbserial don't implement flush_buffer. This will be required for upcoming patches where we expand spk_ttyio to support more than just ttyS*. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: in-place endianness functionsNikola Jelic1-10/+10
lib-move.c file has a lot of expressions in the form of: v = le[32|64]_to_cpu(v); This caused a lot of sparse warnings. Replaced with: le[32|64]_to_cpus(&v); Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: changed __u32 to __be32Nikola Jelic1-1/+1
Temporary variable is used only as __be32, for both assignments and reads, but the type is inconsistent (__u32). Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03lustre: ko2iblnd: removed forced u32 casts after htonlNikola Jelic1-2/+2
sockaddr_in.sin_addr.s_addr is __be32 integral type, so the (__force u32) cast after the htonl call is unnecessary, and also detected by sparse: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2309:33: warning: incorrect type in assignment (different base types) drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2381:30: warning: incorrect type in assignment (different base types) Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: cleanup le32 assignment to ldp_flagsValentin Vidic1-3/+4
Introduces a local var to collect flags and convert them to le32. Fixes the following sparse warnings: drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: warning: invalid assignment: |= drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: left side has type restricted __le32 drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: right side has type int drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: warning: invalid assignment: |= drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: left side has type restricted __le32 drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: right side has type int Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: lprocfs: Use seq_puts instead of seq_printfMathias Rav1-10/+10
Reported by checkpatch.pl: "WARNING: Prefer seq_puts to seq_printf". Signed-off-by: Mathias Rav <mathiasrav@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: Use kstrtouint_from_user in ldlm_rw_uintMathias Rav2-35/+19
Clean up the helper functions used to implement "dump_granted_max" in debugfs. Replace the lprocfs_rd_uint() and lprocfs_wr_uint() generic callbacks with a simpler, more direct implementation of ldlm_rw_uint_fops. There's a slight change in lustre debugfs write semantics: Using kstrtox causes EINVAL when the written number is followed by other (garbage) characters, whereas previously the garbage would be ignored and such a write would succeed. Signed-off-by: Mathias Rav <mathiasrav@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03staging: lustre: Replace printk_ratelimited with pr_warn_ratelimitedKonrad Malkowski1-7/+5
This patch fixes the checkpoint.pl warning: WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit Signed-off-by: Konrad Malkowski <konrad.malkowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Replace remaining BUG_ON with WARN_ONStefan Wahren1-7/+7
This replaces all remaining BUG_ON with WARN_ON. So in case of a VCHIQ bug the system is still usable. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Bail out in case of invalid tx_posStefan Wahren1-2/+4
Properly handle the error case in case of an invalid tx_pos. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Don't BUG if process is unexpectedStefan Wahren1-3/+8
Bail out properly if the process index doesn't match the remote insert. We also drop the BUG in case the process index is at local insert, so we can trigger the WARN_ON again some steps later. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Bail out if ref_count is unexpectedStefan Wahren1-7/+10
If the ref counter of service has an unexpected value then we better bail out. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Bail out if service is NULLStefan Wahren1-14/+24
In the unlikely case that service is NULL we should bail out instead of calling BUG_ON(). The other BUG_ON calls will be fixed in separate patches. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Don't BUG if sending RESUME failsStefan Wahren1-1/+0
VCHIQ suspend and resume isn't implemented, but even it was there is no need to call BUG(). Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Bailout if VCHIQ state is already initializedStefan Wahren1-0/+5
In case VCHIQ state is already initialized we need to bailout in order to aovid a memory leak. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Simplify VCHIQ initStefan Wahren1-4/+1
Since the ARM side of VCHIQ support only 1 state, we could simplify the init code. This makes it possible to avoid BUG_ON and a theoretical overflow of id. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_2835_arm: Use PAGE_MASK macroStefan Wahren1-1/+1
Use the PAGE_MASK instead of open code it. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_2835_arm: Handle vmalloc_to_page error caseStefan Wahren1-0/+5
In case vmalloc_to_page returns NULL create_pagelist must abort imediatly. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_2835_arm: Fix function name cleaup_pagelistinfoStefan Wahren1-5/+5
Assuming the intension of the function is to clean up, so fix the function name accordingly. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_arm: Avoid multiline dereferenceStefan Wahren1-6/+6
Reduce the indentation within vchiq_dump_service_use_state in order to avoid a multiline derefernce. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_arm: Fix variable names in commentStefan Wahren1-1/+1
This comment was apparently forgotten in the correction of CamelCase. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_2835_arm: Remove unnecessary assignment to slot_mem_sizeStefan Wahren1-1/+0
The variable slot_mem_size is assigned a value which is never used. This issue has been found by CppCheck. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_2835_arm: Reduce scope of i in free_pagelistStefan Wahren1-1/+2
We can reduce the scope of the counting variable i. This has been found by CppCheck. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: vchiq_core: Use return value of mutex_lock_killable directlyStefan Wahren1-3/+1
Instead of saving the return value of mutex_lock_killable in a local variable we could use the value directly. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: removes comparison to nullJuliana Rodrigues1-10/+10
This patch fixes multiple comparison to NULL checkpatch errors by rewriting the conditional as a negation. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: removed unnecessary blank linesJuliana Rodrigues1-40/+1
Removes numerous unnecessary blank lines in order to fix checkpatch styling issues. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: removed unnecessary parenthesesJuliana Rodrigues1-10/+11
This patch removes numerous unnecessary parentheses in order to fix checkpatch styling issues. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: removed function names from stringsJuliana Rodrigues1-5/+8
This patch fixes a checkpatch issue caused by using function names inside strings. Those function names were replaced by __func__. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: add spaces around characterJuliana Rodrigues1-1/+1
This patch solves a checkpatch issue caused by not using spaces around an OR sign. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: fixes block comments subsequent linesJuliana Rodrigues1-16/+18
This patch adds * on block comments subsequent lines, which were causing a checkpatch styling warning. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8188eu: fix comments with lines over 80 charactersJuliana Rodrigues1-9/+21
This patch fixes some checkpatch errors in which comments go over 80 characters per line. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: rtl8192u: swap comparison to constantSzilveszter Székely1-5/+5
Comparisons should place the constant on the right side of the test This patch fixes coding style issues as reported by checkpatch. Signed-off-by: Szilveszter Székely <szekelyszilv@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: fsl-dpaa2/eth: Map Tx buffers as bidirectionalIoana Radulescu1-7/+7
WRIOP hardware may need to write to the hardware annotation area of Tx buffers (e.g. frame status bits) and also to the data area (e.g. L4 checksum in frame header). Map these buffers as DMA_BIDIRECTIONAL, otherwise the write transaction through SMMU will not be allowed. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: fsl-dpaa2/eth: Fix address translationsIoana Radulescu2-6/+20
Use the correct mechanisms for translating a DMA-mapped IOVA address into a virtual one. Without this fix, once SMMU is enabled on Layerscape platforms, the Ethernet driver throws IOMMU translation faults. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_fips_local.c - align block commentsDerek Robson1-9/+12
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_hash.c - align block commentsDerek Robson1-3/+6
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_hash.h - align block commentsDerek Robson1-1/+1
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_ivgen.c - align block commentsDerek Robson1-2/+4
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_pm.h - align block commentsDerek Robson1-1/+1
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_pm_ext.c - align block commentsDerek Robson1-7/+7
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_pm_ext.h - align block commentsDerek Robson1-1/+1
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_request_mgr.c - align block commentsDerek Robson1-15/+22
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_request_mgr.h - align block commentsDerek Robson1-1/+1
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_sysfs.c - align block commentsDerek Robson1-1/+2
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29Drivers: ccree: ssi_sysfs.h - align block commentsDerek Robson1-1/+1
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: ccree: fix cc_crypto_ctx.h white spacesGennadii Altukhov1-6/+6
Fix checkpatch.pl reported checks: spaces preferred around '/' and '<<' in cc_crypto_ctx.h Signed-off-by: Gennadii Altukhov <grinrag@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: wilc1000: add missing blank line after struct declarationMarko Stankovic1-0/+1
Fix a missing blank line issue reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: wilc1000: remove excessive blank linesMarko Stankovic1-15/+0
Fix the multiple blank lines issue reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: wlan-ng: hfa384x: fix several type issues.Nikola Jelic1-10/+8
There were several in-place conversions of 16 and 32-bit data, which caused sparse to detect them. Changed them to the in situ versions, such as: le16_to_cpu -> le16_to_cpus Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: fbtft: Fix to avoid precedence issuesRishiraj Manwatkar1-1/+1
Parentheses added to avoid operator precedence issues. Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>