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,
Joe Korty [Wed, 25 May 2016 06:48:55 +0000 (12:18 +0530)]
Correct format specifier
u64 data types are displayed with %llu, not %u
drivers/mmc/core/debugfs.c:498:39: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int'
[-Wformat=] mmc_dbg_card_speed_class_get, NULL, "%u\n");
^
include/linux/fs.h:2667:29: note:
in definition of macro 'DEFINE_SIMPLE_ATTRIBUTE'
__simple_attr_check_format(__fmt, 0ull); \
Joe Korty [Wed, 25 May 2016 06:45:43 +0000 (12:15 +0530)]
Correct format specifier
Use %zd, not %d, for display of size_t in printk's
drivers/tty/tty_buffer.c:
In function 'tty_insert_flip_string_fixed_flag_lock':
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int', but
argument 3 has type 'size_t {aka long unsigned int}'
[-Wformat=]
drivers/tty/tty_buffer.c:354:4: note: in expansion of
macro 'pr_err'
pr_err("%s: No space: Requested %d, memory used: %d\n",
Joe Korty [Wed, 25 May 2016 06:40:39 +0000 (12:10 +0530)]
Give ampud_status an initial value of zero.
It is not actually used anywhere its value
is passed to, so any value would do.
drivers/net/wireless/iwlwifi/mvm/rx.c:
In function 'iwl_mvm_rx_rx_mpdu':
drivers/net/wireless/iwlwifi/mvm/rx.c:362:2:
warning: 'ampdu_status' may be used uninitialized
in this function [-Wmaybe-uninitialized]
iwl_mvm_pass_packet_to_mac80211(mvm, hdr, len, ampdu_status,
Joe Korty [Wed, 25 May 2016 06:39:09 +0000 (12:09 +0530)]
Remove unused label
net/wireless/nl80211.c:
In function 'cfg80211_ch_switch_notify':
net/wireless/nl80211.c:10425:1: warning:
label 'out' defined but not used [-Wunused-label]
Joe Korty [Wed, 25 May 2016 06:37:28 +0000 (12:07 +0530)]
Use #ifdef for the functions
Put the same '#ifdef' around the definition of
a function that is present around its use, so
that both definition and use are either present
or not present in the resulting binary.
drivers/base/cpu.c:291:12: warning:
'cpu_uevent' defined but not used [-Wunused-function]
Joe Korty [Wed, 25 May 2016 06:35:04 +0000 (12:05 +0530)]
Fix minor gcc problems in rtrace.c
1) when storing a pointer into an int,
tell the compiler that this
is OK by casting the pointer first to an int.
2) remove unused variable 'phys'.
This is not being used even under #ifdef.
fs/pstore/rtrace.c:58:13: warning: assignment makes
integer from pointer without a cast [-Wint-conversion]
fs/pstore/rtrace.c:48:16: warning:
unused variable 'phys' [-Wunused-variable]
Joe Korty [Tue, 24 May 2016 11:19:08 +0000 (16:49 +0530)]
Remove unused label
Wunused-label is a stupid gcc option as removing the
warnings it produces often makes the code harder to
read. But such is life ....
fs/pstore/ram.c:633:1: warning: label 'fail_init_fprz'
defined but not used [-Wunused-label]
fs/pstore/ram.c:629:1: warning: label 'fail_init_mprz'
defined but not used [-Wunused-label]
Joe Korty [Tue, 24 May 2016 11:01:23 +0000 (16:31 +0530)]
Delete unused function.
Clearly, the intent at one time was for it to be used,
but either the code that used it got deleted, or
compat_binfmt_elf.c never got the feature that was
expected to use it.
fs/compat_binfmt_elf.c: At top level:
fs/compat_binfmt_elf.c:58:13: warning:
'cputime_to_compat_timeval' defined but not used
[-Wunused-function]
static void cputime_to_compat_timeval(const cputime_t cputime,
Joe Korty [Tue, 24 May 2016 10:53:38 +0000 (16:23 +0530)]
Remove unused label
drivers/mmc/core/debugfs.c:
In function 'mmc_get_ext_csd_byte_val':
drivers/mmc/core/debugfs.c:519:1: warning:
label 'out_free' defined but not used
[-Wunused-label] out_free:
Inserting new pages in a handle to a vma does not seem
to improve perf in most cases and so is more like overhead.
Remove this path. Accounting dirty pages should not hold
handle lock again from within nvmap_handle_mk(), so add
an argument to it to avoid taking the lock again from
_nvmap_handle_mkdirty().
When handle has all clean pages, avoid any further clean operation.
Similarly for dirty pages. This avoids any unnecessary overeheads
in empty cuda kernel launch whose buffer is not accessed by cpu
before passing to GPU.
Bibek Basu [Wed, 29 Jun 2016 10:30:18 +0000 (16:00 +0530)]
arm64: config: update l4t defconfig
Enable support for EXT2 FS and disable Preempt
Traces
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
-CONFIG_PREEMPT_TRACER=y
Bryan Wu [Fri, 24 Jun 2016 21:54:44 +0000 (14:54 -0700)]
mm: remove memcg oom killer sync up with upstream
This memcg oom killer code was removed in upstream stable tree, but
still keep that. After enabling CONFIG_MEMCG in kernel, kernel booting
will give endless warning and system is not usable.
This patch fix this issue and it's required for using Docker on L4T