struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.
Paul Gortmaker [Fri, 1 May 2015 01:47:46 +0000 (21:47 -0400)]
drivers/staging: include <module.h> for modular android tegra_ion code
This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.
Paul Gortmaker [Mon, 27 Apr 2015 05:25:40 +0000 (01:25 -0400)]
rtl8192u: delete another embedded instance of generic reason codes
We have global copies of all these reason codes. We don't need local
copies. Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)]
rtl8192u: don't duplicate ieee80211 constants for status/auth/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)]
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
The <linux/ieee80211.h> and this local file both have a struct of the
same name. They also have the same field sizes and generally the
same fields, as can be seen here:
Here we just align the local field names with the main system one. Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.
Not that the replacement:
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done
implicitly shows that only one of the three fields is currently used.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:37 +0000 (01:25 -0400)]
rtl8192u: promote auth_mode to a full 8 bits
Currently LEAP is defined to two locally but the identically named
global constant is 128 in <linux/ieee80211.h>. In order for us to
switch over to using the global value, we need to adjust the local
storage which is currently not enough to hold the larger value.
This is now consistent with the similar struct used in
drivers/net/wireless/ipw2x00/libipw.h and other drivers.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:36 +0000 (01:25 -0400)]
rtl8192u: don't trample on <linux/ieee80211.h> struct namespace
In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions. However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.
Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.
Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.
Automated conversion done with:
for i in `find . -name '*.[ch]'` ; do \
sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
done
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:35 +0000 (01:25 -0400)]
rtl8712: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:34 +0000 (01:25 -0400)]
rtl8188eu: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: sm7xxfb: use framebuffer_alloc and release
use the standard framebuffer_alloc() and framebuffer_release() instead
of custom defined function. for making that change we had to change a
member of the private structure from a variable to pointer and had to
touch almost all places of the file. since fb was changed into a pointer
so all instance of "sfb->fb." has been changed into "sfb->fb->".
now we will get build warning about smtc_alloc_fb_info() and
smtc_free_fb_info() to be unused which will be removed in the next
patch of the series.
staging: fsl-mc: Remove redundant initalization of the .owner field
This patch removes the redundant static initialization of the .owner field from
this driver as it is being overidden by the call from the platform driver register
Signed-off-by: Hari Prasath <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the following sparse warnings in r8192U_core.c:
CHECK drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol
'rtl819x_watchdog_wqcallback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol
'watch_dog_timer_callback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol
'_rtl8192_up' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol
'rtl8192_close' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol
'rtl8192_restart' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol
'rtl8192_irq_rx_tasklet' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol
'rtl8192_cancel_deferred_work' was not declared. Should it be static?
Ian Abbott [Fri, 1 May 2015 17:03:59 +0000 (18:03 +0100)]
staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant
"mite.h" relies on a lot of things declared including "../comedi_pci.h",
but doesn't need anything in "../comedi_pci.h" itself. None of the
Comedi modules that include "mite.h" rely on it to include
"../comedi_pci.h" on their behalf.
Remove the inclusion of "../comedi_pci.h" from "mite.h", and add enough
other includes and (incomplete) `struct` declarations to make it compile
without warnings or errors even when included first in a .c file.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The Comedi driver modules build fine if the inclusion of <linux/slab.h>
is removed from "mite.h", so remove it. However, since "mite.c" calls
`kzalloc()`, include <linux/slab.h> there.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: ion: chunk_heap: use pr_debug for heap creation print
We're currently printing to the kernel log at `info' level when we
successfully create the chunk heap, but success messages should be done
at `debug' level. Fix this.
staging: dgnc: clean up allocation of ->channels[i]
Check if kzalloc fails in dgnc_tty_init() and if it does then free all
previously allocated ->channels[i] and set them to NULL. This makes the code
less error/bug prone because instead of needing programmers attention to add
checks everywhere we do that in one place. Also, remove a bogus comment and
check in the same loop because ->channels[i] isn't allocated anywhere else.
Finally, remove a unnecessary check if ->channels[i] is NULL in the next loop
because it can't be.
Tolga Ceylan [Sat, 2 May 2015 06:40:35 +0000 (23:40 -0700)]
drivers: staging: fbtft: fbtft-bus.c: Fix different address space warning on I/O mem
To fix sparse warning of incorrect type in assignment
(different address space), added annotation __iomem to
vmem8 and modified direct reads with ioread8().
Julia Lawall [Sun, 3 May 2015 13:21:44 +0000 (15:21 +0200)]
staging/lustre/ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node
Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node. The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).
Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case. Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 3 May 2015 13:21:43 +0000 (15:21 +0200)]
drivers: staging: lustre: lustre: Replace OBD_CPT_ALLOC etc by kzalloc_node
Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node. The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).
Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case. Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 3 May 2015 13:21:42 +0000 (15:21 +0200)]
staging: lustre: ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node
Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node. The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).
Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case. Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Fri, 1 May 2015 19:37:53 +0000 (21:37 +0200)]
staging: lustre: obdclass: obd_config: remove unneeded null test before free
Kfree can cope with a null argument, so drop null tests.
The semantic patch that identifies this issue is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// </smpl>
The first part of the patch introduces new labels to avoid unnecessary
calls to kfree. In addition, lprof->lp_md is always null in the cleanup
code at the end of the function, so that kfree is just dropped.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Fri, 1 May 2015 19:38:01 +0000 (21:38 +0200)]
Staging: lustre: llite: file: remove unneeded null test before free
Kfree can cope with a null argument, so drop null tests.
The semantic patch that finds this issue is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// </smpl>
In the first case, llss can never be null at the point of the kfree anyway.
In the second set of changes, the gotos are either eliminated, when no
freeing is needed (hss failure case), or rewritten so that there is no call
to free on data that has not yet been allocated (free_hss goto case).
There is no goto at which attr is not null, so the out label is simply
dropped.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Mon, 4 May 2015 01:23:53 +0000 (18:23 -0700)]
Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Some miscellaneous bug fixes and some final on-disk and ABI changes
for ext4 encryption which provide better security and performance"
* tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix growing of tiny filesystems
ext4: move check under lock scope to close a race.
ext4: fix data corruption caused by unwritten and delayed extents
ext4 crypto: remove duplicated encryption mode definitions
ext4 crypto: do not select from EXT4_FS_ENCRYPTION
ext4 crypto: add padding to filenames before encrypting
ext4 crypto: simplify and speed up filename encryption
Linus Torvalds [Mon, 4 May 2015 01:15:48 +0000 (18:15 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"One intel fix, one rockchip fix, and a bunch of radeon fixes for some
regressions from audio rework and vm stability"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/i915/chv: Implement WaDisableShadowRegForCpd
drm/radeon: fix userptr return value checking (v2)
drm/radeon: check new address before removing old one
drm/radeon: reset BOs address after clearing it.
drm/radeon: fix lockup when BOs aren't part of the VM on release
drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
drm/radeon: adjust pll when audio is not enabled
drm/radeon: only enable audio streams if the monitor supports it
drm/radeon: only mark audio as connected if the monitor supports it (v3)
drm/radeon/audio: don't enable packets until the end
drm/radeon: drop dce6_dp_enable
drm/radeon: fix ordering of AVI packet setup
drm/radeon: Use drm_calloc_ab for CS relocs
drm/rockchip: fix error check when getting irq
MAINTAINERS: add entry for Rockchip drm drivers
Dave Airlie [Sun, 3 May 2015 22:56:47 +0000 (08:56 +1000)]
Merge tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes
Just a single intel fix
* tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel:
drm/i915/chv: Implement WaDisableShadowRegForCpd
Dave Airlie [Sun, 3 May 2015 22:56:27 +0000 (08:56 +1000)]
Merge branch 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes
one fix and maintainers update
* 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip:
drm/rockchip: fix error check when getting irq
MAINTAINERS: add entry for Rockchip drm drivers
Linus Torvalds [Sun, 3 May 2015 20:22:32 +0000 (13:22 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is three logical fixes (as 5 patches).
The 3ware class of drivers were causing an oops with multiqueue by
tearing down the command mappings after completing the command (where
the variables in the command used to tear down the mapping were
no-longer valid). There's also a fix for the qnap iscsi target which
was choking on us sending it commands that were too long and a fix for
the reworked aha1542 allocating GFP_KERNEL under a lock"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
3w-9xxx: fix command completion race
3w-xxxx: fix command completion race
3w-sas: fix command completion race
aha1542: Allocate memory before taking a lock
SCSI: add 1024 max sectors black list flag
Linus Torvalds [Sun, 3 May 2015 17:49:04 +0000 (10:49 -0700)]
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave dmaengine fixes from Vinod Koul:
"Here are the fixes in dmaengine subsystem for rc2:
- privatecnt fix for slave dma request API by Christopher
- warn fix for PM ifdef in usb-dmac by Geert
- fix hardware dependency for xgene by Jean"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: increment privatecnt when using dma_get_any_slave_channel
dmaengine: xgene: Set hardware dependency
dmaengine: usb-dmac: Protect PM-only functions to kill warning