This is a big patch to remove all the warnings given by checkpatch.pl.
There were 13348 errors and 3112 warnings, but now there's nothing.
I've compiled the files dependent on this header and they seem alright.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I've removed all the warnings except one that I believe is a false
positive. The original author has used a macro to #define EXTERN to be
'extern', so in this case 'extern' is not used to define the storage
class of anything, but just the value of the macro. We can safely ignore
this warning.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: Fixed lots of coding style issues.
There were hundreds of warnings and errors given by checkpatch.pl but
now it's down to 20. These ones that were left in the code need some
more attention, cause I reckon the functions are overly nested leading
to a mess of code in a traditional 80 character screen. I'm sure this code
can be refactored into something more visually pleasing (things like
compressing two nested if's into a single if with an AND would help a
lot already).
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: Fixed lots of coding style issues.
There were hundreds of warnings, but now there's only four. These are
related to the 'volatile' keyword and printk(), which I think should be
left to the maintainers to modify if deemed necessary.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Not all warnings were silenced. One of them is a typedef in vb_ext.h
which I think seems alright.
The other warnings in vb_ext.c I left there because that would involve
changing a bit of the logic in the code. IMHO though I think the
functions are too complicated (i.e. the if/else are too deep within a
big function.) and can probably be split.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: Fixed coding style issues in vb_def.h
I've removed all the warnings given by checkpatch.pl in vb_def.h and
also changed the indentation of pretty much the entire file so that it
is more consistent.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Mon, 18 Apr 2011 11:59:06 +0000 (12:59 +0100)]
staging:iio:ade7758 replace unnecessary event line registration.
This was only used for triggering and hence should never have been
done this way in the first place. Needs to go prior to cleaning
out some of the registration functions.
Untested but identical in form to those that have been.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 15 Apr 2011 17:55:56 +0000 (18:55 +0100)]
staging:iio: Add ability to allocate private data space to iio_allocate_device
Suggested by Arnd Bergmann. Note this will break ALL drivers that
are out of mainline. The fix is trivial change of
iio_allocate_device() -> iio_allocate_device(0)
Sorry if this causes issues for any one!
Jonathan Cameron [Fri, 15 Apr 2011 17:55:55 +0000 (18:55 +0100)]
staging:iio: replace rip_lots naming with read_first_n
Change suggested by Arnd Bergmann, Related patch to remove
pointless (now) dead_offset parameter will have await
proper fix for the sca3000 driver. That depends on
some intermediate patches so may be a little while.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jon Brenner [Fri, 15 Apr 2011 17:38:43 +0000 (18:38 +0100)]
staging: iio: TAOS tsl258x: Device driver
Added suspend/resume functions.
Changed attribute names to match existing where applicable and updated
or documented new ABI as discussed.
Changed integration time ABI from using index (0 to 3) to use actual
gain values (1x,8x, etc.).
Removed various unused variables, declarations, and functions.
Revised code to accommodate different endianess (le16_to_cpu).
Updated error return codes in various functions.
Changed from mdelay to msleep after determining that longer wait would
be acceptable.
V5: Makefile and Kconfig cleanups by Jonathan Cameron.
Signed-off-by: Jon August Brenner <jbrenner@taosinc.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Tue, 19 Apr 2011 14:27:43 +0000 (15:27 +0100)]
gma500: Add support for inserting and removing pages from the GART
There are two chunks of code we need to do this. The first one is the code
to insert and remove the pages from the GART, the second is the code to build
page table lists from the GEM object. Surprisingly this latter one doesn't seem
to have a nice GEM helper.
While we are at it we can begin dismantling the semi redundant struct pg,
and finish pruning out the old now unused gtt code as well as the last bits
of helper glue from the old driver base.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Tue, 19 Apr 2011 14:27:28 +0000 (15:27 +0100)]
gma500: begin adding GEM
This puts in place the infrastructure for GEM allocators. Our implementation
is fairly simplistic at this point and we don't deal with things like
evicting objects from the GART to make space, nor compaction.
We extent our gtt_range struct to include a GEM object and that allows GEM
to do all the handle management and most of the memory mapping work for us.
This patch also doesn't load GEM pages into the GART so the GEM side isn't
very useful. Before we can do that a fair bit of work is needed reworking the
internal GTT code.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Wed, 13 Apr 2011 09:37:03 +0000 (10:37 +0100)]
gma500: Add a gtt allocator
At the moment we don't do any page backing for the GTT so only the stolen
area pages will actually work. That is fine for our initial framebuffer and
a bit of testing but will need resolution (including alternate mmap methods
and the like for s/g areas) eventually.
Rather than use some of the overcomplex stuff in the DRM we use the existing
Linux resource allocators to hand out framebuffers and the like. This also has
the nice result that /proc/iomem shows the allocations.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
stli_brdstats is defined as global variable. After de-BKL-ization in
the patch b4eda9cb48eac1b7 an access to the variable is not serialized
anymore. This leads to the race window between the check and the use
in stli_getbrdstats():
if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t)))
return -EFAULT;
if (stli_brdstats.brd >= STL_MAXBRDS) <<<
return -ENODEV;
brdp = stli_brds[stli_brdstats.brd]; <<<
If one process calls COM_GETBRDSTATS ioctl() with sane .brd, second
process calls COM_GETBRDSTATS ioctl() with invalid .brd, and the
second process' copy_from_user() executes exactly between the check and
stli_brds[] indexation of the first process, then the first process gets
contents of memory at *stli_brds[stli_brdstats.brd] address. Also
the resulting .nrpanels field may be too big, in this case
stli_brdstats.panels array overflows.
Roland Vossen [Thu, 7 Apr 2011 09:20:58 +0000 (11:20 +0200)]
modules: Enabled dynamic debugging for staging modules
Driver modules from the staging directory are marked 'tainted'
by module.c. Subsequently, tainted modules are denied dynamic
debugging. This is unwanted behavior, since staging modules should
be able to use the dynamic debugging mechanism.
Please merge this also into the staging-linus branch.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Franky Lin [Mon, 25 Apr 2011 22:45:07 +0000 (15:45 -0700)]
staging: brcm80211: Add bcmchip.h
bcmchip.h contains chip specific core register base address and
address translation macro for core register access. This is
introduced for si/sb utils dependence removal in fullmac driver.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 12 Apr 2011 12:34:41 +0000 (14:34 +0200)]
staging: brcm80211: bugfix for div by zero in minstrel_ht_tx_status
Caused by brcmsmac.ko suppling a 0 value to Mac80211. Mac80211 subsequently
divides by this number. Bug only occurred on AMPDU traffic. This is a fix
for https://bugzilla.kernel.org/show_bug.cgi?id=32032, titled
'Divide error in minstrel_ht_tx_status followed by hang', reported by
Wouter Cloetens.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The cfg80211 ops for power management were completely
broken. If we were asked for to go into power save it was putting
device in awake, and when we were asked to become awake we were
putting the device into power save... This fixes the powersave
operations to do the right thing.
Signed-off-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If a scan operation is pending and in between a disconnect
event is received from firmware the scan results never get
sent back to cfg80211. This causes a scan failure and yields
a device/resource busy state upon retries. If a disconnect
event is received and scan is pending return the scan done
to the cfg80211 to enable futher scans to be issued.
Signed-off-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds support for AR6003 v2.1.1. Highlights changes
for this new hardware are:
1. Host interest area, through which driver communicates
with FW has been enhanced to accomodate additional
members for proper functioanlity of new HW.
2. The firmware and the board data files are different
for AR6003 v2.1.1. The capability to read those file
have been added in the driver.
3. Certain parameters like numdevice, firmware mode needs to be
programmed for proper functionality of new driver.
Signed-off-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>