Commit Graph

251 Commits

Author SHA1 Message Date
Xenia Ragiadakou 53c7f3cdba rtl8192u: fix whitespace around 'while' in r8192U_core.c
This patch fixes whitespace around 'while' following
the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 212bff38c9 rtl8192u: fix whitespace around 'for' in r8192U_core.c
This patch fixes whitespace around 'for' following the
kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:34:32 -07:00
Xenia Ragiadakou 34fc438a09 rtl8192u: fix whitespace around 'if' in r8192U_core.c
This patch fixes whitespace around 'if' following the
kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:33:14 -07:00
Xenia Ragiadakou 4b150936ea rtl8192u: fix whitespace around ~ in r8192U_core.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:44:49 -07:00
Xenia Ragiadakou ad6384591f STAGING: rtl8192u: fix checkpatch error by adding space after switch
This patch fixes the following checkpatch error:
ERROR: space required before the open parenthesis '('

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:17:58 -07:00
Xenia Ragiadakou 9f7b830033 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_core.c
This patch fixes the pointer position in r8192U_core.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-12 08:42:50 -07:00
Al Viro bae301d346 staging: single_open() leaks
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-05 00:15:43 -04:00
David Howells 4a520d2769 proc: Supply an accessor for getting the data from a PDE's parent
Supply an accessor function for getting the private data from the parent
proc_dir_entry struct of the proc_dir_entry struct associated with an inode.

ReiserFS, for instance, stores the super_block pointer in the proc directory
it makes for that super_block, and a pointer to the respective seq_file show
function in each of the proc files in that directory.

This allows a reduction in the number of file_operations structs, open
functions and seq_operations structs required.  The problem otherwise is that
each show function requires two pieces of data but only has storage for one
per PDE (and this has no release function).

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: Maxim Mikityanskiy <maxtram95@gmail.com>
cc: YAMANE Toshiaki <yamanetoshi@gmail.com>
cc: linux-wireless@vger.kernel.org
cc: linux-scsi@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:42 -04:00
David Howells cc87e0fff1 rtl8192u: Don't need to save device proc dir PDE
Don't need to save the PDE of a directory created under /proc/net/rtl8192/ as
we can use proc subtree deletion to get rid of it and all its children.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: linux-wireless@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:41 -04:00
David Howells 270b5ac215 proc: Add proc_mkdir_data()
Add proc_mkdir_data() to allow procfs directories to be created that are
annotated at the time of creation with private data rather than doing this
post-creation.  This means no access is then required to the proc_dir_entry
struct to set this.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Neela Syam Kolli <megaraidlinux@lsi.com>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: linux-scsi@vger.kernel.org
cc: devel@driverdev.osuosl.org
cc: linux-wireless@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01 17:29:41 -04:00
David Howells 0541f9d08a rtl8192u: Don't use create_proc_read_entry()
Don't use create_proc_read_entry() as that is deprecated, but rather use
proc_create_data() and seq_file instead.  Whilst we're at it, reduce the
number of show functions where we can share them.

Note: proc_get_stats_ap() should probably use seq_file iteration rather than
list_for_each_entry().

Further note: There appears to be a lot of locking missing in this file to
defend against concurrent access by the driver doing normal operations.
Notably, ieee->network_list traversal and RWCAM/RCAMO command/response access.
Further, do any of the registers read have side effects upon reading?

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: Mauro Carvalho Chehab <mchehab@redhat.com>
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: linux-wireless@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-29 15:41:50 -04:00
Patrik Karlin 666b3bf2f1 staging: rtl8192u: fixed coding style issues in r8192U_core.c
This patch fixes some coding style issuses in r8192U_core.c
No logic is changed

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Patrik Karlin 29b48ae391 staging: rtl8192u: removed some non used else's
This patch removes some else blocks that has no function in the
code

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Patrik Karlin f00c493b51 staging: rtl8192u: fixed some coding style issues in r8192U_core.c
This patch fixes some coding style issues. in r8192U_core.c
No logic is changed.

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11 16:37:11 -08:00
Sebastian Hahn de13a3dad6 staging/rtl8192u: do not init statics to 0
Fix the checkpatch error "do not initialize statics to 0 or NULL"

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:41 -08:00
Sebastian Hahn 24fbe87525 staging/rtl8192u: use same indent for switch and case
Fix the checkpatch error "switch and case should be at the same indent"

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:41 -08:00
Sebastian Hahn fdc64a9eda staging/rtl8192u: indent with tabs, not spaces
Converted staging/rtl8187se to use tabs instead of spaces for
indentation to fix the checkpatch error "code indent should use tabs
where possible".

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:40 -08:00
Jennifer Naumann 0db7a34e6c staging/rtl8192u: put { on same line as struct
This fixes the checkpatch error "open brace '{' following struct go on the
same line" in staging/rtl8192u

Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:40 -08:00
Sebastian Hahn 35997ff0ca staging/rtl8192u: cleanfile run
Run cleanfile on all files inside drivers/staging/rtl819u

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:52:58 -08:00
Bill Pemberton a4a557e3d4 staging: rtl8192u: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:43 -08:00
Bill Pemberton 2579452a6d staging: rtl8192u: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:42 -08:00
Peter Senna Tschudin 2e464f0068 drivers/staging/rtl8192u/r8192U_core.c: Remove useless kfree
Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
Devendra Naga b7553423cd staging: rtl8192u: use kzalloc to allocate firmware pointer
the firmware pointer is allocated with kmalloc and memset,
instead we can just do a kzalloc which will return a memory that
has been memset.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:09:02 -07:00
Justin P. Mattock 8ef3a7ed35 staging:rtl8192u Fix typos and comments
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:50:58 -07:00
Justin P. Mattock 589b3d06fd staging: rtl8192u Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-30 10:48:48 -04:00
Martin Krause 07b99cf55c Staging: rtl8712/rtl8192u: move USB device ID within staging drivers.
It seems the USB device ID 0bda:8192 is wrongly assigned to the
RTL8192SU chip and not to the RTL8191SU chip in the USB database.
So this patch moves this device ID from the rtl8192u staging
driver to the rtl8712 staging driver.

This patch was tested with a Radicom WIFIHU embedded wireless
module with a RTL8191SU chip and the USB device ID 0bda:8192.
Without the patch the rtl8192u driver claims this device, but
it does not work. With the patch the rtl8712 driver services
this device and it works.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:36:38 -08:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Linus Torvalds 1380516599 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits)
  staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
  staging:iio:kfifo_buf fix double initialization of the ring device structure.
  staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata.
  staging:iio:imu fix missing register table index for some channels
  spectra: enable device before poking it
  staging: rts_pstor: Fix a miswriting
  staging/lirc_bt829: Return -ENODEV when no hardware is found.
  staging/lirc_parallel: remove pointless prototypes.
  staging/lirc_parallel: fix panic on rmmod
  staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata.
  Staging: zram: Fix kunmapping order
  Revert "gma500: Fix dependencies"
  gma500: Add medfield header
  gma500: wire up the mrst i2c bus from chip_info
  gma500: Fix DPU build
  gma500: Clean up the DPU config and make it runtime
  gma500: resync with Medfield progress
  gma500: Use the mrst helpers and power control for mode commit
  gma500@ Fix backlight range error
  gma500: More Moorestown muddle meddling means MM maybe might modeset
  ...

Fix up fairly trivial conflicts all over, mostly due to header file
cleanup conflicts, but some deleted files and some just context changes:
 - Documentation/feature-removal-schedule.txt
 - drivers/staging/bcm/headers.h
 - drivers/staging/brcm80211/brcmfmac/dhd_linux.c
 - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
 - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
 - drivers/staging/brcm80211/brcmfmac/wl_iw.c
 - drivers/staging/et131x/et131x_netdev.c
 - drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
 - drivers/staging/rtl8192e/r8192E.h
 - drivers/staging/usbip/userspace/src/utils.h
2011-07-25 23:26:34 -07:00
Al Viro e55d92b92d get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-07-24 10:12:33 -04:00
Wanlong Gao 2e8b6b4785 drivers:rtl8192u:remove the use of obsolete create_workqueue in r8192U_core.c
Remove the use of obsolete create_workqueue(name, 0) interface
in r8192U_core.c, since it has changed.

Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:19:40 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Ilia Mirkin e72714fb20 staging: rtl8192u: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:35 -07:00
David Chosrova b834517572 Staging: rtl8192u: check return code kmalloc.
This patch checks the return code of  kmalloc when trying to allocate
memory for priv->rx_urb in rtl8192_usb_initendpoints(), return -ENOMEM
when failed.

Signed-off-by: David Chosrova <david.chosrova@libertysurf.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01 14:53:34 -08:00
David Chosrova 0e7a3e7a74 Staging: rtl8192u: remove dead code to disable dot11d
This patch removes all the ENABLE_DOT11D ifdefs.
It is always defined for driver. DOT11D has to do with regulatory domains.

What prompted this patch was a warning message in Sparse.

drivers/staging/rtl8192u/r8192U_core.c:247:1: warning: "eqMacAddr"
redefined in file included from drivers/staging/rtl8192u/:81:81:
drivers/staging/rtl8192u/dot11d.h:35:1: warning: this is the location
of the previous definition

Now there are no ifdefs around dot11d.h it made no sense to have this
second definition, so I removed that macro as well. ( Thanks Dan ;-) ).

Acked-by. Dan Carpenter <error27@gmail.com>
Signed-off-by: David Chosrova <dada2372@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01 14:51:16 -08:00
Joe Perches 859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Uwe Kleine-König af02b584bc Staging: trivial: fix typos concerning "controller"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:17:18 -08:00
Vasiliy Kulikov 2fac6c290f staging: rtl8192u: improve error path
Functions alloc_ieee80211 and register_netdev may fail. Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:50 -07:00
Uwe Kleine-König 9b0131cb24 staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:23:26 -07:00
Greg Kroah-Hartman e9563355ac Staging: Merge staging-next into Linus's tree
Conflicts:
	drivers/staging/Kconfig
	drivers/staging/batman-adv/bat_sysfs.c
	drivers/staging/batman-adv/device.c
	drivers/staging/batman-adv/hard-interface.c
	drivers/staging/cx25821/cx25821-audups11.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-05 14:18:03 -07:00
Ben Hutchings e10ac15582 Staging: rtl8192u_usb: Add LG device ID 043e:7a01
Add another device ID as listed in the vendor driver version
0003.0825.2009.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Mike Gilks 616f58f6ec staging: rtl8192u: fix checkpatch.pl issues to line 514
Fixed most problems pointed out by checkpatch.pl in file r8192U_core.c
up to line 500

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 16:49:02 -07:00
Julia Lawall 7a6cb0d549 Staging: Use kcalloc or kzalloc
Use kcalloc or kzalloc rather than the combination of kmalloc and memset.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,y,flags;
statement S;
type T;
@@

x =
-   kmalloc
+   kcalloc
           (
-           y * sizeof(T),
+           y, sizeof(T),
                flags);
 if (x == NULL) S
-memset(x, 0, y * sizeof(T));

@@
expression x,size,flags;
statement S;
@@

-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
 if (x == NULL) S
-memset(x, 0, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
2010-05-14 14:02:56 -07:00
Julia Lawall 324148788b Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
@@

- (T *)
  (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
   kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 16:06:48 -07:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Németh Márton a457732b83 staging: make USB device id constant
The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Adam Buchbinder 39cfb97b0d staging: Fix misspelling of "should" and "shouldn't" in comments.
Some comments misspell "should" or "shouldn't"; this fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:31 -08:00
Joe Perches 0ee9f67c40 Staging: rtl8187x: Use %pM for mac address output
Uncompiled.  Doesn't currently build anyway.

Converted MAC_FMT to %pM
Converted some %02x%02x%02x%02x%02x%02x to %pm
Converted MAC_ARG to direct use
Removed MAC_FMT and MAC_ARG macros

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:29 -08:00
Mauro Carvalho Chehab 50a09b3b09 Staging: rtl8192u: remove dead code
Remove #ifse against older kernel versions;
Remove codes marked with #if 0;
Remove #if 1

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Mauro Carvalho Chehab e406322b4b Staging: rtl8192u: remove bad whitespaces
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Mauro Carvalho Chehab f61fb9356d Staging: rtl8192u: make it compile
Add it to staging Kbuild and fixes some API differences that prevents
compilation.

It seems that the ieee80211 stack is very close to rtl8192su one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Jerry Chuang 8fc8598e61 Staging: Added Realtek rtl8192u driver to staging
Add Realtek linux driver for rtl8192u as provided by Realtek

rtl8192u_linux_2.6.0006.1031.2008.tar.gz, send to me C/C staging ML.

This version won't compile against upstream, doesn't follow
Linux CodingStyle and has their own ieee80211 stack.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00