dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

38 Commits

Author SHA1 Message Date
Hank Janssen 3e18951955 staging: hv: Corrected all header comment formats kernel-doc format
Removed kerneldoc /** from functions that should not have them.
Added proper kerneldoc headers to functions that should have them.

This includes fixes as pointed out by Randy Dunlap and Joe Perches.

Cc: Joe Perches <joe@perches.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:32 -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
Jeff Mahoney 4439c93535 staging: Complete sched.h removal from interrupt.h
Commit d43c36dc removed sched.h from interrupt.h and distributed sched.h
to users which needed it. This finishes it up for staging.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:14:37 -07:00
Greg Kroah-Hartman 93b5c9e17a Staging: hv: osd.c: coding style fixes
Codingstyle fixes for osd.c

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:56 -07:00
Greg Kroah-Hartman 4983b39a06 Staging: hv: move osd.h
This moves osd.h out of the include/ subdirectory.

No code changes are made here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:56 -07:00
Greg Kroah-Hartman 45dcfb3809 Staging: hv: remove duplicated osd.o inclusions
Now that we have properly prefixed the osd.c functions, we don't need to
include it in each of the modules.  So only build it into the hv_vmbus
module.

Export the symbols that the other hv_ modules need, so that they can
properly find them.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman c8a429a465 Staging: hv: remove timer wrapper functions
Use a real timer (there's only one in the code), no wrapper is needed,
it just increases the complexity for no reason.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman bfc30aae73 Staging: hv: osd: add osd_ prefix to global functions
Put a "osd_" prefix on the osd.c functions in order for us to play nicer
in the kernel namespace.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman fa56d361b0 Staging: hv: osd: remove physical address wrapper functions
Use the real functions the kernel provides, so that people can see what
is actually going on in the code easier.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton 45da89e559 Staging: hv: remove wrapper functions around kmap_
Remove PageMapVirtualAddress() and PageUnmapVirtualAddress() which
were wrappers around kmap_atomic() and kunmap_atomic()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton b7c947f048 Staging: hv: remove wrapper function VirtualFree
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton f488841708 Staging: hv: remove wrapper functions for atomic operations
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton 7c369f405b Staging: hv: remove wrapper functions for bit operations
There were several Bit* functions that did nothing but call the kernel
functions with the parameters reversed.  Remove these and call the
functions directly.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton 420beac4fc Staging: hv: remove WaitEventClose()
All WaitEventClose() close did was call kfree(), so get rid of it and
replace it with a call to kfree()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton de65a38406 Staging: hv: rework use of workqueues in osd
Change the usage of workqueues to be consistant with other parts of
the kernel.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Greg Kroah-Hartman bd1de70916 Staging: hv: fix sparse static warnings
This fixes up all of the sparse warnings about static functions.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Bill Pemberton 06d2e318b7 Staging: hv remove TIMER typedef
Remove the TIMER typedef and also replace HANDLE types that use
the timer calls.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Bill Pemberton aedb444a57 Staging: hv: remove WAITEVENT typedef
Remove the WAITEVENT typedef and also replace HANDLE types that use
the WaitEvent calls with struct osd_waitevent.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Bill Pemberton df8d9b1f6d Staging: hv: Remove WORKQUEUE typedef
WORKQUEUE was a wrapper around struct workqueue_struct so just use
that instead.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton ed39aa6ac4 Staging: hv: Remove X2V_LINUX check
Remove preprocessor check for X2V_LINUX in osd.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Bill Pemberton 454f18a963 Staging: hv: Remove C99 comments
Remove C99 // comments with traditional /* */ comments

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Greg Kroah-Hartman d4923090c1 Staging: hv: osd: remove GetTickCount and GetTimestamp wrappers
No one was even using them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:49 -07:00
Greg Kroah-Hartman a14bd58cd3 Staging: hv: osd: remove LogMsg wrapper
Use the "real" printk call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman 28b6ca9c07 Staging: hv: osd: remove MemoryFence wrapper
Use the "real" mb call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman b4362c9c1f Staging: hv: osd: remove Sleep wrapper
Use the "real" udelay call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman 3bcfa88868 Staging: hv: osd: remove spinlock wrapper functions
Now that there are no users of the wrapper functions for spinlocks,
remove them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman 8c69f52ab3 Staging: hv: osd: remove MemFree wrapper
Use the "real" kfree call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman 0a72f3cf9f Staging: hv: osd: remove MemAllocAtomic wrapper
Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman e276a3a578 Staging: hv: osd: remove MemAllocZeroed wrapper
Use the "real" kzalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman e40d37cc00 Staging: hv: osd: remove MemAlloc wrapper
Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman 22ae0bea09 Staging: hv: remove #defines from osd.c
Remove the unneeded #defines from osd.c

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman 45635d9703 Staging: hv: remove SIZE_T typedef
The SIZE_T typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman c4b0bc9482 Staging: hv: remove ULONG_PTR typedef
The ULONG_PTR typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman 4d64311468 Staging: hv: remove UINT32 and INT32 typedefs
The UINT32 and INT32 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman e20f683b64 Staging: hv: remove VOID typedef
The VOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:45 -07:00
Greg Kroah-Hartman 8282c40014 Staging: hv: remove PVOID typedef
The PVOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:45 -07:00
Greg Kroah-Hartman 09d50ff8a2 Staging: hv: make the Hyper-V virtual bus code build
The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.

The hv_vmbus code should now build properly, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:44 -07:00
Hank Janssen 3e7ee4902f Staging: hv: add the Hyper-V virtual bus
This is the virtual bus that all of the Linux Hyper-V drivers use.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:43 -07:00