Keep 3.14 kernel consistent with the others - add -Werror like the others have |
|||||||||
Issue description
OS: Chrome OS R59 / ToT
I bypassed CQ to submit the Intel Core24 wireless driver drop.
This led to a bad patch that introduced a -Wunused-variable warning, which combined with -Werror made kernel builds fail.
3.14 kernel build did not fail, and instead just emitted a warning.
Fix this by adding -Werror to 3.14 as well .
>>> Source configured.
>>> Compiling source in /build/samus/tmp/portage/sys-kernel/chromeos-kernel-3_14-9999/work/chromeos-kernel-3_14-9999 ...
ERROR: ld.so: object 'libsandbox.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
make -j48 ARCH=x86_64 'LDFLAGS=-O1 -O2 --as-needed' CROSS_COMPILE=x86_64-cros-linux-gnu- O=/build/samus/var/cache/portage/sys-kernel/chromeos-kernel-3_14 'LD=/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51/ld ' 'CC=x86_64-cros-linux-gnu-gcc -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51' 'CXX=x86_64-cros-linux-gnu-g++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51' -k WIFIVERSION=-3.8
make[2]: Nothing to be done for 'all'.
CHK include/config/kernel.release
GEN /build/samus/var/cache/portage/sys-kernel/chromeos-kernel-3_14/Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[2]: Nothing to be done for 'relocs'.
Using /mnt/host/source/src/third_party/kernel/v3.14 as source for kernel
CALL /mnt/host/source/src/third_party/kernel/v3.14/scripts/checksyscalls.sh
CHK include/generated/compile.h
make[4]: 'arch/x86/realmode/rm/realmode.bin' is up to date.
CHK kernel/config_data.h
CC [M] drivers/net/wireless-3.8/iwl7000/iwlwifi/mvm/tx.o
/mnt/host/source/src/third_party/kernel/v3.14/drivers/net/wireless-3.8/iwl7000/iwlwifi/mvm/tx.c: In function 'iwl_mvm_set_tx_cmd':
/mnt/host/source/src/third_party/kernel/v3.14/drivers/net/wireless-3.8/iwl7000/iwlwifi/mvm/tx.c:205:28: warning: unused variable 'skb_info' [-Wunused-variable]
struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb);
^
LD [M] drivers/net/wireless-3.8/iwl7000/iwlwifi/mvm/iwlmvm.o
Building modules, stage 2.
Kernel: arch/x86/boot/bzImage is ready (#1)
MODPOST 266 modules
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
LD [M] drivers/net/wireless-3.8/iwl7000/iwlwifi/mvm/iwlmvm.ko
CC lib/test_module.mod.o
LD [M] lib/test_module.ko
>>> Source compiled.
See b/35647610 for more details on the problem and the fix
,
Mar 18 2017
complete patch set for the bug: https://chromium-review.googlesource.com/#/q/topic:3.14-Werror+(status:open+OR+status:merged)
,
Mar 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bd0c62c7de0c8a63314b7955e5718d8f6192f9d2 commit bd0c62c7de0c8a63314b7955e5718d8f6192f9d2 Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Sat Mar 18 23:10:52 2017 CHROMIUM: partitions/efi: Fix print specifier warning Commit abba28d0a1b7 ("CHROMIUM: block: partitions: efi: Add support for IGNOREME GPT signature") introduced the following warning, omiting an argument for pr_debug format string, fix it. partitions/efi.c: In function 'is_gpt_valid': partitions/efi.c:372:3: error: format '%llu' expects a matching 'long long unsigned int' argument [-Werror=format=] pr_debug("GUID Partition Table at LBA %llu marked IGNOREME\n"); BUG= chromium:702788 TEST=built and ran on samus Change-Id: I712c18b62055428d6d24c46216a75c0fa48916ef Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457236 Commit-Ready: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Kevin Cernekee <cernekee@chromium.org> [modify] https://crrev.com/bd0c62c7de0c8a63314b7955e5718d8f6192f9d2/block/partitions/efi.c
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3a558517a3bf900d031277cf350b8538fd8aaab5 commit 3a558517a3bf900d031277cf350b8538fd8aaab5 Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Mar 21 02:30:18 2017 CHROMIUM: drm: Fix -Wunused-label, removing err_release Commit 2baa2aef68ac ("CHROMIUM: drm/udl: remove drm_device_is_unplugged and related code") removed the usage of the err_release label, but not the definition, leading to a -Wunused-label that breaks the build with -Werror. Fix it. BUG= chromium:702788 TEST=built and ran on samus Change-Id: I0bcb9ee59f3c8a531eefde598fd12a5cbd9db77f Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457104 Reviewed-by: Kevin Cernekee <cernekee@chromium.org> [modify] https://crrev.com/3a558517a3bf900d031277cf350b8538fd8aaab5/drivers/gpu/drm/drm_fops.c
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/286238b8f75110139e93f68046373a2389503b8a commit 286238b8f75110139e93f68046373a2389503b8a Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Mar 21 02:30:21 2017 CHROMIUM: cpuidle: governors: menu: Fix -Wunused-function Commit 30977e124478 ("cpuidle: governor: menu: don't use loadavg") coming from Android (not present upstream) removed the usage of get_loadavg, but not the function itself, introducing the following warning, fix it. menu.c:138:12: error: 'get_loadavg' defined but not used [-Werror=unused-function] static int get_loadavg(void) BUG= chromium:702788 TEST=built and ran on samus Change-Id: I0713afd46c251bcdd4b1f24ac9c16d2d2b61a14a Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457237 Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/286238b8f75110139e93f68046373a2389503b8a/drivers/cpuidle/governors/menu.c
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8b2b9be628970ca69b0a26655fc569a7155509bb commit 8b2b9be628970ca69b0a26655fc569a7155509bb Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Mar 21 02:30:17 2017 CHROMIUM: mfd/cros_ec: Fix format warning, allow -Werror Fix the following warning to allow turning on -Werror in the 3.14 kernel. Later versions of cros_ec_lightbar.c in 3.18 and 4.4 already use the '%zu' format specifier. In function 'store_program': error: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Werror=format=] dev_info(dev, "Copying %d byte program to EC", count); BUG= chromium:702788 TEST=built and ran on samus Change-Id: I2c05f5c14bc94096a0fef21647ae206b6e1f60da Reviewed-on: https://chromium-review.googlesource.com/457218 Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org> Tested-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/8b2b9be628970ca69b0a26655fc569a7155509bb/drivers/mfd/cros_ec_lightbar.c
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2c73e40f5b2f59260f53b52720b57b838701bd16 commit 2c73e40f5b2f59260f53b52720b57b838701bd16 Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Mar 21 02:30:24 2017 CHROMIUM: Use simple_strtoull like upstream xtables Commit ef3e02ceed67 ("CHROMIUM: config: Add xt_quota2 for Android") introduced xt_quota2 into 3.14 and also fixed a couple of checkpatch warnings by changing simple_strtoull usage to kstrtoll.This makes it inconsistent with xt_quota2 in 3,18 and 4.4 kernels, and introduces -Wunused-result that breaks the build with -Werror. Revert to upstream usage. xt_quota2.c:173:3: error: ignoring return value of 'kstrtoll', declared with attribute warn_unused_result [-Werror=unused-result] kstrtoll(buf + 1, 0, &temp); ^ Fixes: ef3e02ceed67 ("CHROMIUM: config: Add xt_quota2 for Android") BUG= chromium:702788 TEST=built and ran on samus Change-Id: I9511f550c03ed27124abe26247db4607127b1776 Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457238 Reviewed-by: Kevin Cernekee <cernekee@chromium.org> [modify] https://crrev.com/2c73e40f5b2f59260f53b52720b57b838701bd16/net/netfilter/xt_quota2.c
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/15afffe0ec14d4b9f0f5179c720fe67e377011e0 commit 15afffe0ec14d4b9f0f5179c720fe67e377011e0 Author: Richard Guy Briggs <rgb@redhat.com> Date: Mon Jul 17 07:23:36 2017 BACKPORT: netlink: simplify nfnetlink_bind Remove duplicity and simplify code flow by moving the rcu_read_unlock() above the condition and let the flow control exit naturally at the end of the function. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit bfe4bc71c64a34813a7bde0ad4d28486679ac3fe) Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> BUG= chromium:702788 (fix existings warnings, enable -Werror on 3.14) TEST=build and boot on samus Change-Id: I64f97a0a516978ed6c6cf08e0fe5959c0b8de8fc Reviewed-on: https://chromium-review.googlesource.com/565790 Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org> Tested-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-by: Kevin Cernekee <cernekee@chromium.org> [modify] https://crrev.com/15afffe0ec14d4b9f0f5179c720fe67e377011e0/net/netfilter/nfnetlink.c
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/818a13700a9d16beeda3a7117d94b013f5f12af0 commit 818a13700a9d16beeda3a7117d94b013f5f12af0 Author: Mathieu Poirier <mathieu.poirier@linaro.org> Date: Mon Jul 17 07:23:37 2017 BACKPORT: netfilter: nfnetlink_acct: Adding quota support to accounting framework nfacct objects already support accounting at the byte and packet level. As such it is a natural extension to add the possiblity to define a ceiling limit for both metrics. All the support for quotas itself is added to nfnetlink acctounting framework to stay coherent with current accounting object management. Quota limit checks are implemented in xt_nfacct filter where statistic collection is already done. Pablo Neira Ayuso has also contributed to this feature. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> (cherry picked from commit 683399eddb9fff742b1a14c5a5d03e12bfc0afff) Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> BUG= chromium:702788 (fix existings warnings, enable -Werror on 3.14) TEST=build and boot on samus Change-Id: Iee1e82c43e82561417ab93a3b2cf9e065fa29244 Reviewed-on: https://chromium-review.googlesource.com/565791 Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org> Tested-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-by: Kevin Cernekee <cernekee@chromium.org> [modify] https://crrev.com/818a13700a9d16beeda3a7117d94b013f5f12af0/net/netfilter/xt_nfacct.c [modify] https://crrev.com/818a13700a9d16beeda3a7117d94b013f5f12af0/include/uapi/linux/netfilter/nfnetlink_acct.h [modify] https://crrev.com/818a13700a9d16beeda3a7117d94b013f5f12af0/include/uapi/linux/netfilter/nfnetlink.h [modify] https://crrev.com/818a13700a9d16beeda3a7117d94b013f5f12af0/net/netfilter/nfnetlink_acct.c [modify] https://crrev.com/818a13700a9d16beeda3a7117d94b013f5f12af0/include/linux/netfilter/nfnetlink_acct.h
,
Aug 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ccff86f225cd206f85c2caa2c484cd7c70481377 commit ccff86f225cd206f85c2caa2c484cd7c70481377 Author: NeilBrown <neilb@suse.de> Date: Sun Aug 13 07:57:07 2017 BACKPORT: sched: Remove proliferation of wait_on_bit() action functions The current "wait_on_bit" interface requires an 'action' function to be provided which does the actual waiting. There are over 20 such functions, many of them identical. Most cases can be satisfied by one of just two functions, one which uses io_schedule() and one which just uses schedule(). So: Rename wait_on_bit and wait_on_bit_lock to wait_on_bit_action and wait_on_bit_lock_action to make it explicit that they need an action function. Introduce new wait_on_bit{,_lock} and wait_on_bit{,_lock}_io which are *not* given an action function but implicitly use a standard one. The decision to error-out if a signal is pending is now made based on the 'mode' argument rather than being encoded in the action function. All instances of the old wait_on_bit and wait_on_bit_lock which can use the new version have been changed accordingly and their action functions have been discarded. wait_on_bit{_lock} does not return any specific error code in the event of a signal so the caller must check for non-zero and interpolate their own error code as appropriate. The wait_on_bit() call in __fscache_wait_on_invalidate() was ambiguous as it specified TASK_UNINTERRUPTIBLE but used fscache_wait_bit_interruptible as an action function. David Howells confirms this should be uniformly "uninterruptible" The main remaining user of wait_on_bit{,_lock}_action is NFS which needs to use a freezer-aware schedule() call. A comment in fs/gfs2/glock.c notes that having multiple 'action' functions is useful as they display differently in the 'wchan' field of 'ps'. (and /proc/$PID/wchan). As the new bit_wait{,_io} functions are tagged "__sched", they will not show up at all, but something higher in the stack. So the distinction will still be visible, only with different function names (gds2_glock_wait versus gfs2_glock_dq_wait in the gfs2/glock.c case). Since first version of this patch (against 3.15) two new action functions appeared, on in NFS and one in CIFS. CIFS also now uses an action function that makes the same freezer aware schedule call as NFS. Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: David Howells <dhowells@redhat.com> (fscache, keys) Acked-by: Steven Whitehouse <swhiteho@redhat.com> (gfs2) Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steve French <sfrench@samba.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/20140707051603.28027.72349.stgit@notabene.brown Signed-off-by: Ingo Molnar <mingo@kernel.org> (cherry picked from commit 743162013d40ca612b4cb53d3a200dff2d9ab26e) BUG= chromium:702788 (patch helps fix warning in mm/ to turn on -Werror) TEST=built and booted on samus Change-Id: I6271c89cfba643f486982d7e313d192139589619 Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/571085 Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/gfs2/super.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/cifs/inode.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/mm/ksm.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/mm/filemap.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/include/linux/wait.h [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/include/linux/writeback.h [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/security/keys/gc.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/pnfs.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/fscache/cookie.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/drivers/md/dm-bufio.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/drivers/md/dm-snap.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/buffer.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/kernel/ptrace.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/write.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/inode.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/Documentation/filesystems/caching/operations.txt [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/gfs2/recovery.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/pagelist.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/net/bluetooth/hci_core.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/fscache/page.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/inode.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/fscache/internal.h [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/gfs2/lock_dlm.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/file.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/nfs/nfs4state.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/cifs/file.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/security/keys/request_key.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/fs-writeback.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/btrfs/extent_io.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/kernel/sched/wait.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/gfs2/glock.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/gfs2/ops_fstype.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/cifs/connect.c [modify] https://crrev.com/ccff86f225cd206f85c2caa2c484cd7c70481377/fs/fscache/main.c
,
Aug 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e1b357ee64bd91a78c324907d5597d37fe1c1e1a commit e1b357ee64bd91a78c324907d5597d37fe1c1e1a Author: NeilBrown <neilb@suse.de> Date: Sun Aug 13 09:43:52 2017 BACKPORT: sched: Allow wait_on_bit_action() functions to support a timeout It is currently not possible for various wait_on_bit functions to implement a timeout. While the "action" function that is called to do the waiting could certainly use schedule_timeout(), there is no way to carry forward the remaining timeout after a false wake-up. As false-wakeups a clearly possible at least due to possible hash collisions in bit_waitqueue(), this is a real problem. The 'action' function is currently passed a pointer to the word containing the bit being waited on. No current action functions use this pointer. So changing it to something else will be a little noisy but will have no immediate effect. This patch changes the 'action' function to take a pointer to the "struct wait_bit_key", which contains a pointer to the word containing the bit so nothing is really lost. It also adds a 'private' field to "struct wait_bit_key", which is initialized to zero. An action function can now implement a timeout with something like static int timed_out_waiter(struct wait_bit_key *key) { unsigned long waited; if (key->private == 0) { key->private = jiffies; if (key->private == 0) key->private -= 1; } waited = jiffies - key->private; if (waited > 10 * HZ) return -EAGAIN; schedule_timeout(waited - 10 * HZ); return 0; } If any other need for context in a waiter were found it would be easy to use ->private for some other purpose, or even extend "struct wait_bit_key". My particular need is to support timeouts in nfs_release_page() to avoid deadlocks with loopback mounted NFS. While wait_on_bit_timeout() would be a cleaner interface, it will not meet my need. I need the timeout to be sensitive to the state of the connection with the server, which could change. So I need to use an 'action' interface. Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steve French <sfrench@samba.org> Cc: David Howells <dhowells@redhat.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/20140707051604.28027.41257.stgit@notabene.brown Signed-off-by: Ingo Molnar <mingo@kernel.org> (cherry picked from commit c1221321b7c25b53204447cff9949a6d5a7ddddc) BUG= chromium:702788 (patch helps fix warning in mm/ to turn on -Werror) TEST=built and booted on samus Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Change-Id: I414e631df69f77cf761e623fa617c4bae7ff6611 Reviewed-on: https://chromium-review.googlesource.com/571398 [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/fs/nfs/inode.c [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/include/linux/sunrpc/sched.h [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/fs/nfs/pagelist.c [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/kernel/sched/wait.c [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/fs/nfs/internal.h [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/fs/cifs/inode.c [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/net/sunrpc/sched.c [modify] https://crrev.com/e1b357ee64bd91a78c324907d5597d37fe1c1e1a/include/linux/wait.h
,
Aug 14 2017
Turning on -Werror in 3.14 is currently blocked on whirlwind and arkham boards. These boards have a different kernel configuration and way too many warnings to be fixed before I can add the last 3 patches in my series that turn on -Werror. Thoughts on how to proceed?
,
Aug 15 2017
My advice is to submit the Kconfig and Makefile changes that Kirtika has pending: https://chromium-review.googlesource.com/c/457140 https://chromium-review.googlesource.com/c/457141 Then rework this last CL to enable CONFIG_ERROR_ON_WARNING=y for every thing EXCEPT chromiumos-ipq806x.flavour.config: https://chromium-review.googlesource.com/c/457217 Then reassign the bug to Kan/Kishan/Srinni so they can decide how to handle this.
,
Aug 15 2017
,
Aug 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8a3897712651146d7632dbad9644e2fd57ab6b8a commit 8a3897712651146d7632dbad9644e2fd57ab6b8a Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Aug 15 21:54:09 2017 CHROMIUM: Add -Werror build option Add a config option "ERROR_ON_WARNING" that adds the "-Werror" flag to gcc, which turns warnings into errors. This has been present for all kernels except 3.14, fix the inconsistency. BUG= chromium:702788 TEST=built and ran on samus Change-Id: I61c9b1b49fe7d466c5d478f6388a79cacb8703a2 Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457140 Tested-by: Grant Grundler <grundler@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> [modify] https://crrev.com/8a3897712651146d7632dbad9644e2fd57ab6b8a/lib/Kconfig.debug
,
Aug 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d89d473e444aff581c598b71ae5538cfb9418b00 commit d89d473e444aff581c598b71ae5538cfb9418b00 Author: Kirtika Ruchandani <kirtika@chromium.org> Date: Tue Aug 15 21:54:10 2017 CHROMIUM: Add -Werror build option Add a config option "ERROR_ON_WARNING" that adds the "-Werror" flag to gcc, which turns warnings into errors. This has been present for all kernels except 3.14, fix the inconsistency. BUG= chromium:702788 TEST=built and ran on samus Change-Id: Ibd28c768b71e7c11ea953e174c328610faf2c094 Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457141 Tested-by: Grant Grundler <grundler@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> [modify] https://crrev.com/d89d473e444aff581c598b71ae5538cfb9418b00/Makefile
,
Jan 11 2018
,
Jan 11 2018
,
Jan 25 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7519f72552429b0a5d8a4538d283e4f6f247114a commit 7519f72552429b0a5d8a4538d283e4f6f247114a Author: Evan Green <evgreen@chromium.org> Date: Thu Jan 25 04:24:16 2018 CHROMIUM: config: Normalize config Accepted defaults of chromeos/scripts/kernelconfig oldconfig BUG= chromium:702788 TEST=None Change-Id: I6f1a95661c63cc653b543412e672a597b5183efe Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/876994 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/7519f72552429b0a5d8a4538d283e4f6f247114a/chromeos/config/base.config
,
Jan 25 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ab400e10f639b202c54c88a9da5be8a05e4fa340 commit ab400e10f639b202c54c88a9da5be8a05e4fa340 Author: Evan Green <evgreen@chromium.org> Date: Thu Jan 25 04:24:17 2018 CHROMIUM: Ignore missing renameat2 syscall on ARM. checksyscalls.sh emits a warning that renameat2 is not defined as a system call. This prevents enabling -Werror. The script attempts to match up the system calls defined in arch/x86/syscalls/syscall_32.tbl to the __NR_* defines. 3.14 doesn't implement renameat2, but it was added to syscall_32.tbl in commit 09cf777bcced ("BACKPORT: seccomp: add "seccomp" syscall") as a side effect of adding the seccomp system call, where renameat2 was sequentially before seccomp. Renameat2 is wired up to sys_ni_syscall. Actually defining __NR_renameat2 might be a little risky, as there are various preprocessor conditionals on #ifdef SYS_renameat2 that steer towards using that function. Adding this __IGNORE_ definition simply shuts up the checksyscalls script. BUG= chromium:702788 TEST=Build and boot veyron_minnie. Signed-off-by: Evan Green <evgreen@chromium.org> Change-Id: I8cdc2269138dcc83bd6852548a4a841a0fdfa551 Reviewed-on: https://chromium-review.googlesource.com/877161 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/ab400e10f639b202c54c88a9da5be8a05e4fa340/arch/arm/include/asm/unistd.h
,
Jan 25 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/425546cb91085c4bc0d4dd617d4da362d0ece7e1 commit 425546cb91085c4bc0d4dd617d4da362d0ece7e1 Author: Evan Green <evgreen@chromium.org> Date: Thu Jan 25 04:24:18 2018 CHROMIUM: Fix warnings in Rockchip components. This change makes some no-op modifications in order to enable Werror on the 3.14 kernel. Most of the warnings here are casts between integers and pointers of different sizes. These casts would be problematic if the physical addresses used here were above the 4GB line and were being cast to a 32-bit virtual address. Because this is non-upstreamed Rockchip-specific code, these physical addresses are known to be in the first 4GB. There's also a deletion of an unused local variable in here. BUG= chromium:702788 TEST=Build and boot veyron_minnie. Change-Id: I9ca72c1700748089540bb7c6170872cf7f5c4795 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/877331 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/425546cb91085c4bc0d4dd617d4da362d0ece7e1/drivers/gpu/drm/rockchip/rockchip_drm_gem.c [modify] https://crrev.com/425546cb91085c4bc0d4dd617d4da362d0ece7e1/arch/arm/mach-rockchip/pm.c [modify] https://crrev.com/425546cb91085c4bc0d4dd617d4da362d0ece7e1/drivers/clk/rockchip/clk-rk3288-dmc.c
,
Jan 25 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f17c1faf3db742a8f5a6bb1332880ca778e0354a commit f17c1faf3db742a8f5a6bb1332880ca778e0354a Author: Evan Green <evgreen@chromium.org> Date: Thu Jan 25 08:15:52 2018 CHROMIUM: Remove unused functions in brcm80211. This change removes a couple of unused static functions, needed to enable Werror. These functions became dead in commit 9e637ccc6543 ("CHROMIUMOS: brcmfmac: Disable TDLS") The warning they produce is: drivers/net/wireless-3.8/brcm80211/brcmfmac/wl_cfg80211.c:4473:12: warning: 'brcmf_cfg80211_tdls_oper' defined but not used [-Wunused-function] BUG= chromium:702788 TEST=Build veyron_minnie. Fixes: 9e637ccc6543 ("CHROMIUMOS: brcmfmac: Disable TDLS") Change-Id: I54d9649150cd7d9add59626408c48af0aaa01e98 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/877389 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/f17c1faf3db742a8f5a6bb1332880ca778e0354a/drivers/net/wireless-3.8/brcm80211/brcmfmac/wl_cfg80211.c
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/764df62570486d0ce03181fa2b3ddecb5f830554 commit 764df62570486d0ce03181fa2b3ddecb5f830554 Author: Takashi Iwai <tiwai@suse.de> Date: Fri Jan 26 03:23:29 2018 UPSTREAM: ALSA: usb: Convert to snd_card_new() with a device pointer Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de> BUG= chromium:702788 TEST=Use USB sound card Change-Id: Ia138cb2a87771382d8c0ac77563cbe89f7e0db93 Signed-off-by: Evan Green <evgreen@chromium.org> (cherry picked from commit 874b8d422e26e21dd432657e25f679c75440c1bc) Reviewed-on: https://chromium-review.googlesource.com/876979 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/usx2y/usbusx2y.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/caiaq/device.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/usx2y/us122l.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/hiface/chip.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/misc/ua101.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/6fire/chip.c [modify] https://crrev.com/764df62570486d0ce03181fa2b3ddecb5f830554/sound/usb/card.c
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/36bfb81bc2c912683ffadd9b893906cb599e6a3a commit 36bfb81bc2c912683ffadd9b893906cb599e6a3a Author: Evan Green <evgreen@chromium.org> Date: Fri Jan 26 03:23:28 2018 CHROMIUM: Remove unused function in NFS. Remove a function that got orphaned as a result of commit ccff86f225cd ("BACKPORT: sched: Remove proliferation of wait_on_bit() action functions") BUG= chromium:702788 TEST=Built veyron_minnie Change-Id: Ia0a22bdfff9019372c79dca486f38ea50e975777 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/877391 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/36bfb81bc2c912683ffadd9b893906cb599e6a3a/fs/nfs/pagelist.c
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/0e8c95d806253cc91534117803f1fe9c07db7b09 commit 0e8c95d806253cc91534117803f1fe9c07db7b09 Author: Evan Green <evgreen@chromium.org> Date: Fri Jan 26 03:23:31 2018 CHROMIUM: ARM: use min_t() in free_bootmem optimization This change avoids a warning about "comparison of distinct pointer types lacks a cast". It was pulled from the v3.18 tree (where it's also a CHROMIUM commit). BUG= chromium:702788 TEST=Build and boot veyron_minnie Change-Id: Id40c6748f9dd09c65e38b19b57937d00e3eff1cc Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/877439 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org> [modify] https://crrev.com/0e8c95d806253cc91534117803f1fe9c07db7b09/arch/arm/mm/init.c
,
Jan 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ce26c36f6a920b1bf380090b78710f0eb975753e commit ce26c36f6a920b1bf380090b78710f0eb975753e Author: Evan Green <evgreen@chromium.org> Date: Fri Jan 26 03:23:34 2018 CHROMIUM: config: enable ERROR_ON_WARNING This change enables CONFIG_ERROR_ON_WARNING for all 3.14 targets except ipq806x, which contains the whirlwind, arkham, and storm overlays. A few fixes were needed to get this building cleanly. BUG= chromium:702788 TEST=Build and boot veyron_minnie and samus. Build whirlwind Change-Id: I24f07c59a637ba7ca66769b92f71d195790dab44 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/879549 Commit-Ready: Evan Green <evgreen@google.com> Tested-by: Evan Green <evgreen@google.com> Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/mips/common.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/i386/common.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/armel/chromiumos-arm.flavour.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/armel/chromiumos-rockchip.flavour.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/arm64/common.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/base.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/armel/chromiumos-cygnus.flavour.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/x86_64/common.config [modify] https://crrev.com/ce26c36f6a920b1bf380090b78710f0eb975753e/chromeos/config/armel/chromiumos-ipq806x.flavour.config
,
Jan 26 2018
Nice work! Mark as Fixed now?
,
Jan 29 2018
,
Jan 29 2018
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by kirtika@chromium.org
, Mar 17 2017Diff for adding Werror is fairly simple, but there's a bunch of warnings that will need to be resolved first. Working on it. diff --git a/Makefile b/Makefile index 5f19d4630b296..3e0eb3468b6b0 100644 --- a/Makefile +++ b/Makefile @@ -687,6 +687,10 @@ endif NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS += $(NOSTDINC_FLAGS) +ifdef CONFIG_ERROR_ON_WARNING +KBUILD_CFLAGS += -Werror +endif + # warn about C99 declaration after statement KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) diff --git a/chromeos/config/base.config b/chromeos/config/base.config index a6b260d18e236..af2ef95a93484 100644 --- a/chromeos/config/base.config +++ b/chromeos/config/base.config @@ -372,6 +372,7 @@ CONFIG_ENCRYPTED_KEYS=y CONFIG_EPOLL=y # CONFIG_EQUALIZER is not set CONFIG_ETHERNET=y +CONFIG_ERROR_ON_WARNING=y # CONFIG_ETHOC is not set CONFIG_EVENTFD=y CONFIG_EVENT_TRACING=y diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d163dbe1ef869..dbdf08f8b391b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1656,6 +1656,15 @@ config TEST_FIRMWARE If unsure, say N. +config ERROR_ON_WARNING + bool "Treat compiler warnings as errors" + help + If you say Y here, the Makefile will pass the "-Werror" option to the + compiler. This will cause the compiler to fail on any warning, as if + it were an error. + + If unsure, say N. + source "samples/Kconfig" source "lib/Kconfig.kgdb"