i2c: tegra: fix unknown interrupt issue after ARB lost
For i2c transaction with repeat start (We post 7W [header + data
for Write followed by read in FIFO]) and unmask required interrupts.
But HW starts processing if there are atleast 3W in FIFO and during
this time if ARB lost error occurs then current data in FIFO is cleared
and chance of posting remaining data after FIFO is cleared. Now
SW handles the ARB lost error as interrupts are enabled later after
posting all packets and after clearing the ARB lost interrupt the
packet mode is disabled(Normal mode), which causes the Normal mode
interrupt(Unknown interrupt in case of packet mode) due to stale
data in fifo.
- To fix this, enable (unmask) error interrupt before posting the
packets into FIFO and clear the packet mode disable before clearing
ARB lost error also for other errors(NACK/FIFO overflow).
- Dont issue bus clear for ARB lost error if bus is operating in
multimaster mode.
Deepak Nibade [Tue, 24 May 2016 08:21:26 +0000 (13:51 +0530)]
gpu: nvgpu: suppress prints in submit path
When we run out of gpfifo space or private command buffer
space, we have error spew like below :
__gk20a_channel_syncpt_incr: not enough priv cmd buffer space
gk20a_submit_channel_gpfifo: fail
Dumping these prints to UART cause increase in submit
latencies
But on these failures, we return -ENOSPC to UMD and then
UMD retries the submit, hence it might be unnecessary to dump
these prints
Hence, remove the error prints of insufficient space
and use gk20a_dbg_fn() instead of gk20a_err() to print failure
in gk20a_submit_channel_gpfifo()
During a critical thermal trip, orderly_poweroff is called.
However, if the userspace is slow to react to poweroff (systemd),
and the thermal zone is configured with polling mode because of
either polling_delay or passive_delay, thermal_core may end up
in calling orderly_poweroff multiple times.
This eventually slows the userspace even more by
scheduling overwhelming number of threads in the system.
Relevant dump_stack spew during the shutdown process:
dump_backtrace+0x0/0xf4
show_stack+0x14/0x1c
dump_stack+0x20/0x28
handle_critical_trips+0x80/0xa0
handle_thermal_trip+0x40/0x64
thermal_zone_device_update+0xf0/0x110
thermal_zone_device_check+0x10/0x18
process_one_work+0x274/0x430
worker_thread+0x184/0x294
kthread+0xc0/0xc8
We should not try to spawn-off more threads once we have
decided to shutdown i.e. we should disable polling mode
once it is known that a critical trip is going to result
in a poweroff. This patch does that by setting the polling
and passive delay to zero which cancels the repeated work
and allows userspace to shutdown.
Fix s/g/query dv timings compliance, report not
supported if the sub device on CSI does not support
the timing fops.
Fix s/g crop fops for sub devices which does not
support cropping.
Fix subdev used in s/g param fops.
Ignore only frame height or width short/long errors
from CSI. Resolution mismatch can occur the actual lines
can be inclusive of embedded data lines which application
ignores anyway. Report failure only when the pixel parser
or CIL status is wrong.
Add maxframerate field as part of pixelformat
to distinguish different framerate ranges support
as two different modes in sensor drivers.
e.g: 4k@(0-30) and 4K@(0-60).
More parameters might be changed in sensor with a
framerate range for optimal usage.
In print_avi_infoframe, it allocates array buffer of 17 bytes.
It might run into a case to access array buffer at byte position 28.
in hdmi_infoframe_unpack when switch case value is SPD.
Ahung Cheng [Fri, 3 Jun 2016 10:22:05 +0000 (18:22 +0800)]
drivers: media: camera: Gang Mode from device tree
Add support for reversing CSI mapping by looking for a new entry,
gang-mode. Set gang mode to GANG_MODE_R_L, instead of default
GANG_MODE_L_R, to swap input ports.
Bitan Biswas [Wed, 17 Feb 2016 12:24:10 +0000 (17:54 +0530)]
mmc: sdhci: allow clock enable in suspend sequence
Some host with SDHCI_QUIRK2_NON_STD_RTPM deviation
need to enable clock in the suspend sequence.
This change enables such platforms to
suspend properly.
Joe Korty [Wed, 25 May 2016 13:09:41 +0000 (18:39 +0530)]
Fix uninitialized variable
Quiet gcc warning by giving 'in6' an initial
value of NULL.
Technically this is wrong, but there seems to
be no path through the function where 'in6' is
not set then used. If that is wrong, we will
get a NULL pointer kernel panic. Though bad,
that is better then the current situation,
where some random spot in the kernel gets
modified via the following of an undefined
pointer value in 'in6'.
include/net/ipv6.h:417:34: warning:
'in6' may be used uninitialized in this function
[-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;
net/ipv4/tcp.c:3513:19: note: 'in6' was declared here
struct in6_addr *in6;
Joe Korty [Wed, 25 May 2016 13:05:34 +0000 (18:35 +0530)]
Remove unused variables and labels
drivers/media/i2c/imx185.c:548:6:
warning: unused variable 'i' [-Wunused-variable]
drivers/media/i2c/imx185.c:644:1:
warning:
label 'fail' defined but not used [-Wunused-label]
drivers/media/i2c/imx185.c:999:7:
warning:unused variable 'dt_name' [-Wunused-variable]
drivers/media/i2c/imx185.c:560:9:
warning: 'gain' may be used uninitialized in this
function [-Wmaybe-uninitialized]
Joe Korty [Wed, 25 May 2016 12:58:56 +0000 (18:28 +0530)]
Silence uninitialized variable warning
When we go through the switch() case
where 'send_direct' is not initialized, the
code later on that uses 'send_direct' will
be skipped over. So it is safe to set this
'send_direct' to any value we want in order
to quiet this gcc warning.
net/mac80211/cfg.c: In function 'ieee80211_tdls_mgmt':
net/mac80211/cfg.c:3225:5: warning:
'send_direct' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (send_direct) {
Joe Korty [Wed, 25 May 2016 12:57:27 +0000 (18:27 +0530)]
Add default case in switch statement
Provide a reasonable default value
(ie, the original value) for smps_mode
when a new value is not being assigned.
This forces the value of 'changed' to be correct
when no attempt at changing is being done to
'smps_mode'.
net/mac80211/ht.c: In function
'ieee80211_ht_cap_ie_to_sta_ht_cap':
net/mac80211/ht.c:232:5: warning:
'smps_mode' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (smps_mode != sta->sta.smps_mode)
Joe Korty [Wed, 25 May 2016 12:47:49 +0000 (18:17 +0530)]
Fix 'const' propagation prob
The strings pointed to are unchanging while in use,
so add a 'const' to the string definition.
drivers/usb/misc/usb_nvshieldled.c:
In function 'nvshieldled_probe':
drivers/usb/misc/usb_nvshieldled.c:394:7: warning:
passing argument 3 of 'of_property_read_string' from
incompatible pointer type [-Wincompatible-pointer-types]
&edp_name)) {
In file included from drivers/usb/misc/usb_nvshieldled.c:26:0:
include/linux/of.h:268:12: note: expected 'const char **' but
argument is of type 'char **'
extern int of_property_read_string(struct device_node *np,
Gaurav Singh [Wed, 25 May 2016 12:45:10 +0000 (18:15 +0530)]
Fix the casting issue
Allow a 64 bit pointer to be cast and put into a
32-bit integer, when that pointer points to a
location within a 32 bit userspace.
Normally this is a very bad thing to do, the compiler
is right to warn us about this, but in this very
specific case, it is OK.
In file included from fs/compat_binfmt_elf.c:128:0:
fs/binfmt_elf.c: In function 'create_elf_tables':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/elf.h:143:7:
warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
(elf_addr_t)current->mm->context.vdso);
fs/binfmt_elf.c:216:26: note:
in definition of macro 'NEW_AUX_ENT'
elf_info[ei_index++] = val;
fs/binfmt_elf.c:226:2: note:
in expansion of macro 'ARCH_DLINFO'
ARCH_DLINFO;
Joe Korty [Wed, 25 May 2016 12:56:24 +0000 (18:26 +0530)]
Fix uninitialized variable
sound/soc/codecs/rt5639.c: In function 'rt5639_pll_calc':
sound/soc/codecs/rt5639.c:2833:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
pll_code->m_code = m;
Joe Korty [Wed, 25 May 2016 12:54:57 +0000 (18:24 +0530)]
Fix kernel warnings
1) rt5659_enable_push_button_irq() is not yet being
used, so comment it out with #ifdef FIXME.
2) Give mt_t an initial value of zero, for those
paths where it is not initialized.
sound/soc/codecs/rt5659.c:1314:13: warning:
'rt5659_enable_push_button_irq' defined but
not used [-Wunused-function]
static void
rt5659_enable_push_button_irq(struct snd_soc_codec *codec,
sound/soc/codecs/rt5659.c: In function 'rt5659_pll_calc':
sound/soc/codecs/rt5659.c:3636:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
pll_code->m_code = m;
JC Kuo [Sun, 20 Dec 2015 06:37:02 +0000 (14:37 +0800)]
xhci-hcd: support soft retry on SS transfer error
This commit implements XHCI "soft retry" for SuperSpeed endpoints which
encounters transfer errors.
When transfer error happens on an SuperSpeed endpoint, XHCI driver will
1. queue a "reset endpoint" command with TSP=1 (Transfer State Preserve)
2. invoke a HCD driver specific callback "->endpoint_soft_retry()" to let
HCD driver has a chance to configure its hardware
3. ring door bell for the endpoint upon seeing the command completion
Return error if otp read or fuse id read fails
Turn off power before returning error and remove
check for device not available during power off as
it's already verified during power on.
Ahung Cheng [Tue, 21 Jun 2016 10:39:53 +0000 (18:39 +0800)]
video: tegra: dc: HDMI SPD InfoFrame support
Add support to send SPD over Generic InfoFrame.
Please be noted that once SPD InfoFrame support is
enabled, HDR InfoFrame will be disabled as only one
of them can use Generic InfoFrame at one time.
To enable SPD InfoFrame, please add this in kernel config
CONFIG_TEGRA_HDMI_SPD_INFOFRAME=y
And add source product description format as below under
hdmi-display in device tree
spd-infoframe {
vendor-name = "XXX";
product-description = "YYY";
source-information = <N>;
};
Joe Korty [Wed, 25 May 2016 12:52:48 +0000 (18:22 +0530)]
Fix uninitialized variable
drivers/staging/iio/meter/ina3221.c: In function
'ina3221_get_shuntv_offset':
drivers/staging/iio/meter/ina3221.c:1021:25: warning:
'offset' may be used uninitialized in this function
[-Wmaybe-uninitialized] shuntv_offset->offset = offset;
L1SS configuration parameters need to be programmed
only for Tegra root ports and immediate devices (EP/UP port).
This change fixes the unwanted programming being done
to other devices apart from the ones mentioned above
This packet timeout prevents system entering suspend.
This 500ms timeout is too long, which will slow
resume/suspend cycle in WiFi wakeup, so reducing it to 100ms.
Also, BRCM confirmed that it's safe to remove this timeout.
Change-Id: I62dd11e292d3c9fbfe959d76fc510c2115958b7e Signed-off-by: Leo He <leoh@nvidia.com>
Reviewed-on: http://git-master/r/1023810
(cherry picked from commit e1395c20bf28b4eb5412534d46da9949db6cc8a0)
Reviewed-on: http://git-master/r/1176046
GVS: Gerrit_Virtual_Submit Reviewed-by: Hayden Du <haydend@nvidia.com>
Michael Frydrych [Fri, 17 Jun 2016 14:39:30 +0000 (17:39 +0300)]
video: tegra: dc: fix bit depth of yuv422 mode
Bit depth of yuv422 mode was set to 10-bits, while it should
have been set to 12-bits. Incorrect bit depth resulted in the
mode not being intercepted when setting yuv422 black.
Ninad Malwade [Tue, 28 Jun 2016 06:59:44 +0000 (14:59 +0800)]
arch: arm64: kernel: disable the regs dump
- When user space app tried to call a syscall
which is not implemented in kernel, then
it dumps the process name, syscall number
and the registers along with PC and LR.
- This leads to kernel_warning GVS failures.
- Since, the regs dump is just for the
information purspose, it's safe to ignore
and thus, putting it under CONFIG_DEBUG_USER.
- This is surfaced while trying to port 16.04
rootfs and it's a must change for switching.
Joe Korty [Wed, 25 May 2016 12:12:43 +0000 (17:42 +0530)]
Pointers fit inside unsigned long
drivers/net/ethernet/smsc/smc91x.c:
In function 'smc_probe':
drivers/net/ethernet/smsc/smc91x.c:1899:7: warning:
cast from pointer to integer of
different size [-Wpointer-to-int-cast]
if (((unsigned int)ioaddr &
(0x3e0 << SMC_IO_SHIFT)) != val) {
Joe Korty [Wed, 25 May 2016 12:08:14 +0000 (17:38 +0530)]
Fix the return type explicitly
gcc does not like longs being compared
to pointers; tell the compiler that this
is OK by hand-casting the long integer to
the required pointer type first.
kernel/sched/core.c: In function 'idle_cpu_relaxed':
kernel/sched/core.c:3863:39: warning:
comparison between pointer and integer
if (cpu_relaxed_read_long(&rq->curr) != rq->idle)
Joe Korty [Wed, 25 May 2016 12:06:00 +0000 (17:36 +0530)]
Fix the return type explicitly
gcc does not like a long put into a pointer
without an explicit cast.
kernel/mutex.c: In function 'mspin_unlock':
kernel/mutex.c:155:17: warning:
assignment makes pointer from integer
without cast [-Wint-conversion]
while (!(next = cpu_relaxed_read_long(&(node->next))))
Joe Korty [Wed, 25 May 2016 09:08:19 +0000 (14:38 +0530)]
Fix __init section mismatch in usb gadget driver
gcc complains when __init variables or __init functions
are referenced from non-init code, as by the time the
non-init code is run, the __init variables and functions
it references might no longer exist.
Fix by removing the __init from the afunc_bind defition.
This allows it to be called from anywhere, anytime without
problem.
WARNING: drivers/usb/gadget/g_audio.o(.text+0x101c): Section
mismatch in reference from the function audio_bind_config()
to the function .init.text:afunc_bind()
The function audio_bind_config() references
the function __init afunc_bind().
This is often because audio_bind_config lacks a __init
annotation or the annotation of afunc_bind is wrong.
Joe Korty [Wed, 25 May 2016 07:51:40 +0000 (13:21 +0530)]
Correct the declaration of variable
Do not declare a variable in the middle of a
C code block.Moved the declaration to the front
of the block.
sound/soc/codecs/audience/es-d300.c:
In function '_es_stop_route':
sound/soc/codecs/audience/es-d300.c:294:4:
warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
u32 cmd = escore->dhwpt_cmd & 0xFFFF0000;
Joe Korty [Wed, 25 May 2016 07:36:52 +0000 (13:06 +0530)]
Fix integer size errors in printf format
drivers/mmc/core/debugfs.c:544:44: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:553:45: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:562:42: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:572:41: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:34:27 +0000 (13:04 +0530)]
Correct format specifier
%d -> %zd printk format statement transformation
sound/soc/codecs/audience/escore-vs.c:870:24:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:32:13 +0000 (13:02 +0530)]
Use atomic_read to access atomic var
Also fix a few format statement mismatches,
%u -> %lu.
sound/soc/codecs/audience/es-d300.c:1317:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1332:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1355:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1386:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1398:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1412:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1433:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:29:05 +0000 (12:59 +0530)]
Correct format specifier
d -> %zd format statement transformation, fixes
sound/soc/codecs/audience/es755.c:
In function 'codec_reg_dump_store':
sound/soc/codecs/audience/es755.c:528:11:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]
pr_debug("%s(): requested - %s, count=%d\n",
__func__, buf, count);
Joe Korty [Wed, 25 May 2016 07:27:18 +0000 (12:57 +0530)]
pr_err requires size_t be printed with %zu
drivers/usb/gadget/rndis.c:
In function 'rndis_rm_hdr':
include/linux/kern_levels.h:4:18: warning:
format '%u' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:22:41 +0000 (12:52 +0530)]
longs are printed with %lx
sound/pci/hda/hda_intel.c:
In function 'azx_single_wait_for_response':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of
type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
sound/pci/hda/hda_intel.c:1147:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: get_response timeout: IRS=0x%x\n",
sound/pci/hda/hda_intel.c:
In function 'azx_single_send_cmd':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
sound/pci/hda/hda_intel.c:1175:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: send_cmd timeout: IRS=0x%x, val=0x%x\n",
Joe Korty [Wed, 25 May 2016 11:55:45 +0000 (17:25 +0530)]
Correct g_ether module init & exit fn
Replace u_ether.c's use of __initcall and __exitcall
with direct invocations of its init and exit function
from ether.c's module_init and module_exit functions.
We have to do this as 1) __initcall cannot be used
from within a module, and 2) module_init cannot be
declared more than once inside any .c file, and
3) ether.c #includes u_ether.c.
Fortunately, ether.c unconditionally includes u_ether.c,
so we can unconditionally add the u_ether.c's init code
directly to ether.c's init function.
include/linux/init.h:298:27:
error: redefinition of '__inittest'
static inline initcall_t __inittest(void)
include/linux/init.h:291:30: note:
in expansion of macro 'module_init'
drivers/usb/gadget/u_ether.c:1216:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_exit);
include/linux/init.h:298:27: note:
previous definition of '__inittest' was here
static inline initcall_t __inittest(void)
include/linux/init.h:291:30: note:
in expansion of macro 'module_init'
drivers/usb/gadget/u_ether.c:1209:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_init);
drivers/usb/gadget/u_ether.c: In function '__inittest':
drivers/usb/gadget/u_ether.c:1216:17: warning:
return from
incompatible pointer type [-Wincompatible-pointer-types]
device_initcall(gether_exit);
include/linux/init.h:299:11:
note: in definition of macro 'module_init'
{ return initfn; }
Joe Korty [Wed, 25 May 2016 12:15:05 +0000 (17:45 +0530)]
Fix the explicit cast
gcc requires that when an integer value is being
returned through a pointer, that value be explicity
cast first to a pointer type.
drivers/usb/gadget/u_ether.c:
In function 'gether_setup_name':
drivers/usb/gadget/u_ether.c:963:24: warning:
return makes pointer from integer
without a cast [-Wint-conversion]
return -ENOMEM;
Joe Korty [Wed, 25 May 2016 12:04:04 +0000 (17:34 +0530)]
Fix unwanted #ifdef in swtich case
SCAN_SUSPEND_ABORT is always defined in the
enumeration,so no need to '#ifdef' out its
use in those kernels for which this feature
is not compiled in.
net/mac80211/scan.c: In function 'ieee80211_scan_work':
net/mac80211/scan.c:758:3: warning:
enumeration value 'SCAN_SUSPEND_ABORT'
not handled in switch [-Wswitch]
switch (local->next_scan_state) {
Joe Korty [Wed, 25 May 2016 12:02:34 +0000 (17:32 +0530)]
Include required header file
Insert missing include file, felt
when CONFIG_COMPAT=n
drivers/devfreq/governor_wmark_active.c:
In function 'devfreq_watermark_target_freq':
drivers/devfreq/governor_wmark_active.c:146:25:
error: implicit declaration of function
'ktime_get' [-Werror=implicit-function-declaration]
ktime_t current_time = ktime_get();
Joe Korty [Wed, 25 May 2016 11:58:40 +0000 (17:28 +0530)]
Include the required header file
Insert missing #include file, felt
when CONFIG_COMPAT=n.
drivers/firmware/tegra/bpmp.c:
In function 'bpmp_ping_show':
drivers/firmware/tegra/bpmp.c:465:7: error:
implicit declaration of
function 'ktime_get' [-Werror=implicit-function-declaration]
tm = ktime_get();
drivers/firmware/tegra/bpmp.c:465:5: error:
incompatible types when assigning to type 'ktime_t
{aka union ktime}' from type 'int'
tm = ktime_get();
include/linux/ktime.h:85:30: error: request for member
'tv64' in something not a structure or union
({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
^
drivers/firmware/tegra/bpmp.c:468:7: note: in expansion
of macro 'ktime_sub'
tm = ktime_sub(ktime_get(), tm);
Gaurav Singh [Wed, 25 May 2016 11:46:34 +0000 (17:16 +0530)]
Fix trace_sched_switch_end definition
We model what we do here on other empty (no arg)
tracepoint function definitions in the kernel.
In file included from include/trace/define_trace.h:86:0,
from include/trace/events/sched.h:452,
from kernel/sched/core.c:94:
include/trace/events/sched.h:
In function 'ftrace_define_fields_sched_switch_end':
include/trace/ftrace.h:327:27:
warning: unused variable 'field' [-Wunused-variable]
struct ftrace_raw_##call field;
include/trace/ftrace.h:32:2:
note: in expansion of macro 'DECLARE_EVENT_CLASS'
DECLARE_EVENT_CLASS(name,
include/trace/events/sched.h:155:1:
note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(sched_switch_end,
Joe Korty [Wed, 25 May 2016 09:17:20 +0000 (14:47 +0530)]
Fix return type of xchg()
The kernel does not like it when the return
value of xchg() is not being used, so tell
it when that is indeed the proper use.
drivers/media/platform/tegra/camera.c:
In function 'camera_remove':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/atomic.h:198:30:
note: in expansion of macro 'xchg'
drivers/media/platform/tegra/camera.c:1201:2:
note: in expansion of macro 'atomic_xchg'
atomic_xchg(&cam_desc.in_use, 0);
drivers/media/platform/tegra/camera.c:
In function 'camera_shutdown':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))
Joe Korty [Wed, 25 May 2016 09:12:26 +0000 (14:42 +0530)]
fix incompatible ptr type
The '&length' argument must be a long*, not an int*.
drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
prop = of_get_flat_dt_prop(node, "linux,phandle", &len);
In file included from drivers/of/of_reserved_mem.c:18:0:
include/linux/of_fdt.h:88:14: note:
expected 'long unsigned int *' but argument is of type 'int *'
extern void *of_get_flat_dt_prop(unsigned long node,
const char *name,