Commit graph

26 commits

Author SHA1 Message Date
Bhumika Goyal
4e4acff734 Staging: gdm724x: Replace random_ether_addr with eth_random_addr
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-05 14:48:04 -08:00
Janani Ravichandran
e3b07865f5 staging: gdm724x: Remove unneeded parentheses
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>
2016-02-11 20:00:30 -08:00
Amitoj Kaur Chawla
ca3fde19d4 staging: gdm724x: Remove wrapper function
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>
2015-11-15 20:02:47 -08:00
Ioana Ciornei
ba7f55b705 staging: gdm724x: add spaces around binary operators
This patch add spaces around binary operators in order
to follow kernel coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Ioana Ciornei
b6f6fd8a87 stating: gdm724x: remove explicit NULL comparison
This patch converts explicit NULL comparison to its shorter
equivalent form.
Done with coccinelle semantic patch:

@@
expression e;
@@

- e == NULL
+ !e

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Ioana Ciornei
a4785ef810 staging: gdm724x: properly indent to match open paranthesis
Indent parameters and arguments passed to function calls to match
open paranthesis

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Shraddha Barke
2594ca30c0 Staging: gdm724x: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.

Semantic patch:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:51:48 -07:00
Somya Anand
9d877fdbf3 staging: gdm724x: use !x instead of x == NULL
Functions like devm_kzalloc, kmalloc_array, devm_ioremap,
usb_alloc_urb, alloc_netdev return NULL as a return value on failure.
Generally, When NULL represents failure, !x is commonly used.

This patch cleans up the tests on the results of these functions, thereby
using !x instead of x == NULL or NULL == x. This is done via following
coccinelle script:
@prob_7@
identifier x;
statement S;
@@

(
 x = devm_kzalloc(...);
|
 x = usb_alloc_urb(...);
|
 x = kmalloc_array(...);
|
 x = devm_ioremap(...);
|
 x = alloc_netdev(...);
)
 ...
- if(NULL == x)
+ if(!x)
	S
Further we have used isomorphism characteristics of coccinelle to
indicate x == NULL and NULL == x are equivalent. This is done via
following iso script.

Expression
@ is_null @ expression X; @@
X == NULL <=> NULL == X

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:28:47 +01:00
Ning Zhou
59215e694f staging: gdm724x: fix line limit coding style issue in gdm_lte.c
This is a patch to fix "WARNING: line over 80 characters" found by
checkpatch.pl in gdm_lte.c.

Signed-off-by: Ning Zhou <zhou.ning.gd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:57:43 -08:00
Dilek Uzulmez
3995213419 staging: gdm724x: Fix warning of prefer ether_addr_copy.
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file gdm_lte.c
Pahole shows that the addresses are aligned.

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:18 +08:00
Linus Torvalds
ae045e2455 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "Highlights:

   1) Steady transitioning of the BPF instructure to a generic spot so
      all kernel subsystems can make use of it, from Alexei Starovoitov.

   2) SFC driver supports busy polling, from Alexandre Rames.

   3) Take advantage of hash table in UDP multicast delivery, from David
      Held.

   4) Lighten locking, in particular by getting rid of the LRU lists, in
      inet frag handling.  From Florian Westphal.

   5) Add support for various RFC6458 control messages in SCTP, from
      Geir Ola Vaagland.

   6) Allow to filter bridge forwarding database dumps by device, from
      Jamal Hadi Salim.

   7) virtio-net also now supports busy polling, from Jason Wang.

   8) Some low level optimization tweaks in pktgen from Jesper Dangaard
      Brouer.

   9) Add support for ipv6 address generation modes, so that userland
      can have some input into the process.  From Jiri Pirko.

  10) Consolidate common TCP connection request code in ipv4 and ipv6,
      from Octavian Purdila.

  11) New ARP packet logger in netfilter, from Pablo Neira Ayuso.

  12) Generic resizable RCU hash table, with intial users in netlink and
      nftables.  From Thomas Graf.

  13) Maintain a name assignment type so that userspace can see where a
      network device name came from (enumerated by kernel, assigned
      explicitly by userspace, etc.) From Tom Gundersen.

  14) Automatic flow label generation on transmit in ipv6, from Tom
      Herbert.

  15) New packet timestamping facilities from Willem de Bruijn, meant to
      assist in measuring latencies going into/out-of the packet
      scheduler, latency from TCP data transmission to ACK, etc"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits)
  cxgb4 : Disable recursive mailbox commands when enabling vi
  net: reduce USB network driver config options.
  tg3: Modify tg3_tso_bug() to handle multiple TX rings
  amd-xgbe: Perform phy connect/disconnect at dev open/stop
  amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
  net: sun4i-emac: fix memory leak on bad packet
  sctp: fix possible seqlock seadlock in sctp_packet_transmit()
  Revert "net: phy: Set the driver when registering an MDIO bus device"
  cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine
  team: Simplify return path of team_newlink
  bridge: Update outdated comment on promiscuous mode
  net-timestamp: ACK timestamp for bytestreams
  net-timestamp: TCP timestamping
  net-timestamp: SCHED timestamp on entering packet scheduler
  net-timestamp: add key to disambiguate concurrent datagrams
  net-timestamp: move timestamp flags out of sk_flags
  net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
  cxgb4i : Move stray CPL definitions to cxgb4 driver
  tcp: reduce spurious retransmits due to transient SACK reneging
  qlcnic: Initialize dcbnl_ops before register_netdev
  ...
2014-08-06 09:38:14 -07:00
Tom Gundersen
c835a67733 net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.

Coccinelle patch:

@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@

(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)

v9: move comments here from the wrong commit

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-15 16:12:48 -07:00
Scott Weir
4e13d410e6 staging: gdm724x: Added blank lines after declarations in gdm_lte.c
This patch fixes following checkpatch.pl warning:
WARNING: Missing a blank line after declarations in gdm_lte.c

Signed-off-by: Scott Weir <sjw0410@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:33:44 -07:00
Monam Agarwal
a28bfd11ed Staging: gdm724x: Fix unchecked sscanf values in gdm_lte.c
This patch fixes following checkpatch.pl warning:
WARNING: unchecked sscanf value in gdm_lte.c

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:35:53 -07:00
Gulsah Kose
097b4d8ce2 staging: gdm724x: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in gdm_lte.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:37:04 -07:00
Rashika Kheria
a23bb460aa Staging: gdm724x: Remove confusing macro gdm_lte_sdu_send in gdm_lte.c
This patch removes confusing macro gdm_lte_sdu_send as stated in TODO list
in file gdm_lte.c. It then fixes the place where the macro is used.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:55:16 -08:00
Rashika Kheria
abb40c11c4 Staging: gdm724x: Remove confusing macro gdm_lte_hci_send in gdm_lte.c
This patch removes confusing macro gdm_lte_hci_send as stated in TODO list
in file gdm_lte.c. It then fixes the place where the macro is used.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:22:34 -08:00
Rashika Kheria
04db9c6a2d Staging: gdm724x: Remove confusing macro gdm_dev_endian in gdm_lte.c
This patch removes confusing macro gdm_dev_endian as stated in TODO list
in file gdm_lte.c. It then fixes the place where the macro is used.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:22:34 -08:00
Rashika Kheria
4ed7eeceb5 Staging: gdm724x: Remove confusing macro gdm_lte_rcv_with_cb in gdm_lte.c
This patch removes confusing macro gdm_lte_rcv_with_cb as stated in TODO list
in file gdm_lte.c. It then fixes the place where the macro is used.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:22:34 -08:00
Valentina Manea
ff52b8fe2b staging: gdm724x: Fix sparse warnings regarding static functions/variables
This fixes sparse warnings for functions and variables, e.g.:
* drivers/staging/gdm724x/gdm_mux.c:29:25: warning: symbol
'mux_rx_wq' was not declared. Should it be static?

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:09:57 -07:00
Masanari Iida
26085a70b3 staging: gdm724x: Fix typo in comments
Correct spelling typo in comments within staging/gdm724x

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:01:43 -07:00
Wei Yongjun
485754f5cc staging: gdm724x: remove duplicated include from gdm_lte.c
Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29 11:29:37 -07:00
Sachin Kamat
1bf4d4860e staging: gdm724x: Remove version.h header inclusion in gdm_lte.c
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25 12:11:57 -07:00
Greg Kroah-Hartman
8e24a32ed1 staging: gdm724x: remove ioctl call
This isn't needed, userspace can trigger off of the device id if they
need to do something "special" for different devices in special modes
depending on the device's endian issues.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25 09:37:21 -07:00
Joe Perches
0ec473b526 staging: gdm724x: Update logging
Make the logging prefixes match the module names
by adding #define pr_fmt(fmt) KBUILD_MODNAME and
converting printks to netdev_<level> when a
struct netdevice * is available and and pr_<level>
when not.

Remove embedded prefixes.
Add missing terminating newlines.
Remove an unnecessary rx-dropped message.
Remove an unnecessary temporary variable.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 15:11:20 -07:00
Won Kang
61e1210476 staging: gdm7240: adding LTE USB driver
GCT Semiconductor GDM7240 is 4G LTE chip.
This driver supports GCT reference platform as a USB device.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24 13:09:44 -07:00