aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-22Staging: gdm724x: Remove unnecessary print statementsBhanusree Pola1-1/+0
Remove print statements that provide information about error messages when memory allocation is failed. Issue found using coccinelle The following semantic patch is used to solve this: <smpl> @@ expression x; constant char[] C; identifier f; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); if(x==NULL) { ... ( -f(C,...); | -f(...,C); ) ... } </smpl> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-21staging: gdm724x: Rename dftEpsId to dft_eps_idBranden Bonaby1-1/+1
Rename member element dftEpsId to dft_eps_id to avoid camelcase. checkpatch warning: Avoid CamelCase. Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: gdm724x: Do not break expressionsIgnacio Losiggio1-4/+3
When the entire expression can be shown in the same line breaking it makes it more difficult to read. Signed-off-by: Ignacio Losiggio <iglosiggio@dc.uba.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: gdm724x: redundant variables idProduct and idVendorColin Ian King1-5/+0
Variable idProduct and idVendor are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'idProduct' set but not used [-Wunused-but-set-variable] warning: variable 'idVendor' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17Staging: gdm724x: use match_string() helperYisheng Xie1-13/+5
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Quytelda Kahja <quytelda@tamalin.org> Cc: devel@driverdev.osuosl.org Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26staging: gdm724x: remove redundant license informationGreg Kroah-Hartman14-168/+14
Now that the SPDX tag is in all gdm724x files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26staging: gdm724x: add SPDX identifiers to all files.Greg Kroah-Hartman14-0/+14
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the all of the staging gdm724x files to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: gdm724x: fix gdm_lte_tx()'s return typeLuc Van Oostenryck1-1/+1
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: LTE: Refactor gdm_lte_pdn_table().Quytelda Kahja1-11/+11
Mostly this change just reverses the primary conditional so most of the code can be pulled back a tab, which fixes some code style warnings. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: Simplify the struct gdm_endian to a variable.Quytelda Kahja6-46/+32
Since the testing for host endianness and in-driver conversion were removed in 77e8a50149a2, the gdm_endian struct contains only one member, and can therefore be simplified to a single u8 variable. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-23Staging: gdm724x: LTE: Fix trailing open parentheses.Quytelda Kahja1-23/+21
Fix lines with a trailing open parenthesis, which is a coding style issue. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19Staging: gdm724x: tty: Remove unused macro 'gdm_tty_send_control'.Quytelda Kahja1-3/+0
Remove the macro 'gdm_tty_send_control' which adds unnecessary complexity, is unused, and has arguments that could mistakenly be evaluated multiple times. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_recv'.Quytelda Kahja1-5/+6
Remove the macro 'gdm_tty_recv' which adds unnecessary complexity and has arguments that could mistakenly be evaluated multiple times. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.Quytelda Kahja1-9/+6
Remove the macro 'gdm_tty_send' which adds unnecessary complexity and has arguments that could mistakenly be evaluated multiple times. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19Staging: gdm724x: mux: Check return value of register_lte_tty_driver().Quytelda Kahja1-1/+5
Check the return value of of the register_lte_tty_driver() call in the module initialization function. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-19Staging: gdm724x: LTE: Fix argument list not aligned with parenthesis.Quytelda Kahja1-1/+2
Fix coding style warning from checkpatch.pl. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-13Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-7/+12
Pull staging and IIO updates from Greg KH: "Here is the "big" staging and IIO driver update for 4.15-rc1. Lots and lots of little changes, almost all minor code cleanups as the Outreachy application process happened during this development cycle. Also happened was a lot of IIO driver activity, and the typec USB code moving out of staging to drivers/usb (same commits are in the USB tree on a persistent branch to not cause merge issues.) Overall, it's a wash, I think we added a few hundred more lines than removed, but really only a few thousand were modified at all. All of these have been in linux-next for a while. There might be a merge issue with Al's vfs tree in the pi433 driver (take his changes, they are always better), and the media tree with some of the odd atomisp cleanups (take the media tree's version)" * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ...
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: gdm724x: fix return codes in gdm_lteAndrii Vladyka1-7/+7
fix return codes in gdm_lte in gdm724x driver Signed-off-by: Andrii Vladyka <tulup@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-20staging: gdm724x: check for skb->len in gdm_lte_emulate_arpAndrii Vladyka1-0/+5
check for skb->len in gdm_lte_emulate_arp in gdm724x driver Signed-off-by: Andrii Vladyka <tulup@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-16/+9
Pull networking updates from David Miller: "Reasonably busy this cycle, but perhaps not as busy as in the 4.12 merge window: 1) Several optimizations for UDP processing under high load from Paolo Abeni. 2) Support pacing internally in TCP when using the sch_fq packet scheduler for this is not practical. From Eric Dumazet. 3) Support mutliple filter chains per qdisc, from Jiri Pirko. 4) Move to 1ms TCP timestamp clock, from Eric Dumazet. 5) Add batch dequeueing to vhost_net, from Jason Wang. 6) Flesh out more completely SCTP checksum offload support, from Davide Caratti. 7) More plumbing of extended netlink ACKs, from David Ahern, Pablo Neira Ayuso, and Matthias Schiffer. 8) Add devlink support to nfp driver, from Simon Horman. 9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa Prabhu. 10) Add stack depth tracking to BPF verifier and use this information in the various eBPF JITs. From Alexei Starovoitov. 11) Support XDP on qed device VFs, from Yuval Mintz. 12) Introduce BPF PROG ID for better introspection of installed BPF programs. From Martin KaFai Lau. 13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann. 14) For loads, allow narrower accesses in bpf verifier checking, from Yonghong Song. 15) Support MIPS in the BPF selftests and samples infrastructure, the MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David Daney. 16) Support kernel based TLS, from Dave Watson and others. 17) Remove completely DST garbage collection, from Wei Wang. 18) Allow installing TCP MD5 rules using prefixes, from Ivan Delalande. 19) Add XDP support to Intel i40e driver, from Björn Töpel 20) Add support for TC flower offload in nfp driver, from Simon Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub Kicinski, and Bert van Leeuwen. 21) IPSEC offloading support in mlx5, from Ilan Tayari. 22) Add HW PTP support to macb driver, from Rafal Ozieblo. 23) Networking refcount_t conversions, From Elena Reshetova. 24) Add sock_ops support to BPF, from Lawrence Brako. This is useful for tuning the TCP sockopt settings of a group of applications, currently via CGROUPs" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits) net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap cxgb4: Support for get_ts_info ethtool method cxgb4: Add PTP Hardware Clock (PHC) support cxgb4: time stamping interface for PTP nfp: default to chained metadata prepend format nfp: remove legacy MAC address lookup nfp: improve order of interfaces in breakout mode net: macb: remove extraneous return when MACB_EXT_DESC is defined bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case bpf: fix return in load_bpf_file mpls: fix rtm policy in mpls_getroute net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t net, ax25: convert ax25_route.refcount from atomic_t to refcount_t net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t ...
2017-06-16networking: introduce and use skb_put_data()Johannes Berg1-16/+9
A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-03Staging: gdm724x: Change spaces to tabsMart Lubbers1-4/+4
This patch fixes the following checkpatch.pl warning in gdm_usb.c: WARNING: suspect code indent for conditional statements (8, 12) Signed-off-by: Mart Lubbers <mart@martlubbers.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: gdm724x: gdm_mux: fix use-after-free on module unloadJohan Hovold1-2/+1
Make sure to deregister the USB driver before releasing the tty driver to avoid use-after-free in the USB disconnect callback where the tty devices are deregistered. Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Cc: stable <stable@vger.kernel.org> # 3.12 Cc: Won Kang <wkang77@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: gdm724x: fix checkpatch.pl camelCase warningAya Mahfouz1-1/+1
Fixes the checkpatch.pl warning: Avoid CamelCase Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: gdm724x: Replace ternary operator with min macroGargi Sharma1-2/+1
Use macro min() to get the minimum of two values for brevity and readability. The macro MUX_TX_MAX_SIZE has a value of 2048 which is well within the integer limits. This check was done manually. Found using Coccinelle: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: gdm724x: Drop useless initialisationsimran singhal2-3/+3
Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i - = C ; i = e; Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: gdm724x: modify icmp6_checksum for returning a correct data type.Javier Rodriguez1-9/+6
The icmp6_checksum was returning an invalid data type as the expected type is __sum16. For returning such data type, icmp6_checksum, now, is using the kernel functions for computing the checksum. Here, the sparse message: drivers/staging/gdm724x/gdm_lte.c:311:39: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_lte.c:311:39: expected restricted __sum16 [addressable] [assigned] [usertype] icmp6_cksum drivers/staging/gdm724x/gdm_lte.c:311:39: got int Signed-off-by: Javier Rodriguez <jrodbar@yahoo.es> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: gdm724x: fix incorrect type in assignmentJavier Rodriguez1-1/+1
Fix sparse warning issue. drivers/staging/gdm724x/gdm_lte.c:201:33: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_lte.c:201:33: expected unsigned int [unsigned] [addressable] [usertype] ph_len drivers/staging/gdm724x/gdm_lte.c:201:33: got restricted __be16 [usertype] payload_len Signed-off-by: Javier Rodriguez <jrodbar@yahoo.es> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: gdm724x: fix a couple array overflowsDan Carpenter1-10/+14
The find_dev_index() function is frustrating. If you give it an invalid index then it returns 0. That was the intent except there is an off-by-one so it can return MAX_NIC_TYPE which is one higher than we want. There is one caller which had a sanity check to catch invalid returns, but the other two callers assumed that index was valid. My feeling is that when we are given invalid indexes, that should be treated like an error and we abandon what we were doing. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-07staging: gdm724x: cleanup long lines to conform to kernel coding styleEmil Gedda1-17/+10
Refactor code to remove multi-line derefs and code duplication Signed-off-by: Emil Gedda <emil.gedda@emilgedda.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-05staging: gdm724x: update HCI structs with new bitwise typesEric S. Stone3-39/+46
Update the driver's HCI structs and associated endian-converter functions with new driver-specific bitwise types. The new types encourage correct endian-handling within the driver by triggering sparse warnings when mixing with other types. The driver's endian-converters provide correct and warning-free conversions. Driver-specific bitwise types are used instead of the standard endian-specific types because the attached device can be of either endian. This is also why the driver has its own endian-conversion functions, which consider endianness of both the cpu and the attached device. Introducing the new types to the converters fixes the sparse warnings: CHECK drivers/staging/gdm724x/gdm_endian.c drivers/staging/gdm724x/gdm_endian.c:28:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:28:24: expected unsigned short drivers/staging/gdm724x/gdm_endian.c:28:24: got restricted __le16 [usertype] <noident> drivers/staging/gdm724x/gdm_endian.c:30:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:30:24: expected unsigned short drivers/staging/gdm724x/gdm_endian.c:30:24: got restricted __be16 [usertype] <noident> drivers/staging/gdm724x/gdm_endian.c:36:24: warning: cast to restricted __le16 drivers/staging/gdm724x/gdm_endian.c:38:24: warning: cast to restricted __be16 drivers/staging/gdm724x/gdm_endian.c:44:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:44:24: expected unsigned int drivers/staging/gdm724x/gdm_endian.c:44:24: got restricted __le32 [usertype] <noident> drivers/staging/gdm724x/gdm_endian.c:46:24: warning: incorrect type in return expression (different base types) drivers/staging/gdm724x/gdm_endian.c:46:24: expected unsigned int drivers/staging/gdm724x/gdm_endian.c:46:24: got restricted __be32 [usertype] <noident> drivers/staging/gdm724x/gdm_endian.c:52:24: warning: cast to restricted __le32 drivers/staging/gdm724x/gdm_endian.c:54:24: warning: cast to restricted __be32 Signed-off-by: Eric S. Stone <esstone@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: gdm724x: Remove one blank line in sequenceDawid Kurek1-1/+0
Remove one blank line in sequence of two empty lines. Signed-off-by: Dawid Kurek <dawikur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: gdm724x: Align parameters to parenthesisDawid Kurek2-8/+9
Align parameters to open parenthesis. Signed-off-by: Dawid Kurek <dawikur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: gdm724x: Remove unnecessary blank lineRehas Sachdeva1-1/+0
This patch fixes the checkpatch.pl warning: CHECK: Please don't use multiple blank lines Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-13staging: gdm724x: Add spaces around the '*' operatorsayli karnik2-5/+5
This patch fixes the checkpatch.pl warning: Spaces required around the '*' operator. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12staging: gdm724x: gdm_lte: Constify gdm_netdev_opsImre Deak1-1/+1
Fix the following checkpatch.pl warning: WARNING: struct net_device_ops should normally be const +static struct net_device_ops gdm_netdev_ops = { Signed-off-by: Imre Deak <imre.deak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21Staging: gdm724x: gdm_tty: Fixed a checkpatch check issue.Samuele Baisi1-1/+0
Removed a blankline after an opening bracket. Signed-off-by: Samuele Baisi <ciccio87@gmail.com> Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: gdm724x: Replace semaphore netlink with mutexBinoy Jayan1-10/+1
Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: gdm724x: gdm_usb: Remove ignored valueLuis de Bethencourt1-4/+4
The value assigned to ret will be overwritten before it could be read in a future iteration of the loop. Removing the unnecessary assignment. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging/gdm724x: fix "alignment should match open parenthesis" issuesBruno Carvalho2-3/+5
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Bruno Carvalho <brunocarvalhofarias@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging/gdm724x: Fix avoid CamelCaseBruno Carvalho2-4/+4
Fix checkpatch issues: "CHECK: Avoid CamelCase" Signed-off-by: Bruno Carvalho <brunocarvalhofarias@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05Staging: gdm724x: Replace random_ether_addr with eth_random_addrBhumika Goyal1-1/+1
The macro random_ether_addr is calling the function eth_random_addr. Therefore, the call to random_ether_addr can be replaced with eth_random_addr. Done using coccinelle: @@ expression addr; @@ - random_ether_addr(addr); + eth_random_addr(addr); Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05Staging: gdm724x: Use min instead of ternary operatorBhumika Goyal1-1/+1
This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05staging: gdm724x: gdm_usb: Remove create_workqueue()Amitoj Kaur Chawla1-26/+8
With concurrency managed workqueues, use of dedicated workqueues can be replaced by using system_wq. Drop usb_tx_wq and usb_rx_wq by using system_wq. Since there are multiple work items per udev but different udevs do not need to be ordered, increase of concurrency level by switching to system_wq should not break anything. cancel_work_sync() is used to ensure that work is not pending or executing on any CPU. Lastly, since all devices are suspended, which shutdowns the work items before the driver can be unregistered, it is guaranteed that no work item is pending or executing by the time exit path runs. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: gdm724x: gdm_mux: Remove create_workqueue()Amitoj Kaur Chawla1-15/+3
With concurrency managed workqueues, use of dedicated workqueues can be replaced by using system_wq. Drop mux_rx_wq by using system_wq. Since there is only one work item per mux_dev and different mux_devs do not need to be ordered, increase of concurrency level by switching to system_wq should not break anything. cancel_work_sync() is used to ensure that work is not pending or executing on any CPU. Lastly, since all devices are suspended, which shutdowns the work item before the driver can be unregistered, it is guaranteed that no work item is pending or executing by the time exit path runs. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: gdm724x: Remove unneeded parenthesesJanani Ravichandran1-3/+3
Remove parentheses around the right hand side of assignment statements as they are not needed. Semantic patch: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-26staging: gdm724x: constify tty_port_operations structsAya Mahfouz1-1/+1
Constifies tty_port_operations structure in the tty code of the gdm724x driver since it is not modified after its initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: gdm724x: Remove wrapper functionAmitoj Kaur Chawla3-7/+1
Remove wrapper function that can be replaced by a single line of code. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>