Commit Graph

693279 Commits

Author SHA1 Message Date
Ricardo Silva e038440765 staging: wlan-ng: hfa384x.h: Use endian type in 'hfa384x_link_status' struct
The 'linkstatus' field from struct 'hfa384x_link_status' represents a
16-bit little-endian integer, so declare it as such to avoid the
following sparse warning when accessing it through the 'le16_to_cpu()'
function:

 prism2sta.c:1450:31: warning: cast to restricted __le16

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
AbdAllah-MEZITI a371a376de staging: wlan-ng: Fix sparse warning: cast to restricted __le16.
The same structure is used in both side, so we dont need to cast.
This will fix the following sparse warnings:
drivers/staging/wlan-ng/prism2sta.c:1139:13: warning: cast to restricted __le16
drivers/staging/wlan-ng/prism2sta.c:1150:24: warning: cast to restricted __le16
drivers/staging/wlan-ng/prism2sta.c:1157:37: warning: cast to restricted __le16
drivers/staging/wlan-ng/prism2sta.c:1158:37: warning: cast to restricted __le16
drivers/staging/wlan-ng/prism2sta.c:1159:40: warning: cast to restricted __le16
drivers/staging/wlan-ng/prism2sta.c:1450:31: warning: cast to restricted __le16

Signed-off-by: AbdAllah MEZITI <abdallah.meziti.pro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
Lynn Lei b5956dd26f drivers/staging/wlan-ng/p80211conv.c: fixed a potential memory leak
Fixed a potential memory leak inside skb_ether_to_p80211()
	When the wep_encrypt() fails  the code return 2 directly
	Which causes the p80211_wep->data dangling

Add a kfree statement to reclaim that memory allocated

Signed-off-by: Lynn Lei <lynnl.yet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
John Smith 33ebca0d05 staging: octeon: fix line over 80 characters
ethernet-rx.c:

fix WARNING: line over 80 characters

The code was restructured a bit, a helper function
was added to cvm_oct_poll.

Signed-off-by: John Smith <catalinnow@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
Teo Dacquet f85ac230d7 rtl8723bs: os_dep: ioctl_linux: fix several braces coding style issues.
Fix checkpatch issues:
ERROR: that open brace { should be on the previous line.
WARNING: braces {} are not necessary for single statement blocks.

Signed-off-by: Teo Dacquet <teo.dacquet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
Tom Gardi 05031914cb staging/rtl8723bs: Fix some coding style issues in rtw_odm.c.
WARNING: line over 80 characters
WARNING: static const char * array should probably be static const char * const
CHECK: Unnecessary parentheses around hal_data->odmpriv

Signed-off-by: Tom Gardi <gardi@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:17 -07:00
Christoffer Kjoelbaek cbd7cb83cf Staging: rtl8723bs: fix multiple missing spaces coding style problem
According to the coding-style documentation, spaces are required
around most binary and ternary operators. Spaces were added to
fix mulitple coding-style errors.

Signed-off-by: Christoffer Kjoelbaek <christoffer@kjoelbaek.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Julia Lawall f66af90acf staging: bcm2835-camera: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const.  Thus the vb2_ops
structures themselves can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };

@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct vb2_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Arvind Yadav 2c73e5761d staging: most: hdm-dim2: constify platform_device_id
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Bhumika Goyal 044cb69a92 staging: bcm2835-audio: make snd_pcm_hardware const
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Arvind Yadav 8654eb1fca staging: rtl8188eu: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Arvind Yadav 9b40a01738 staging: rtl8712: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Arvind Yadav 27acb55764 staging: most: usb: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Greg Kroah-Hartman 09cbc5de15 Revert "staging: imx: fix non-static declarations"
This reverts commit 9a5a6911aa as it
causes unneeded build warnings :(

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Badhri Jagan Sridharan fce042f02e staging: typec: tcpm: Report right typec_pwr_opmode
At present, TCPM does not take into account the actual resistor
value presented in the CC line and therefore reports TYPEC_PWR_MODE_USB
irrespective of the power_op_mode it is in.
This patch makes TCPM consider the actual value of Rp.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Badhri Jagan Sridharan c79d92bda8 staging: typec: tcpm: Check cc status before entering SRC_TRY_DEBOUCE
[  130.893355] state change SNK_DEBOUNCED -> SRC_TRY
[  130.893363] cc:=3
[  130.893490] pending state change SRC_TRY -> SNK_TRYWAIT @ 100 ms
[  130.895602] CC1: 3 -> 0, CC2: 0 -> 0 [state SRC_TRY, polarity 0, disconnected]
[  130.895613] state change SRC_TRY -> SRC_TRY_DEBOUNCE
[  130.895621] pending state change SRC_TRY_DEBOUNCE -> SRC_ATTACHED @ 20 ms
[  130.916843] state change SRC_TRY_DEBOUNCE -> SRC_ATTACHED [delayed 20 ms]

Although the CC state was changing to TYPEC_CC_OPEN, the port entered
SRC_TRY_DEBOUNCE from SRC_TRY. The port must enter SRC_TRY_DEBOUNCE only
if the CC state is TYPEC_CC_RD.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
[groeck: Wording]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Guenter Roeck b17dd57118 staging: typec: tcpm: Improve role swap with non PD capable partners
If the partner is not PD capable, we can not use a power role set request
to swap roles. Use the data role set request instead.

Also, if a partner is not PD capable, it does not really make sense to send
a PD message to trigger a role swap. On top of that, we should really wait
for the attempted role change to complete. Otherwise, it may well be that
user space requests another role change immediately afterwards which will
fail because the port is not yet in ready state.

Trigger the role swap from data role change requests and introduce new
state PORT_RESET and use it to solve the problem. This new state is
mostly identical to ERROR_RECOVERY, only it does not cause a pending
role change to fail. Use this new state also when initializing the driver.
Rename ERROR_RECOVERY_WAIT_OFF to PORT_RESET_WAIT_OFF to better reflect
its new meaning.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Guenter Roeck 9adf9f9ee7 staging: typec: tcpm: Add timeout when waiting for role swap completion
The Type-C protocol manager state machine could fail, which might result
in role swap requests from user space to hang forever. Add a generous
timeout when waiting for role swaps to complete to avoid this situation.

Originally-from: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Badhri Jagan Sridharan b46a9c9095 staging: typec: tcpm: Select default state based on port type
tcpm_default_state wasn't considering the port type when determining the
default role. This change makes tcpm_default_state to consider port type
as well.

tcpm_default_state would return the following based on the port type:
TYPEC_PORT_UFP - SNK_UNATTACHED
TYPEC_PORT_DFP - SRC_UNATTACHED
TYPEC_PORT_DRP - based on the preferred_role setting

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
[groeck: Reworded description; minor formatting changes]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Badhri Jagan Sridharan c749d4d0e4 staging: typec: tcpm: Set default state after error recovery based on port type
While exiting ERROR_RECOVERY, choose default state based on the port
type instead of current power role.

Quoting from specification:

4.5.2.2.2 ErrorRecovery State
This state appears in Figure 4-12, Figure 4-13, Figure 4-14, Figure 4-15,
Figure 4-16 and Figure 4-17.
The ErrorRecovery state is where the port removes the terminations from
the CC1 and CC2 pins for tErrorRecovery followed by transitioning to the
appropriate Unattached.SNK or Unattached.SRC state based on port type.
This is the equivalent of forcing a detach event and looking for a new
attach.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:16 -07:00
Guenter Roeck 3113bf1a5d staging: typec: tcpm: Report role swap complete after entering READY state
Role swap requests fail unless the current role is either SRC_READY or
SNK_READY. This works fine for VCONN and data role swaps, where we
immediately enter READY state after reporting a successful role swap
to user space. However, on power role changes, the role swap is currently
reported as successful while power negotiation is still in process.
User space does not know this, and may request another role swap
immediately after a power role swap is reported to be complete.
This second role swap will fail with -EAGAIN.

To fix the problem, report role swap completion after power negotiation
is complete and the state machine enters SRC_READY or SNK_READY state.
This is better anyway since it captures errors due to failed power
negotiations. It also simplifies the code since the number of calls
needed to report successful role swaps is reduced.

Reported-by: Howard Yen <howard_yen@htc.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Guenter Roeck 3c41dbde20 staging: typec: tcpm: Constify alternate modes
Constify alternate mode configuration data which won't be touched
by the driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Marcin Ciupak e221b2b11b staging: pi433: replace INVALID_PARAM macro with inline code
The following macro:
\#define INVALID_PARAM
	{ \
                dev_dbg(&spi->dev, "set: illegal input param"); \
                return -EINVAL; \
        }
affects control flow by having return statement. This is against
Linux Kernel Coding Style and should be avoided and therefore
this macro is replaced by inline code.

Additionally following 3 minor issues:

ERROR: code indent should use tabs where possible
ERROR: spaces required around that '!=' (ctx:VxV)
ERROR: space prohibited before that close parenthesis ')'

were fiexed inline.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Quentin Swain f2aee92d18 staging: pi433: replace logical not with bitwise
sparse reports the following warning  "warning: dubious: x & !y".
Replaced te logical not with bitwise to resolve the warning

Signed-off-by: Quentin Swain <dudebrobro179@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Peter Rosin 25ff38ca79 staging: vboxvideo: remove dead gamma lut code
The redundant fb helpers .load_lut, .gamma_set and .gamma_get are
no longer used. Remove the dead code that was not doing anything
sensible anyway.

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Hans de Goede 01d79e9b6a staging: vboxvideo: Call fb_deferred_io_cleanup() on cleanup
On driver cleanup we need to call fb_deferred_io_cleanup() if build
with CONFIG_FB_DEFERRED_IO set.

Suggested-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Hans de Goede 70ed0929fc staging: vboxvideo: Add dri-devel to lists of email-addresses to send patches to
Patches for the vboxvideo driver should also be Cc-ed to dri-devel,
update the TODO file accordingly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Cihangir Akturk 4a66af0d23 staging: vboxvideo: switch to drm_*{get,put} helpers
drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() adn should not be
used by new code. So convert all users of compatibility functions to use
the new APIs.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Cihangir Akturk 227fe242e0 staging: vboxvideo: select DRM_TTM
vboxvideo code uses various ttm_* functions, so it needs
"drivers/gpu/drm/ttm/*" to be built. In order to build these objects
select DRM_TTM.

This commit fixes "ttm_*" undefined build errors.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-18 15:57:15 -07:00
Narcisa Ana Maria Vasile 283d26917a iio: chemical: ccs811: Add triggered buffer support
A software trigger such as hrtimer can be used to capture the data
that will be stored in the buffer.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 08:08:02 +01:00
Andreas Klinger dc2696ba46 iio: srf08: add support for srf02 in i2c mode
srf02 added with support for i2c interface

Attributes for setting max range or sensitivity are omitted for the case of
srf02 type sensor, because they are not supported by the hardware.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 08:04:17 +01:00
Andreas Klinger c5bf4a0446 iio: srf08: add sensor type srf10
Ultrasonic sensor srf10 is quite similar to srf08 and now also supported by
the driver as device tree compatible string.

It was necessary to prepare the source for supplementary sensors. This is
done by enum srf08_sensor_type.

The most significiant difference between srf08 and srf10 is another range
and values of register gain (in the driver it's call sensitivity).
Therefore the array of it is extended and dependent of the sensor type.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 08:01:58 +01:00
Andreas Klinger a831959371 iio: srf08: add triggered buffer support
Add support for triggered buffers.

Data format is quite simple:
  distance     16 Bit
  alignment    48 Bit
  timestamp    64 Bit

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 08:00:17 +01:00
Andreas Klinger c02b3a113d iio: srf08: add device tree table
Added MODULE_DEVICE_TABLE for device tree bindings.

It used to work without it by using the i2c_device_id table, but adding the
table makes everything clear and documented.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 07:59:07 +01:00
Lorenzo Bianconi fd63d9260a dt-bindings: iio: magn: add LIS2MDL sensor device binding
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-17 15:53:41 +01:00
Lorenzo Bianconi d0b7fea58a iio: magnetometer: add support to LIS2MDL
add support to STMicroelectronics LIS2MDL magnetometer in
st_magn framework

http://www.st.com/resource/en/datasheet/lis2mdl.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-17 15:51:39 +01:00
Arnd Bergmann 3f09b8d2ea iio: adc: select triggered buffer for sama5d2 adc
Without the triggered buffer code, we get a link error:

drivers/iio/adc/at91-sama5d2_adc.o: In function `at91_adc_probe':
at91-sama5d2_adc.c:(.text+0x938): undefined reference to `devm_iio_triggered_buffer_setup'

This adds a Kconfig 'select' statement like other ADC
drivers have it already.

Fixes: 5e1a1da0f8 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-17 15:37:14 +01:00
Arvind Yadav 22d82cb952 staging: ccree: constify dev_pm_ops structures.
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-16 15:10:42 -07:00
Simon Sandström 8bf4851291 staging: ccree: Use sizeof(variable) in memory allocs
Fixes 9 checkpatch.pl warnings of type
"Prefer kmalloc(sizeof(variable)...) over kmalloc(sizeof(type)...)"
in staging/ccree.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-16 15:10:42 -07:00
Marcin Ciupak b4bac77f2a staging: pi433: rf69.c style fix - spaces open brace
This patch fixes the following checkpatch.pl error:

ERROR: space required before the open brace '{'

in rf69.c file as requested by TODO file.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:55:49 -07:00
Marcin Ciupak 46659ed7f6 staging: pi433: rf69.c style fix - else close brace
This patch fixes the following checkpatch.pl error:

ERROR: else should follow close brace '}'

in rf69.c file as requested by TODO file.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:55:48 -07:00
Marcin Ciupak 9391cb3160 staging: pi433: rf69.c style fix - that open brace
This patch fixes the following checkpatch.pl error:

ERROR: that open brace { should be on the previous line

in rf69.c file as requested by TODO file.

Note:
ERROR: else should follow close brace '}'
remains valid here and is going to be fixed by the next patch in set.

Additionally some style warnings remain valid here and could be fixed by
another patch.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:55:48 -07:00
Marcin Ciupak 35acd78f05 staging: pi433: style fix - space after asterisk
This patch is intended to fix coding style issues in order to comply
with kernel coding style guide as requested by TODO file.

It fixes the following checkpatch.pl error:

ERROR: "foo * bar" should be "foo *bar"

Note:
"WARNING: line over 80 characters" remains valid here and could be fixed
by another patch.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:54:26 -07:00
Arnd Bergmann 62f39d49d1 staging: pi433: reduce stack size in tx thread
Putting a 900 byte array on the stack is a clearly too much in the
kernel, and sometimes results in warnings like:

drivers/staging/pi433/pi433_if.c: In function 'pi433_tx_thread':
drivers/staging/pi433/pi433_if.c:645:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

This moves the buffer into the dynamically allocated per-device
structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:43:14 -07:00
Elia Geretto 125a452cdf staging: pi433: Use matching enum types calling rf69_set_packet_format
This patch fixes the following four warnings found using sparse:

drivers/staging/pi433/pi433_if.c:211:9: warning: mixing different enum types
drivers/staging/pi433/pi433_if.c:211:9:     int enum optionOnOff  versus
drivers/staging/pi433/pi433_if.c:211:9:     int enum packetFormat
drivers/staging/pi433/pi433_if.c:211:9: warning: mixing different enum types
drivers/staging/pi433/pi433_if.c:211:9:     int enum optionOnOff  versus
drivers/staging/pi433/pi433_if.c:211:9:     int enum packetFormat
drivers/staging/pi433/pi433_if.c:268:9: warning: mixing different enum types
drivers/staging/pi433/pi433_if.c:268:9:     int enum optionOnOff  versus
drivers/staging/pi433/pi433_if.c:268:9:     int enum packetFormat
drivers/staging/pi433/pi433_if.c:268:9: warning: mixing different enum types
drivers/staging/pi433/pi433_if.c:268:9:     int enum optionOnOff  versus
drivers/staging/pi433/pi433_if.c:268:9:     int enum packetFormat

This is done calling the rf69_set_packet_format function using the
appropriate enum for the packetFormat argument.

Signed-off-by: Elia Geretto <elia.f.geretto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 17:43:14 -07:00
Laurentiu Tudor 0116ced91d staging: fsl-mc: add explicit dependencies for compile-tested arches
The driver makes use of GENERIC_MSI_IRQ_DOMAIN which requires arch
support so, on architectures that don't have it, the kernel will fail
to build. Add explicit dependency on architectures that were
compile-tested, thus fixing compilation for the ones that don't
implement GENERIC_MSI_IRQ_DOMAIN.

Fixes: 0327485027 ("staging: fsl-mc: allow the driver compile multi-arch")

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 15:18:25 -07:00
Cihangir Akturk a2730bc735 staging: fsl-mc: fix resource_size.cocci warnings
Use resource_size() function on resource objects instead of
explicit computation.

This patch fixes the following coccinelle warning:

drivers/staging/fsl-mc/bus/dprc-driver.c:620:35-38: ERROR: Missing
resource_size with mc_dev -> regions

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 15:18:25 -07:00
Greg Kroah-Hartman 8652892ed4 Merge 4.13-rc5 into staging-next
We need it here for iio fixes.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14 13:35:22 -07:00
Linus Torvalds ef954844c7 Linux 4.13-rc5 2017-08-13 16:01:32 -07:00
Linus Torvalds b2298fc900 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
 "Another round of MIPS fixes:

   - compressed boot: Ignore a generated .c file

   - VDSO: Fix a register clobber list

   - DECstation: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression

   - Octeon: Fix recent cleanups that cleaned away a bit too much thus
     breaking the arch side of the EDAC and USB drivers.

   - uasm: Fix duplicate const in "const struct foo const bar[]" which
     GCC 7.1 no longer accepts.

   - Fix race on setting and getting cpu_online_mask

   - Fix preemption issue. To do so cleanly introduce macro to get the
     size of L3 cache line.

   - Revert include cleanup that sometimes results in build error

   - MicroMIPS uses bit 0 of the PC to indicate microMIPS mode. Make
     sure this bit is set for kernel entry as well.

   - Prevent configuring the kernel for both microMIPS and MT. There are
     no such CPUs currently and thus the combination is unsupported and
     results in build errors.

  This has been sitting in linux-next for a few days and has survived
  automated testing by Imagination's test farm. No known regressions
  pending except a number of issues that crept up due to lots of people
  switching to GCC 7.1"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Set ISA bit in entry-y for microMIPS kernels
  MIPS: Prevent building MT support for microMIPS kernels
  MIPS: PCI: Fix smp_processor_id() in preemptible
  MIPS: Introduce cpu_tcache_line_size
  MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
  MIPS: VDSO: Fix clobber lists in fallback code paths
  Revert "MIPS: Don't unnecessarily include kmalloc.h into <asm/cache.h>."
  MIPS: OCTEON: Fix USB platform code breakage.
  MIPS: Octeon: Fix broken EDAC driver.
  MIPS: gitignore: ignore generated .c files
  MIPS: Fix race on setting and getting cpu_online_mask
  MIPS: mm: remove duplicate "const" qualifier on insn_table
2017-08-13 15:34:28 -07:00