Remove code that was removed using #if 0
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
PUCHAR was unsigned char *, use that instead
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The port related macros in osdef.h are replaced with calls to out?()
and in?(). This removes the last macros defined in osdef.h, so this
file is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These were just macros for memset and memcpy, so use those instead.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove ifdefs that check LINUX_VERSION_CODE as this is
not needed in the staging tree.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes compiler warning format '%x' expects type 'unsigned int',
but argument 2 has type 'long unsigned int'
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The standard layer 3 ping utility can use the record route (RR) option
of IP to collect route data for sent ping messages (ping -R). This
patch introduces comparable functionality for batman-adv ICMP messages.
The patch adds a second batman ICMP packet format (icmp_packet_rr) such
that up to 17 MAC addresses can be recorded (sufficient for up to 8
hops per direction). When no RR is wanted, the old icmp_packet without
the RR overhead can be sent.
Signed-off-by: Daniel Seither <post@tiwoc.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds interface alternating to the new bonding feature. By
default, we now try to avoid forwarding packets on the receiving
interface, instead choosing alternative interfaces. This feature
works only on nodes which have multiple interfaces connected to the
mesh. This approach should reduce problems of the half-duplex nature
of WiFi Hardware and thus increase performance.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch introduces bonding functionality to batman-advanced, targeted
for the 0.3 release. As we are able to route the payload traffic as we
want, we may use multiple interfaces on multihomed hosts to transfer data
to achieve higher bandwidth. This can be considered as "light Multi Path
Routing" for single hop connections.
To detect which interfaces of a peer node belong to the same host, a
new flag PRIMARIES_FIRST_HOP is introduced. This flag is set on the first hop
of OGMs of the primary (first) interface, which is broadcasted on all
interfaces. When receiving such an OGM, we can learn which interfaces
belong to the same host (by assigning them to the primary originator).
Bonding works by sending packets in a round-robin fashion to the available
interfaces of a neighbor host, if multiple interfaces are available. The
neighbor interfaces should be almost equally good to reach.
To avoid interferences (i.e. sending on the same channel), only neighbor
interfaces with different mac addresses and different outgoing interfaces
are considered as candidates.
Bonding is deactivated by default, and can be activated by
echo 1 > /sys/class/net/bat0/mesh/bonding
for each individual node.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch changes the sequence number range from 8 or 16 bit to 32 bit.
This should avoid problems with the sequence number sliding window algorithm
which we had seen in the past for broadcast floods or malicious packet
injections. We can not assure 100% security with this patch, but it is quite
an improvement over the old 16 bit sequence numbers:
* expected window size can be increased (4096 -> 65536)
* 64k packets in the right order would now be needed to cause a loop,
which seems practically impossible.
Furthermore, a TTL field has been added to the broadcast packet type, just to
make sure.
These changes required to increase the compatibility level once again.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Change atomic64_* back to atomic_*, Rework on
top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When trying to set the originator interval to 40ms, we are asked to set
it to a minimum value of 40ms. This patch permits setting an
originator interval of JITTER*2 (40ms by default) now.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
All code for debugfs is ignored when the creation of the batman-adv root
directory in debugfs fails. It must also be ignored when the
debugfs_create_dir tells us that debugfs is not implemented to prevent
possible crashes in the future.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Functions and variables which are used only inside one object file can
be declared as static. This helped to find unused functions/variables
* mainIfAddr_default
* main_if_was_up
and functions with declarations but missing definitions
* hash_debug
* orig_find
* send_own_packet_work
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the last uses of MAC_FMT
Signed-off-by: Joe Perches <joe@perches.com>
[sven.eckelmann@gmx.de: Adapted for current batman-adv version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes the extra usage output which came when
the sysfs files were read.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Files which represent more than a single attribute aren't allowed in
sysfs. As we have some files which aren't essential and are lists or
tables aggregated from data from different places inside batman-adv, we
must place them in a filesystem without such a restriction.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
batctl uses /dev/batman-adv to send special batman-adv icmp packets to
other nodes in the mesh. To get it working with multiple batX devices we
must ensure that every mesh device can have their own socket which is
used to inject those packets in exactly one mesh.
The current implementation still doesn't allow to use complete separated
meshes as we rely on structures which are not part of the private data
of a batman device.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In today linux-next I got a compile warning in staging/batman-adv.
This is due a struct bin_attribute read function prototype change and the driver was not updated.
This patch solves the issue
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
vis_interval does not neccesarily needs to be a variable, as there is
no way to change it anyway (and probably no need to). We can therefore
remove yet another global variable.
Thanks Marek for pointing this out.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add documents about new sysfs entries in
* /sys/class/net/<iface>/batman-adv/mesh_iface
* /sys/class/net/<mesh_iface>/mesh/vis_mode
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
batman-adv is receiving and sending the packets of its own ether type
on a very early/low level. Therefore we need to add explicit hooks to
give netfilter/ebtables a chance to filter them.
Reported-by: Antonio Quartulli <ordex@ritirata.org>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The hardif_attr and the bat_attr struct share the same attributes,
hence it is not necessary to specify 2 different structs.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A really trivial patch to solve a warning when compiling staging/pohmelfs
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the DT_3155_{SUCCESS/FAILURE} errno defines and use the
kernel provided ones.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes the different address spaces noise when copying data to/from
user space to kernel space.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The third argument of dma_alloc_coherent() is of type dma_addr_t and is defined
as u64 for x86_64, while the member 'device_base' of struct dma_coherent_mem is
defined as u32.
While at it, clean up the code. Now if dev->dma_mem != NULL all the fields/members
are already properly initialized.
Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
Removed kfree(NULL checks) that were not necessary
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed issues found by checkpatch.pl including adding KERN_
facility levels to printk() calls and C99 comments.
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wrq->name is only 16 characters long but "IEEE 802.11-MIMO" is 16
characters + a NULL character, so it's too long. This patch changes it
to "IEEE 802.11abgn".
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On Mon, 2010-06-07 at 12:02 -0700, Luis R. Rodriguez wrote:
> this driver is unmaintained and its only purpose is as a
> source of documentation for developers working on ar9170 and carl9170.
> Once carl9170 gets 11n support and merged upstream then this driver
> can be removed.
Then the TODO file should be updated.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to zdusb.c that fixes whitespace,
C99 comment, and other style issues found by the
checkpatch.pl tool
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This doesn't change the behavior. It just silences a sparse warning.
drivers/staging/wlan-ng/hfa384x_usb.c:2810:62: warning: dubious: !x | !y
The point of the bitwise OR is so that a logical OR could short circuit
the second call to test_and_set_bit().
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some errors crept in due to a previous patch that I missed.
This fixes them up so the driver continues to build, sorry about that.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Switch driver over from wext to cfg80211 interface.
Some Notes:
- This patch moves the driver wholesale from wext to cfg80211. Wext
support is still provided through the cfg80211 provided wext
compatability layer.
- Currently only infrastructure mode is implemented. Ad hoc mode is not
yet implemented, but can be added.
- It does not support connecting to a specified bssid, instead roaming
is handled by the card itself. This matches the behaviour of the
existing driver.
- It has been tested using NetworkManager (via wpa_supplicant)
configured to use the wext compatability layer, and then again with the
native nl80211 layer.
Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Current linux kernel has GENERIC_HDLC_VERSION equal to 4, no need to
have dead code in-kernel which was there for ancient kernel versions.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.
While at it, also remove surrounding code which is commented out,
or '#if 1' nops.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.
While at it, also remove surrounding code which is commented out,
or '#if 1' nops.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The current code creates directories in procfs named after interfaces,
but doesn't handle renaming. This can result in name collisions and
consequent WARNINGs. It also means that the interface name cannot
reliably be used to remove the directory - in fact the current code
doesn't even try, and always uses "wlan0"!
Since the name of a proc_dir_entry is embedded in it, use that when
removing it.
Add a netdev notifier to catch interface renaming, and remove and
re-add the directory at this point.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Currently various resources may be leaked in case of an error.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use memdup_user when user data is immediately copied into the
allocated region.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@
- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
<+... when != goto l1;
- -ENOMEM
+ PTR_ERR(to)
...+>
}
- if (copy_from_user(to, from, size) != 0) {
- <+... when != goto l2;
- -EFAULT
- ...+>
- }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a spin_unlock and mutex_unlock missing on the error path.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E1;
@@
* spin_lock(E1,...);
<+... when != E1
if (...) {
... when != E1
* return ...;
}
...+>
* spin_unlock(E1,...);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1. move adis16400_spi_read_burst() to adis16400_ring.c since it is only
called there
2. add the lost calling to adis16400_self_test()
3. codes cleanup
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1. add delay between spi transfers
2. move burst read to ring function
3. clean-up
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The sysfs attribute call backs take a file pointer these days. This was
added in 2c3c8bea60 "sysfs: add struct file* to bin_attr callbacks"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These drivers use kzalloc() but don't include slab.h. They currently
build though because the spi.h header will pull in slab.h for us. But
rather than rely on that behavior forever, include slab.h explicitly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A bunch of IIO files contain spurious semicolons after function
definitions and case statements and if statements. Guess people
really like this thing, but kill them anyways so they'll stop
spreading via copy & paste with new drivers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Standardize the spacing/style across the IIO build files:
- comment block in Kconfigs
- newlines at ends of files
- trailing lines at ends of files
- indent with one tab, not spaces or mixed
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Related changes:
- Included example to show usage as generic
(non-swap) disk with ext4 filesystem.
- Renamed rzscontrol to zramconfig to match
with new device naming.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Related changes:
- Modify revelant Kconfig and Makefile accordingly.
- Change include filenames in code.
- Remove dependency on CONFIG_SWAP in Kconfig as zram usage
is no longer limited to swap disks.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently, ramzwap devices (/dev/ramzswapX) can only
be used as swap disks since it was hard-coded to consider
only the first request in bio vector.
Now, we iterate over all the segments in an incoming
bio which allows us to handle all kinds of I/O requests.
ramzswap devices can still handle PAGE_SIZE aligned and
multiple of PAGE_SIZE sized I/O requests only. To ensure
that we get always get such requests only, we set following
request_queue attributes to PAGE_SIZE:
- physical_block_size
- logical_block_size
- io_min
- io_opt
Note: physical and logical block sizes were already set
equal to PAGE_SIZE and that seems to be sufficient to get
PAGE_SIZE aligned I/O.
Since we are no longer limited to handling swap requests
only, the next few patches rename ramzswap to zram. So,
the devices will then be called /dev/zram{0, 1, 2, ...}
Usage/Examples:
1) Use as /tmp storage
- mkfs.ext4 /dev/zram0
- mount /dev/zram0 /tmp
2) Use as swap:
- mkswap /dev/zram0
- swapon /dev/zram0 -p 10 # give highest priority to zram0
Performance:
- I/O benchamark done with 'dd' command. Details can be
found here:
http://code.google.com/p/compcache/wiki/zramperf
Summary:
- Maximum read speed (approx):
- ram disk: 1200 MB/sec
- zram disk: 600 MB/sec
- Maximum write speed (approx):
- ram disk: 500 MB/sec
- zram disk: 160 MB/sec
Issues:
- Double caching: We can potentially waste memory by having
two copies of a page -- one in page cache (uncompress) and
second in the device memory (compressed). However, during
reclaim, clean page cache pages are quickly freed, so this
does not seem to be a big problem.
- Stale data: Not all filesystems support issuing 'discard'
requests to underlying block devices. So, if such filesystems
are used over zram devices, we can accumulate lot of stale
data in memory. Even for filesystems to do support discard
(example, ext4), we need to see how effective it is.
- Scalability: There is only one (per-device) de/compression
buffer stats. This can lead to significant contention, especially
when used for generic (non-swap) purposes.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Older mechanism of counting the number of protocols
registered with ST was slow, in-efficient.
It used to check the protocol data for NULL for each
registration/unregistration.
With this change, counting protocols in maintained by
a single counter protos_registered.
Counting protocols is not just for debug purposes
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add version information to be available under the sysfs group
for kim.
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the older way of communicating with user-space
daemon UIM.
The older way involved creating of a new kobj and pid
sysfs file under it, and sending signal using that pid.
Now we communicate via rfkill to user-space UIM.
Background: UIM is the user-space daemon which upon
notification from ldisc driver, opens the tty, sets
default baud and then installs (tiocsetd) the ldisc.
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Update the TODO of TI-ST to make sure it reflects current list
of activities that need to be done.
Also point it out to the user-space app code relevant to it.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the 80211mgr.c file that fixes up warnings
found by the checkpatch.pl tool
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix this build error:
drivers/staging/vt6656/built-in.o: In function `rotr1':
(.text+0x1a878): multiple definition of `rotr1'
drivers/staging/rt2870/built-in.o:(.text+0x106c2): first defined here
drivers/staging/vt6656/built-in.o: In function `tkip_sbox':
(.text+0x1a848): multiple definition of `tkip_sbox'
drivers/staging/rt2870/built-in.o:(.text+0x10697): first defined here
drivers/staging/vt6656/built-in.o: In function `xor_32':
(.text+0x1ec24): multiple definition of `xor_32'
drivers/staging/rt2870/built-in.o:(.text+0x111c4): first defined here
drivers/staging/vt6656/built-in.o: In function `xor_128':
(.text+0x1ec00): multiple definition of `xor_128'
drivers/staging/rt2870/built-in.o:(.text+0x111dd): first defined here
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resolved whitespace-related checkpatch findings in .h files
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resolved checkpatch findings, but some long lines warnings.
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the phy_calibration.c that fixes up almost all
warnings and errors (except 80 characters limit and lack of tabs errors)
found by the checkpatch.pl tool
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes line length, brace style and whitespace issues in the
mac_structures.h file found by the checkpatch.pl tool
Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes the use of //C99 comments in the mac_structures.h found by
the checkpatch.pl tool
Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl812.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 27
WARNING: line over 80 characters x 37
WARNING: please, no space before tabs x 13
WARNING: braces {} are not necessary for single statement blocks x 2
WARNING: printk() should include KERN_ facility level x 22
WARNING: braces {} are not necessary for any arm of this statement x 5
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I fixed indentation in one place and two long lines, a space and a brace
found by checkpatch.pl and fixed some long lines and whitespace around an =.
Signed-off-by: Lars Lindley <lindley@coyote.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The dmm32at.c and comedi_bond.c comedi driver files contain an
instructional comment block copied over from skel.c about how to format
a driver comment block. This comment was modified in skel.c by a
previous patch in this series to stop Comedi's 'dump_doc' script
treating it as an actual driver comment block. There isn't any need to
repeat this comment block in the other source files, so rather than
modify it, this patch just removes it from those files.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The Comedi team have a script 'dump_doc' to extract text from the driver
comment block (starting with line 'Driver:') in (most of) the comedi
driver source files. This was recently updated to allow and strip off a
" * " prefix at the start of each line (well actually, it uses the perl
substitution 's/^ ?\* ?//').
The skel.c file contains an instructional comment block about how to
format this driver comment block, but the updated 'dump_doc' script
mistakenly treats this as a valid driver comment block. This patch adds
some extra whitespace to stop the instructional comment block being
treated as a valid driver comment block by Comedi's 'dump_doc' script.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Previous whitespace changes to das08.c removed some whitespace from a
"driver comment block" that the Comedi team would like to keep. "Header
continuation lines" in this comment block should be indented with
whitespace. (This is after the " * " at the start of each line.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the quatech_daqp_cs.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 1
WARNING: line over 80 characters x 1
WARNING: braces {} are not necessary for single statement blocks x 10
WARNING: printk() should include KERN_ facility level x 6
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcmda12.c file that fixes up five printk() warning issues
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl816.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 2
WARNING: line over 80 characters x 34
WARNING: please, no space before tabs x 1
WARNING: braces {} are not necessary for single statement blocks x 6
WARNING: printk() should include KERN_ facility level x 15
WARNING: braces {} are not necessary for any arm of this statement x 1
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl711.c file that fixes up printk()
warning issues.
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the me4000.c file that fixes up the following
issues:
ERROR: space required after that close brace '}' x 13
ERROR: spaces required around that ':' (ctx:VxV) x 3
WARNING: line over 80 characters x 96
WARNING: braces {} are not necessary for any arm of this statement x 2
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all remaining typedefs from comedi drivers
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move the PCI devinit/devexit routines to the respective C source files
instead of calling COMEDI_PCI_INITCLEANUP
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move the init/exit routines to the respective C source files
instead of calling COMEDI_INITCLEANUP
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add MODULE_AUTHOR, MODULE_LICENSE, and MODULE_DESCRIPTION calls
to the respective C source files instead of calling COMEDI_MODULES_MACRO
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes all, printk() should
include KERN-facility level, warnings found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the file am9513.h that fixes missing space warnings
found by the checkpatch.pl tool.
Signed-off-by: Bob Beattie <bob.beattie@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for s626.c to fix some of the warnings
reported by the checkpatch.pl tool, namely,
printk() should include KERN_ facility level
unnecessary whitespace before a quoted newline
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for unioxx5.c which fixes "trailing statements
should be on next line" errors raised by the
chechpatch.pl tool
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes some long line lengths in gsc_hpdi.c as found by the
checkpatch.pl tool
Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch cleans up some various warnings generated from checkpatch.pl
Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These checks are obviously pointless because kfree() can handle null
dereferences.
But really the main problem is that if the pointers were null that would
cause problems on the ealier lines. The dereferences would cause an
oops and the _release() functions use ->priv to determine which IRQ to
free. I looked into it and quite a few of the detach functions assume
link->priv is non-null. It seems like we can remove these checks.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Reduce stack usage in serial_2002_open() by allocating dig_in_config,
dig_out_config, chan_in_config, and chan_out_config temporary arrays
using kcalloc() and freeing them when done with.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The comedi device 'detach' method for the serial2002 driver has an
off-by-one error in its loop for freeing data belonging to its
subdevices. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The comedi device 'open' method for the serial2002 driver frees any old
'maxdata_list' and 'range_table_list' arrays belonging to a subdevice
and allocates them again, but was missing checks for allocation failure.
If an allocation fails, free the 'maxdata_list' and 'range_table_list'
arrays for all subdevices and return an error.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some comedi drivers should return an error from their 'open' method when
something goes wrong. Change the prototype of the 'open' method in
'struct comedi_device' to allow this, and change the drivers that use it.
Propagate any error to the 'open' file operation.
The corresponding 'close' method won't be called when the 'open' method
fails, so drivers failing the 'open' need to clean up any mess they
created.
The dt9812 and serial2002 drivers can now return an error on 'open'.
The jr3_pci driver also uses the 'open' method but doesn't fail it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_tio.c file that fixes a brace warning found by
the checkpatch.pl tool
Signed-off-by: Samuel Richardson <sam.j.richardson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
wimax/i2400m: fix missing endian correction read in fw loader
net8139: fix a race at the end of NAPI
pktgen: Fix accuracy of inter-packet delay.
pkt_sched: gen_estimator: add a new lock
net: deliver skbs on inactive slaves to exact matches
ipv6: fix ICMP6_MIB_OUTERRORS
r8169: fix mdio_read and update mdio_write according to hw specs
gianfar: Revive the driver for eTSEC devices (disable timestamping)
caif: fix a couple range checks
phylib: Add support for the LXT973 phy.
net: Print num_rx_queues imbalance warning only when there are allocated queues
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: clear bridge resource range if BIOS assigned bad one
PCI: hotplug/cpqphp, fix NULL dereference
Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
PCI: change resource collision messages from KERN_ERR to KERN_INFO
There are devices out there which are PCI Hot-plug controllers with
compaq PCI IDs, but are not bridges, hence have pdev->subordinate
NULL. But cpqphp expects the pointer to be non-NULL.
Add a check to the probe function to avoid oopses like:
BUG: unable to handle kernel NULL pointer dereference at 00000050
IP: [<f82e3c41>] cpqhpc_probe+0x951/0x1120 [cpqphp]
*pdpt = 0000000033779001 *pde = 0000000000000000
...
The device here was:
00:0b.0 PCI Hot-plug controller [0804]: Compaq Computer Corporation PCI Hotplug Controller [0e11:a0f7] (rev 11)
Subsystem: Compaq Computer Corporation Device [0e11:a2f8]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This reverts commit 75568f8094.
Since they're just a convenience anyway, remove these symlinks since
they're causing duplicate filename errors in the wild.
Acked-by: Alex Chiang <achiang@canonical.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We can often deal with PCI resource issues by moving devices around. In
that case, there's no point in alarming the user with messages like these.
There are many bug reports where the message itself is the only problem,
e.g., https://bugs.launchpad.net/ubuntu/+source/linux/+bug/413419 .
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>