Commit graph

18 commits

Author SHA1 Message Date
Ben Chan a8a175d9fc staging: gdm72xx: clean up endianness conversions
This patch cleans up the endianness conversions in the gdm72xx driver:
- Directly use the generic byte-reordering macros for endianness
  conversion instead of some custom-defined macros.
- Convert values on the constant side instead of the variable side when
  appropriate.
- Add endianness annotations.

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:49:16 -07:00
Ben Chan c047b443ac staging: gdm72xx: use lower case for variable names for consistency
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:41:04 -07:00
Ben Chan e60cc3bd45 staging: gdm72xx: use int instead of u32 whenever makes sense
This patch addresses the following issues:
- Use int instead of u32 whenever makes sense
- Turn extract_qos_list() in gdm_qos.c, which previously always returned
  0, into a void function.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:41:04 -07:00
Ben Chan 8fea7d0944 staging: gdm72xx: use bool instead of custom-defined BOOLEAN
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29 14:41:04 -07:00
Davide Gianforte a3709f7a14 staging: gdm72xx: code cleanup
Checkpatch.pl cleanup

Thanks again to Greg KH and Dan Carpenter for the patience :)

Signed-off-by: Davide Gianforte <davide@gengisdave.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 07:23:15 +09:00
Michalis Pappas ac1a3bfafb staging: gdm72xx: Indentation and other whitespace fixes
Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-16 12:12:52 -07:00
Michalis Pappas 39c511f8cb staging: gdm72xx: Whitespace fixes to conform to coding standards
Fixes the following checkpatch.pl issues:

WARNING: unnecessary whitespace before a quoted newline
CHECK: Alignment should match open parenthesis
CHECK: No space is necessary after a cast

Also some additional, whitespace related, readability issues.

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-16 12:12:52 -07:00
Michalis Pappas 633c8a2fc9 staging: gdm72xx: Fix some camel-case variables
Fixes the following checkpatch.pl issue:

CHECK: Avoid CamelCase:

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-16 12:12:51 -07:00
Michalis Pappas baad5ee108 staging: gdm72xx: Modify a struct allocation to match coding standards
Fixes the following checkpatch.pl issue:

CHECK: Prefer kmalloc(sizeof(*entry)...) over kmalloc(sizeof(struct qos_entry_s)...)

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-16 12:12:51 -07:00
Masanari Iida 0f4a97f51e staging: gdm72xx: Fix WARNING space prohibited before semicolon in gdm_qos.c
Fixed WARNING: space prohibited before semicolon
found by checkpatch.pl in gdm_qos.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 09:50:11 -08:00
Dan Carpenter f2a6fed1ce staging: gdm72xx: potential use after free in send_qos_list()
Sometimes free_qos_entry() sometimes frees its argument.  I have moved
the dereference of "entry" ahead on line to avoid a use after free.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 15:08:50 -07:00
Peter Huewe d38529100d staging/gdm72xx: Remove duplicated code in gdm_qos.c
The first branch of the if statement is ended with a return thus there
is no need for an else if, and thus we can move the duplicated code to
the top and use it for the other two branches.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:25:54 -07:00
Peter Huewe eb986df15c staging/gdm72xx: Remove unused variable in gdm_qos.c
len is never read after assignment, thus can be removed.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:25:54 -07:00
YAMANE Toshiaki 2d8390223a staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 10:33:51 -07:00
Macpaul Lin 13b2663c95 staging/gdm72xx: remove camel-case vars in gdm_qos
Remove camel-case variables in gdm_qos.h and gdm_qos.c

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:09:31 -07:00
Devendra Naga 9b90b712c9 staging/gdm72xx: coding style fixes gdm_qos.c
following warnings were fixed

drivers/staging/gdm72xx/gdm_qos.c:198: ERROR: "foo* bar" should be "foo *bar"
drivers/staging/gdm72xx/gdm_qos.c:198: ERROR: "foo* bar" should be "foo *bar"
drivers/staging/gdm72xx/gdm_qos.c:244: WARNING: quoted string split across lines

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:53:47 -07:00
Devendra Naga 02fd3b3670 staging/gdm72xx: Remove version.h includes
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Sage Ahn 247e9cffdc staging: gdm72xx: Add GCT GDM72xx WiMAX driver.
This patch provides the kernel driver for the GDM72xx WiMAX chips
developed by GCT Semiconductor, Inc., which enables mobile WiMAX
connection on the Linux host.

Signed-off-by: Sage Ahn <syahn@gctsemi.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15 08:49:35 -07:00