firefly-linux-kernel-4.4.55.git
15 years agoStaging: pohmelfs: fix printk format warnings v2
Alexander Beregalov [Fri, 13 Feb 2009 14:53:30 +0000 (17:53 +0300)]
Staging: pohmelfs: fix printk format warnings v2

drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: net.c: include vmalloc.h
Alexander Beregalov [Fri, 13 Feb 2009 14:35:32 +0000 (17:35 +0300)]
Staging: pohmelfs: net.c: include vmalloc.h

on Sparc64:
drivers/staging/pohmelfs/net.c:33: error: implicit declaration of function 'vmalloc'
drivers/staging/pohmelfs/net.c:42: error: implicit declaration of function 'vfree'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: fix build breakage
Alexander Beregalov [Fri, 13 Feb 2009 12:53:57 +0000 (15:53 +0300)]
Staging: pohmelfs: fix build breakage

drivers/staging/pohmelfs/inode.c:982: error: implicit declaration of
function 'DQUOT_TRANSFER'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: select crypto modules from the config.
Evgeniy Polyakov [Mon, 9 Feb 2009 21:30:15 +0000 (00:30 +0300)]
Staging: pohmelfs: select crypto modules from the config.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: kconfig/makefile and vfs changes.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:42 +0000 (17:02 +0300)]
Staging: pohmelfs: kconfig/makefile and vfs changes.

This patch adds Kconfig and Makefile entries and exports to
VFS functions to be used by POHMELFS.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: transaction layer.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:41 +0000 (17:02 +0300)]
Staging: pohmelfs: transaction layer.

This patch implements transaction processing helpers
used to allocate/free/insert/remove and other operations
with the transctions.

Each transction is an object, which may embed multiple commands
completed atomically. When server fails the whole transaction will be
replied against it (or different server) later. This approach allows to
maintain high data integrity and do not desynchronize filesystem state
in case of network or server failures.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: network operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:40 +0000 (17:02 +0300)]
Staging: pohmelfs: network operations.

This is a main network processing patch. It includes
both low-level socket machinery, zero-copy sending helpers,
receiving and parsing callbacks and mainly logical
commands handlers.

POHMELFS uses async network approach, when every command
can be separated from its answer and received after some
time after the request during which another lots of commands
can be injected into the network and replies to them received.

With read operation balancing between multiple hosts it is possible
that operations will arrive out of order and this is handled
by the transaction mechanism described partially here.

Having a transaction to guard the set of logically compound operations
allows to send data without thinking about its status and using
zero-copy sending mechanism, since transaction will receive explicit
acks from the servers when they are completed.

This patch also contains header with network srtuctures, commands
and short comments on how they are used.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: distributed locking and cache coherency protocol.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:39 +0000 (17:02 +0300)]
Staging: pohmelfs: distributed locking and cache coherency protocol.

POHMELFS utilizes writeback cache, which is built on top of MO(E)SI-like
coherency protocol. This patch includes its implementation and cache
object processing helpers (like allocation and completion callbacks).

POHMELFS uses scalable cached read/write locking. No additional requests
are performed if lock is granted to the filesystem. The same protocol
is used by the server to on-demand flushing of the client's cache (for
example when server wants to update local data).

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: inode operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:38 +0000 (17:02 +0300)]
Staging: pohmelfs: inode operations.

This is the main patch which implements inode operations
(like reading and writing) and superblock processing
(filesystem registration, initial autoconfiguration
with the server like permissions, size of the exported
dir, amount of the objects created and so on).

POHMELFS relies on system's writeback cache mechanism
shown here, as long as cache coherency protocol described
later.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: directory operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:37 +0000 (17:02 +0300)]
Staging: pohmelfs: directory operations.

This patch implementes all supported directory operations
like directory reading, object lookup, creation, removal
and so on.

Currently object removal is not optimized at all.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: crypto processing.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:36 +0000 (17:02 +0300)]
Staging: pohmelfs: crypto processing.

POHMELFS is able to encrypt the whole network channel or
attach the strong checksum to own packets to catch faulty media.

This patch implements crypto initialization, its autoconfiguration
and sync with the server.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: configuration interface.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:35 +0000 (17:02 +0300)]
Staging: pohmelfs: configuration interface.

This patch includes POHMELFS configuration interface based
on the netlink kernel connector. This interface allows to create
configuration groups in the kerenel indexed by mount ID option.

Each configuration group can include multiple servers to work
with and various operation parameters.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: documentation.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:34 +0000 (17:02 +0300)]
Staging: pohmelfs: documentation.

This patch includes POHMELFS design and implementation description.
Separate file includes mount options, default parameters and usage examples.

Signed-off-by: Eveniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: fix build dependancy
Evgeniy Polyakov [Mon, 19 Jan 2009 18:30:47 +0000 (21:30 +0300)]
Staging: DST: fix build dependancy

On Mon, Jan 19, 2009 at 10:12:24AM -0800, Randy Dunlap (randy.dunlap@oracle.com) wrote:
>
> DST build fails when CONFIG_BLOCK=n:

DST should depend on block and block device, in the original patch its
kconfig entry was in the BLK_DEV menu, so this dependency was satisfied
automatically. Should attached patch be pushed into drivers/staging?

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: Kconfig text update.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:38 +0000 (20:20 +0300)]
Staging: DST: Kconfig text update.

Kconfig help text update

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: Do not allow empty barriers.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:37 +0000 (20:20 +0300)]
Staging: DST: Do not allow empty barriers.

Do not allow empty barriers or generic_make_request() ->  scsi_setup_fs_cmnd()
will explode

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: extend thread pool exit conditions.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:35 +0000 (20:20 +0300)]
Staging: DST: extend thread pool exit conditions.

Added thread pool exit condition into the thread_pool_del_worker(). If
called in parallel another thread can steal

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: optimize bio allocation.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:36 +0000 (20:20 +0300)]
Staging: DST: optimize bio allocation.

Use bio prepend feature as suggested by Jens Axboe.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: kconfig update.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:09:43 +0000 (02:09 +0300)]
Staging: dst: kconfig update.

On Wed, Jan 14, 2009 at 02:05:33AM +0300, Evgeniy Polyakov (zbr@ioremap.net) wrote:
> --- /dev/null
> +++ b/drivers/staging/dst/Kconfig
> @@ -0,0 +1,71 @@
> +config DST
> + tristate "Distributed storage"
> + depends on NET && CRYPTO && SYSFS
> + select CONNECTOR
> + select LIBCRC32C

Above is not needed.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: kconfig and makefile changes.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:33 +0000 (02:05 +0300)]
Staging: dst: kconfig and makefile changes.

Signed-off-by: Evgeniy Polaykov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agostaging: dst: replace bus_id with dev_set_name
Greg Kroah-Hartman [Sun, 25 Jan 2009 18:05:08 +0000 (10:05 -0800)]
staging: dst: replace bus_id with dev_set_name

bus_id is going away, use the dev_set_name() function instead.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: crypto processing.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:32 +0000 (02:05 +0300)]
Staging: dst: crypto processing.

DST may fully encrypt the data channel in case of untrusted channel and implement
strong checksum of the transferred data. It is possible to configure algorithms
and crypto keys, they should match on both sides of the network channel.
Crypto processing does not introduce noticeble performance overhead, since DST
uses configurable pool of threads to perform crypto processing.

This patch introduces crypto processing helpers and crypto engine initialization:
glueing with the crypto layer, allocation and initialization of the crypto
processing thread pool, allocation of the cached pages, which are used to temporary
encrypt data into, since it is forbidden to encrypt data in-place, since pages
are used by the higher layers.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: transactions.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:31 +0000 (02:05 +0300)]
Staging: dst: transactions.

DST uses transaction model, when each store has to be explicitly acked
from the remote node to be considered as successfully written. There
may be lots of in-flight transactions. When remote host does not ack
the transaction it will be resent predefined number of times with specified
timeouts between them. All those parameters are configurable. Transactions
are marked as failed after all resends completed unsuccessfully, having
long enough resend timeout and/or large number of resends allows not to
return error to the higher (FS usually) layer in case of short network
problems or remote node outages. In case of network RAID setup this means
that storage will not degrade until transactions are marked as failed, and
thus will not force checksum recalculation and data rebuild. In case of
connection failure DST will try to reconnect to the remote node automatically.
DST sends ping commands at idle time to detect if remote node is alive.

Because of transactional model it is possible to use zero-copy sending
without worry of data corruption (which in turn could be detected by the
strong checksums though).

Transactions are handled in this patch: allocation/freeing/completion,
scanning for stall and to-be-resent transactions and overall management
of the storing tree.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: thread pool.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:30 +0000 (02:05 +0300)]
Staging: dst: thread pool.

Kernel currently does not allow to queue work into some entity which
will perform it in the process context and have simple way to extend
number of worker and work with them not as separate objects, but with
pool as a whole. So thread pool model was implemented in the DST.

Thread pool abstraction allows to schedule a work to be performed
on behalf of kernel thread. One does not operate with threads itself,
instead user provides setup and cleanup callbacks for thread pool itself,
and action and cleanup callbacks for each submitted work.

Each worker has private data initialized at creation time and data,
provided by user at scheduling time.

When action is being performed, thread can not be used by other users,
instead they will sleep until there is free thread to pick their work.

Thread pool is used for crypto processing of incoming and outgoing IO
requests to reduce the overall overhead.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: export node.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:29 +0000 (02:05 +0300)]
Staging: dst: export node.

This patch introduces remote (export) node machinery: initialization
address/port (and other socket parameters), export block device (can be
another DST storage for example or local device like /dev/sda1), local
IO processing engine (BIO state machines, receiving/submitting logic).
Network management for the export node like accepting new client, scheduling
its command processing thread, receiving/sending IO requests, all are placed
here.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: network state machine.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:28 +0000 (02:05 +0300)]
Staging: dst: network state machine.

Each DST device contains of two nodes: local and remote (called also as export node).
This patch contains local node processing engine: network state storage,
socket processing loops and state machine, socket polling machinery, reconnection
logic, send/receive basic helpers, related IO commands and so on.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: core files.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:27 +0000 (02:05 +0300)]
Staging: dst: core files.

This patch contains DST core files, which introduce
block layer, connector and sysfs registration glue and main headers.

Connector is used for the configuration of the node (its type, address,
device name and so on). Sysfs provides bits of information about running
devices in the following format:

+/*
+ * DST sysfs tree for device called 'storage':
+ *
+ * /sys/bus/dst/devices/storage/
+ * /sys/bus/dst/devices/storage/type : 192.168.4.80:1025
+ * /sys/bus/dst/devices/storage/size : 800
+ * /sys/bus/dst/devices/storage/name : storage
+ */

DST header contains structure definitions and protocol command description.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: frontier: Remove unused components of the alphatrack/tranzport sysfs interface.
David Täht [Tue, 20 Jan 2009 14:33:25 +0000 (08:33 -0600)]
Staging: frontier: Remove unused components of the alphatrack/tranzport sysfs interface.

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: frontier: Make checkpatch.pl happy with alphatrack.h
David Täht [Tue, 20 Jan 2009 14:33:24 +0000 (08:33 -0600)]
Staging: frontier: Make checkpatch.pl happy with alphatrack.h

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: frontier: Updated documentation
David Täht [Tue, 20 Jan 2009 14:33:23 +0000 (08:33 -0600)]
Staging: frontier: Updated documentation

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: frontier: removed now unused frontier_compat.h file
David Täht [Tue, 20 Jan 2009 14:33:22 +0000 (08:33 -0600)]
Staging: frontier: removed now unused frontier_compat.h file

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
index 00450e6..0000000

15 years agoStaging: frontier: Make checkpatch.pl much happier with alphatrack driver
David Täht [Tue, 20 Jan 2009 14:33:21 +0000 (08:33 -0600)]
Staging: frontier: Make checkpatch.pl much happier with alphatrack driver

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: frontier: Make checkpatch.pl considerably happier with tranzport driver.
David Täht [Tue, 20 Jan 2009 14:33:20 +0000 (08:33 -0600)]
Staging: frontier: Make checkpatch.pl considerably happier with tranzport driver.

Signed-off-by: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2870: Removal of kernel_thread() API
Peter Teoh [Fri, 20 Mar 2009 18:20:23 +0000 (02:20 +0800)]
Staging: rt2870: Removal of kernel_thread() API

Replacing the use of kernel_thread() with kthread_run().   But as
kthread_run() returned a task structure, as compared with
kernel_thread() returning a PID, it was found to be more efficient to
store the task structure pointer as a field data instead of PID
pointer.   On top of modifying the field to store task structure
pointer, the initialization of the field (assigned to
THREAD_PID_INIT_VALUE) was also found unnecessary - as no where it is
found to be used.

Signed-off-by: Peter Teoh <htmldeveloper@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2870: add Linksys WUSB600N device id
Josef Jiru [Wed, 11 Mar 2009 14:50:48 +0000 (15:50 +0100)]
Staging: rt2870: add Linksys WUSB600N device id

Updated usb device list to support Linksys WUSB600N wireless adapter

Signed-off-by: Josef Jiru <josef.jiru@gmx.net>
15 years agoStaging: rt2860: Remove dependency on CFLAG RT2860
Mark Einon [Fri, 13 Mar 2009 23:28:15 +0000 (23:28 +0000)]
Staging: rt2860: Remove dependency on CFLAG RT2860

Removed the CFLAG RT2860 from Makefile and dependency on it in the driver code.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: Fix remaining build warnings
Mark Einon [Wed, 11 Mar 2009 22:51:41 +0000 (22:51 +0000)]
Staging: rt2860: Fix remaining build warnings

Fixed remaining four build warnings in drivers/staging/rt2860/:

drivers/staging/rt2860/common/mlme.c:900: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘ULONG’
drivers/staging/rt2860/common/rtmp_init.c:2049: warning: ‘Value’ may be used uninitialized in this function
drivers/staging/rt2860/sta_ioctl.c:361: warning: ‘return’ with a value, in function returning void
drivers/staging/rt2860/sta_ioctl.c:2468: warning: ‘return’ with a value, in function returning void

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1
Adam McDaniel [Mon, 23 Feb 2009 15:01:07 +0000 (08:01 -0700)]
Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1

Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1

When RaLink released rt2860 v1.7.0.0, it lacked proper support for both WEP
and WPA/WPA2 encryption. Either was possible, but the module had to be
compiled to support only one or the other, never both.

Since the EeePC was the most common device with this hardware (and these
users were complaining to RaLink that WPA/WPA2 encryption didn't work)
RaLink released a fix as an "eeepc-specific" version of this driver, v1.7.1.1

Unfortunately, when v1.8.0.0 was released, this WPA/WPA2 fix was never
included.

What complicates things further is that RaLink has no interest in
continuing work on this Linux driver for their hardware.

This commit ports the changes introduced in v1.7.1.1 into the v1.8.0.0
release, upgrading the kernel's module to v1.8.1.1

Signed-off-by: Adam McDaniel <adam@array.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: fix printk format warnings
Randy Dunlap [Wed, 11 Feb 2009 21:18:22 +0000 (13:18 -0800)]
Staging: rt2860: fix printk format warnings

Fix staging/rt28x0 printk format warnings:

linux-next-20090209/drivers/staging/rt2860/common/spectrum.c:1599: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
linux-next-20090209/drivers/staging/rt2860/rt_linux.c:857: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

linux-next-20090209/drivers/staging/rt2870/common/spectrum.c:1598: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
linux-next-20090209/drivers/staging/rt2870/rt_linux.c:898: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: remove kernel version compatibility wrappers
Pekka Enberg [Tue, 13 Jan 2009 18:51:11 +0000 (20:51 +0200)]
Staging: rt2860: remove kernel version compatibility wrappers

The driver is in mainline now so there's no point in keeping the
kernel version compatibility wrappers around.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860,rt2870: Correct use of ! and &
Julia Lawall [Wed, 24 Dec 2008 15:24:05 +0000 (16:24 +0100)]
Staging: rt2860,rt2870: Correct use of ! and &

IW_ENCODE_MODE is 0xF000 and thus !erq->flags & IW_ENCODE_MODE is always 0.
I assume that !(erq->flags & IW_ENCODE_MODE) was intended.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E; constant C; @@
(
  !E & !C
|
- !E & C
+ !(E & C)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8187se: fix \r\n line ends
Greg Kroah-Hartman [Tue, 3 Mar 2009 22:38:09 +0000 (14:38 -0800)]
Staging: rtl8187se: fix \r\n line ends

Andrew pointed out that I forgot to convert some files to unix format
when adding them originally.  This patch runs dos2unix on the rtl8187se
files that needed them.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8187se: ! x & y problem in inactive code
Roel Kluin [Thu, 19 Feb 2009 10:36:41 +0000 (11:36 +0100)]
Staging: rtl8187se: ! x & y problem in inactive code

Fix ! x & y problem in inactivated code

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8187se: fix build warnings
Herton Ronaldo Krzesinski [Fri, 13 Feb 2009 13:35:13 +0000 (08:35 -0500)]
Staging: rtl8187se: fix build warnings

drivers/staging/rtl8187se/r8180_wx.c:1386: warning: initialization from incompatible pointer type
drivers/staging/rtl8187se/r8180_wx.c:1388: warning: initialization from incompatible pointer type

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8187se: fix printk format warnings
Randy Dunlap [Wed, 11 Feb 2009 21:19:35 +0000 (13:19 -0800)]
Staging: rtl8187se: fix printk format warnings

Fix staging/rtl8187se printk format warnings:

drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:845: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:852: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Android: fix more printk formats
Randy Dunlap [Tue, 17 Feb 2009 17:38:41 +0000 (09:38 -0800)]
Staging: Android: fix more printk formats

Fix more android ram_console printk format warnings:

drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: android: ram_console: fix printk format warning
Randy Dunlap [Wed, 11 Feb 2009 21:16:37 +0000 (13:16 -0800)]
Staging: android: ram_console: fix printk format warning

Fix android printk format warnings:

linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: android: binder: fix printk format warnings
Randy Dunlap [Wed, 11 Feb 2009 21:15:39 +0000 (13:15 -0800)]
Staging: android: binder: fix printk format warnings

Fix printk format warnings in android binder:

drivers/staging/android/binder.c:2652: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2659: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2680: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: remove old irqreturn_t definition
Alexander Beregalov [Sun, 29 Mar 2009 16:21:51 +0000 (20:21 +0400)]
Staging: otus: remove old irqreturn_t definition

See commit bedd30d9 (genirq: make irqreturn_t an enum)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: 80211core/amsdu.c: Fix Coding Style
Dragoslav Zaric [Fri, 20 Mar 2009 19:11:54 +0000 (20:11 +0100)]
Staging: otus: 80211core/amsdu.c: Fix Coding Style

Signed-off-by: Dragoslav Zaric <dragoslav.zaric.kd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: ioctl.c: Fix Coding Style
Dragoslav Zaric [Mon, 16 Mar 2009 22:17:47 +0000 (23:17 +0100)]
Staging: otus: ioctl.c: Fix Coding Style

I run make on ioctl.c file and I got two warnings:
drivers/staging/otus/ioctl.c: In function ¡usbdrv_wpa_ioctl¢:
drivers/staging/otus/ioctl.c:2269: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/ioctl.c: In function ¡usbdrv_ioctl¢:
drivers/staging/otus/ioctl.c:2448: warning: ISO C90 forbids mixed declarations and code

From: Dragoslav Zaric <dragoslav.zaric.kd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: fix mixed declarations
Randy Dunlap [Wed, 11 Feb 2009 21:17:35 +0000 (13:17 -0800)]
Staging: otus: fix mixed declarations

Fix otus ISO C90 warnings:

drivers/staging/otus/80211core/cmmsta.c:740: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/80211core/coid.c:219: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/80211core/coid.c:1437: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:33: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:53: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:82: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:163: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:219: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:831: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hprw.c:896: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:332: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:1329: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:1565: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:1606: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:1923: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:1997: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2264: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2296: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2330: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2350: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2387: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:2425: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4223: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4283: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4314: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4380: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4425: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4531: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpmain.c:4539: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpusb.c:69: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpusb.c:334: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpusb.c:580: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpreg.c:1774: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpreg.c:2478: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:61: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:80: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:145: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:352: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:393: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:472: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:517: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:592: warning: ISO C90 forbids mixed declarations and code
drivers/staging/otus/hal/hpani.c:633: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: use USB API functions rather than constants
Julia Lawall [Mon, 29 Dec 2008 10:21:29 +0000 (11:21 +0100)]
Staging: otus: use USB API functions rather than constants

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: logical/bit and confusion
Roel Kluin [Sat, 17 Jan 2009 13:45:29 +0000 (14:45 +0100)]
Staging: otus: logical/bit and confusion

fix logical/bit and confusion

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: mimio: depends on INPUT
Randy Dunlap [Fri, 20 Feb 2009 16:48:18 +0000 (08:48 -0800)]
Staging: mimio: depends on INPUT

mimio driver uses input_* functions so it needs to depend on INPUT.

mimio.c:(.text+0x2526c9): undefined reference to `input_unregister_device'
mimio.c:(.text+0x2526da): undefined reference to `input_close_device'
mimio.c:(.text+0x252725): undefined reference to `input_free_device'
mimio.c:(.text+0x2528f1): undefined reference to `input_event'
mimio.c:(.text+0x252904): undefined reference to `input_event'
mimio.c:(.text+0x252921): undefined reference to `input_event'
mimio.c:(.text+0x252b3e): undefined reference to `input_event'
mimio.c:(.text+0x252b51): undefined reference to `input_event'
drivers/built-in.o:mimio.c:(.text+0x252bbd): more undefined references to `input_event' follow
mimio.c:(.text+0x252e42): undefined reference to `input_allocate_device'
mimio.c:(.text+0x2530ef): undefined reference to `input_register_device'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: mwilder@cs.nmsu.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: altera: fix printk format warnings
Randy Dunlap [Wed, 11 Feb 2009 21:14:17 +0000 (13:14 -0800)]
Staging: altera: fix printk format warnings

Fix printk format warnings in altera pcie chdma:

drivers/staging/altpciechdma/altpciechdma.c:429: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'
drivers/staging/altpciechdma/altpciechdma.c:433: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'
drivers/staging/altpciechdma/altpciechdma.c:449: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'
drivers/staging/altpciechdma/altpciechdma.c:450: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: et131x: list usage cleanup
Eric Sesterhenn [Wed, 11 Feb 2009 17:16:46 +0000 (18:16 +0100)]
Staging: et131x: list usage cleanup

Trivial cleanup, list_del(); list_add_tail() is equivalent
to list_move_tail(). Semantic patch for coccinelle can be
found at www.cccmz.de/~snakebyte/list_move_tail.spatch

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc
Wei Yongjun [Fri, 6 Feb 2009 03:08:58 +0000 (11:08 +0800)]
Staging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc

Used kmem_cache_zalloc instead of kmem_cache_alloc/memset.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rspiusb: use USB API functions rather than constants
Julia Lawall [Mon, 29 Dec 2008 10:21:52 +0000 (11:21 +0100)]
Staging: rspiusb: use USB API functions rather than constants

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@inc@
@@

#include <linux/usb.h>

@depends on !inc && (r1||r5)@
@@

+ #include <linux/usb.h>
  #include <linux/usb/...>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: at76_usb: convert to use linux/ieee80211.h
Kalle Valo [Sun, 22 Feb 2009 12:04:34 +0000 (14:04 +0200)]
Staging: at76_usb: convert to use linux/ieee80211.h

Jason Andryuk noticed that at76_usb won't compile with current
wireless-testing tree. This is because net/ieee80211.h was missing.

net/ieee80211.h will be removed soon and at76_usb won't compile then that
happens. Preprare for that by using instead linux/ieee80211.h and copying
some structures not available.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: at76_usb: mention mac80211 port in TODO file
Kalle Valo [Sun, 28 Dec 2008 18:32:33 +0000 (20:32 +0200)]
Staging: at76_usb: mention mac80211 port in TODO file

at76_usb has actually been already ported to use mac80211. Update the TODO
file to reflect this.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: altpciechdma: checkpatch fixups
Erik Andrén [Thu, 19 Mar 2009 20:47:12 +0000 (21:47 +0100)]
Staging: altpciechdma: checkpatch fixups

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: altpciechdma: Null deref in altpciechdma.c remove()
Dan Carpenter [Tue, 20 Jan 2009 12:07:36 +0000 (15:07 +0300)]
Staging: altpciechdma: Null deref in altpciechdma.c remove()

If dev is NULL it prints an error message.  The error message dereferences
dev.

Compile tested only.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Leon Woestenberg <leon.woestenberg@axon.tv>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: some checkpatch.pl cleanup
Alexander Beregalov [Mon, 16 Mar 2009 16:45:13 +0000 (19:45 +0300)]
Staging: meilhaus: some checkpatch.pl cleanup

Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: remove dependence on kernel version
Alexander Beregalov [Sun, 15 Mar 2009 21:54:53 +0000 (00:54 +0300)]
Staging: meilhaus: remove dependence on kernel version

Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: unsigned won't get negative after subtraction
Roel Kluin [Sun, 18 Jan 2009 14:34:55 +0000 (15:34 +0100)]
Staging: meilhaus: unsigned won't get negative after subtraction

Since unsigned, it won't get negative after subtraction.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: Use DEFINE_SPINLOCK
Julia Lawall [Thu, 25 Dec 2008 14:35:05 +0000 (15:35 +0100)]
Staging: meilhaus: Use DEFINE_SPINLOCK

SPIN_LOCK_UNLOCKED is deprecated.  The following makes the change suggested
in Documentation/spinlocks.txt

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
declarer name DEFINE_SPINLOCK;
identifier xxx_lock;
@@

- spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
+ DEFINE_SPINLOCK(xxx_lock);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: meilhaus: Correct use of ! and &
Julia Lawall [Wed, 24 Dec 2008 15:23:37 +0000 (16:23 +0100)]
Staging: meilhaus: Correct use of ! and &

ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING and ME_IO_STREAM_CONFIG_WRAPAROUND both
hanve 0 as the rightmost bit, and thus eg
!flags & ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING is always 0.
I assume that !(flags & ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING) and
!(flags & ME_IO_STREAM_CONFIG_WRAPAROUND) were intended.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E; constant C; @@
(
  !E & !C
|
- !E & C
+ !(E & C)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: go7007: fix build error
Greg Kroah-Hartman [Tue, 17 Mar 2009 23:01:58 +0000 (16:01 -0700)]
Staging: go7007: fix build error

VID_TYPE_CAPTURE is a v4l1 thing only.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: go7007: introduce missing kfree
Julia Lawall [Thu, 25 Dec 2008 20:09:57 +0000 (21:09 +0100)]
Staging: go7007: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: go7007: Move a dereference below a NULL test
Julia Lawall [Fri, 19 Dec 2008 17:11:25 +0000 (18:11 +0100)]
Staging: go7007: Move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/).  The result has been modified to
move the initialization of usb down closer to where it is used.

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup xmit.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:36 +0000 (22:39 +0100)]
Staging: agnx: Fixup xmit.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup table.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:35 +0000 (22:39 +0100)]
Staging: agnx: Fixup table.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup sta.h checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:34 +0000 (22:39 +0100)]
Staging: agnx: Fixup sta.h checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup sta.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:33 +0000 (22:39 +0100)]
Staging: agnx: Fixup sta.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup rf.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:32 +0000 (22:39 +0100)]
Staging: agnx: Fixup rf.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup phy.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:31 +0000 (22:39 +0100)]
Staging: agnx: Fixup phy.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup pci.c checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:30 +0000 (22:39 +0100)]
Staging: agnx: Fixup pci.c checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup debug.h checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:29 +0000 (22:39 +0100)]
Staging: agnx: Fixup debug.h checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Fixup agnx.h checkpatch warnings
Erik Andrén [Sat, 14 Mar 2009 21:39:28 +0000 (22:39 +0100)]
Staging: agnx: Fixup agnx.h checkpatch warnings

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: mac80211 hw config change flags
Herton Ronaldo Krzesinski [Fri, 13 Feb 2009 13:35:12 +0000 (08:35 -0500)]
Staging: agnx: mac80211 hw config change flags

Adapt agnx after commit "mac80211: introduce hw config change flags",
detected by following build warning:
drivers/staging/agnx/pci.c:426: warning: initialization from incompatible pointer type

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: i reaches -1, tested 0
Roel Kluin [Sat, 31 Jan 2009 10:44:02 +0000 (11:44 +0100)]
Staging: agnx: i reaches -1, tested 0

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: agnx: Move a dereference below a NULL test
Julia Lawall [Fri, 19 Dec 2008 17:11:01 +0000 (18:11 +0100)]
Staging: agnx: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: YanBo <dreamfly281@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: remove duplicated #include's
Huang Weiyi [Sun, 11 Jan 2009 09:22:36 +0000 (17:22 +0800)]
Staging: remove duplicated #include's

Removed duplicated #include's in
  drivers/staging/altpciechdma/altpciechdma.c
  drivers/staging/comedi/comedidev.h
  drivers/staging/rt2860/rt_linux.h
  drivers/staging/rt2870/rt_linux.h

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: make file_operations const
Andre Haupt [Mon, 26 Jan 2009 15:12:25 +0000 (16:12 +0100)]
Staging: me4000: make file_operations const

This eliminates checkpatch.pl warnings, that struct file_operations is
usually const.  The structs me4000_ai_fops_array and
me4000_ao_fops_array are not modified and thus also made const.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: use tabs for code indentation
Andre Haupt [Mon, 26 Jan 2009 15:12:24 +0000 (16:12 +0100)]
Staging: me4000: use tabs for code indentation

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: do not use C99 style comments.
Andre Haupt [Mon, 26 Jan 2009 15:12:23 +0000 (16:12 +0100)]
Staging: me4000: do not use C99 style comments.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: fix various checkpatch.pl warnings about bracing
Andre Haupt [Mon, 26 Jan 2009 15:12:22 +0000 (16:12 +0100)]
Staging: me4000: fix various checkpatch.pl warnings about bracing

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: kfree(NULL) is safe, so no extra checks needed.
Andre Haupt [Mon, 26 Jan 2009 15:12:21 +0000 (16:12 +0100)]
Staging: me4000: kfree(NULL) is safe, so no extra checks needed.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: replace some C99 comments
Andre Haupt [Mon, 26 Jan 2009 15:12:20 +0000 (16:12 +0100)]
Staging: me4000: replace some C99 comments

checkpatch.pl triggered those as false positives for trailing
statements, but those lines also triggered some other warnings.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: inline keyword should sit between storage class and type
Andre Haupt [Mon, 26 Jan 2009 15:12:19 +0000 (16:12 +0100)]
Staging: me4000: inline keyword should sit between storage class and type

fixes some checkpatch.pl errors complaining about wrong position of the
inline keyword

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: return is not a function, no parentheses required
Andre Haupt [Mon, 26 Jan 2009 15:12:18 +0000 (16:12 +0100)]
Staging: me4000: return is not a function, no parentheses required

fixes some checkpatch.pl errors about unneccessary parentheses.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: me4000: use linux/uaccess.h and linux/io.h
Andre Haupt [Mon, 26 Jan 2009 15:12:17 +0000 (16:12 +0100)]
Staging: me4000: use linux/uaccess.h and linux/io.h

This fixes the following checkpatch.pl warnings:

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: block ioctls until card fully initialised
Richard Kennedy [Fri, 20 Feb 2009 12:09:12 +0000 (12:09 +0000)]
Staging: wlan-ng: block ioctls until card fully initialised

Add a mutex to block ioctls before the card is fully initialised and
only allow one ioctl at a time.
This stops udev trying to load the firmware before to card is fully up.

patch ported from wlan-ng-devel

Karl Relton <karllinuxtest.relton@ntlworld.com> spotted that this was
missing from the staging version,
http://lists.linux-wlan.com/pipermail/linux-wlan-devel/2009-February/003890.html

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Replace local byteorder macros
Moritz Muehlenhoff [Wed, 18 Feb 2009 18:50:07 +0000 (19:50 +0100)]
Staging: wlan-ng: Replace local byteorder macros

Replace hfa384x2host_16(), hfa384x2host_32(), host2hfa384x_16()
and host2hfa384x_32() with standard byteorder macros.

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Remove the now empty wlan_compat.h
Moritz Muehlenhoff [Mon, 9 Feb 2009 18:33:44 +0000 (19:33 +0100)]
Staging: wlan-ng: Remove the now empty wlan_compat.h

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Remove dead code from p80211netdev.c
Moritz Muehlenhoff [Mon, 9 Feb 2009 18:33:43 +0000 (19:33 +0100)]
Staging: wlan-ng: Remove dead code from p80211netdev.c

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Remove unnecessary checks for NULL before calling kfree()
Moritz Muehlenhoff [Mon, 9 Feb 2009 18:33:42 +0000 (19:33 +0100)]
Staging: wlan-ng: Remove unnecessary checks for NULL before calling kfree()

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Remove more dead code from hfa384x_usb.c
Moritz Muehlenhoff [Mon, 9 Feb 2009 18:33:41 +0000 (19:33 +0100)]
Staging: wlan-ng: Remove more dead code from hfa384x_usb.c

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: Remove dead code from prism2mib.c
Moritz Muehlenhoff [Mon, 9 Feb 2009 18:33:40 +0000 (19:33 +0100)]
Staging: wlan-ng: Remove dead code from prism2mib.c

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>