History log of /drivers/staging/usbip/stub_main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
737912e11bf5bd4874acc771d8511a6eab891fc5 25-Jan-2012 Bart Westgeest <bart@elbrys.com> staging: usbip: fix to prevent potentially using uninitialized spinlock

The stub_probe function can be called as soon as the stub_driver is
registered. This can lead to the busid_table_lock being used before it
is initialized. Moved calling the init_busid_table function (which
initalizes this spinlock) to be called earlier in the init function to
prevent this from happening.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/staging/usbip/stub_main.c
99c978529a40132a6f7a5f136b4362b56fc88d8c 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> staging: Add module.h to drivers/staging users

Lots of people expect module.h to just "be there" without
any #include effort. But we are crushing that. So fix those
files in staging relying on implicit module.h presence.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
0a186be35963bd9bc4c148554188e927578115b0 27-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: simplify busid_table initialization

Set the whole structure to zero instead of individually setting each
member, which simplifies the for loop.

This was suggested by walter harms <wharms@bfs.de>.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
7d4de89f1965ec21a8c0b8de0cfbdd57094a2686 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: use KMEM_CACHE macro

Change kmem_cache_create() to the KMEM_CACHE() macro.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
27ed5da0b626680ddc1670e7b6cc106472ac14c4 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: rename init and exit functions

Change the prefix of the __init and __exit functions to usbip_host_ to
correspond with the modules name.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
41e02f011648b9b338d3dc1121eb3da9cfbf312c 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: code cleanup

Remove match_find() and replace with get_busid_idx(); change
get_busid_priv(), add_match_busid(), and del_match_busid() to use
get_busid_idx(); and cleanup code in the other functions.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
efad25e9a34d25c1c2469aa81ae1418ca1f26942 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: reorder functions

Reorder functions so sysfs_ops, show() and store(), are adjacent, and
init_busid_table() is at the beginning of the file.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
87352760173082c2a774f83dc6fe826fdbf219c0 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: remove unnecessary lines and extra return statements

Also, fix a few alignment issues that were originally missed.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
1a4b6f66285785ddccef049e6b45be4e7c7a2189 20-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_

This switches all of the usbip_u{dbg,err,info} and printk statements to
dev_<level>, if possible, or pr_<level> macros. And removes a few
unnecessary debug statements.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
64e62426f40d1017a7ced93ee71d333529196365 12-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: edit Kconfig and rename CONFIG options

Change modules usbip_common_mod to usbip-core and usbip to usbip-host;
edit configuration option help text; rename CONFIG options to use a
USBIP prefix and change COMMON to CORE in both the Kconfig and
Makefiles; edit the menu entries; and edit the driver descriptions.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
7aaacb43ed97714ff0f7f77f306f24b6e564ad03 12-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: fix header includes

Modify header directives to include what is needed by each file and
not already included in its own header.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
6973c6f24e105f1bdf811ec2320d2de8798145ee 11-May-2011 matt mooney <mfmooney@gmail.com> staging: usbip: use single version for all modules

Having separate versions in this situation makes little sense, so
USBIP_VERSION will be used by all modules.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
4ce0a41f1054b58801f7e14f5036cf27a75152e2 06-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: fixup MODULE_ macros

Modify description and email address for usbip_common_mod; export
module version number; and modify __init messages slightly.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
6a298401fcdefdbff734b137c1b67df9d5849103 06-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: remove section dividers

Also, removes the one-line comments that were associated with some of
the dividers because they provided no additional information.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
6c033b46ce3a7820d567fdb6e03128ca75468d11 06-May-2011 matt mooney <mfm@muteddisk.com> staging: usbip: stub_main.c: coding style cleanup

Fix alignment for consistency and remove extraneous lines.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
06dde506203147e8d245a505d491c40254561f17 13-Mar-2011 Ilia Mirkin <imirkin@alum.mit.edu> staging: usbip: 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>
/drivers/staging/usbip/stub_main.c
aa5873e96271611ae55586f65e49ea1fab90cb88 27-Jul-2010 Endre Kollar <taxy443@gmail.com> Staging: usbip: fix multiple interfaces

The stub_probe function instantiates an stub_dev object for all
interfaces. Wich causes a problem. The stub_dev object belongs to their
own interfaces. This patch creates the sdev object at the first
stub_probe call, the other calls associate the interfaces to this.

Signed-off-by: Endre Kollar <taxy443@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> 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>
/drivers/staging/usbip/stub_main.c
b8868e45c5f8956d57ba489df3ebd24e3f858684 21-Jul-2009 Brian G. Merrell <bgmerrell@novell.com> Staging: USB-IP code cleanup

This includes fixes for all of the legit checkpatch.pl errors and
warnings. I have also included several of the suggestions from the
linux-kernel mailing list when the USB-IP code was first added.

Signed-off-by: Brian G. Merrell <bgmerrell@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
e913397202b7551299da20fc8cf7b90c46f61ba3 30-Oct-2008 Kay Sievers <kay.sievers@vrfy.org> staging: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c
4d7b5c7f8ad49b7f01fb8aed83c560ac43cfbda8 09-Jul-2008 Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Staging: USB/IP: add host driver

This adds the USB IP client driver

Brian Merrell cleaned up a lot of this code and submitted it for
inclusion. Greg also did a lot of cleanup.

Signed-off-by: Brian G. Merrell <bgmerrell@novell.com>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/staging/usbip/stub_main.c