From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934883AbcKKRNG (ORCPT ); Fri, 11 Nov 2016 12:13:06 -0500 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33776 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934529AbcKKRNC (ORCPT ); Fri, 11 Nov 2016 12:13:02 -0500 MIME-Version: 1.0 In-Reply-To: <20161110164454.293477-1-arnd@arndb.de> References: <20161110164454.293477-1-arnd@arndb.de> From: Linus Torvalds Date: Fri, 11 Nov 2016 09:13:00 -0800 X-Google-Sender-Auth: mKVQixw4wProvua0aYky2quk_CY Message-ID: Subject: Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized To: Arnd Bergmann , Srinivas Kandagatla , sayli karnik , Jonathan Cameron , Mark Brown Cc: Andrew Morton , Anna Schumaker , "David S. Miller" , Herbert Xu , Ilya Dryomov , Javier Martinez Canillas , Jiri Kosina , Ley Foon Tan , "Luis R . Rodriguez" , Martin Schwidefsky , Mauro Carvalho Chehab , Michal Marek , Russell King , Sean Young , Sebastian Ott , Trond Myklebust , "the arch/x86 maintainers" , Linux Kbuild mailing list , Linux Kernel Mailing List , arcml , nios2-dev@lists.rocketboards.org, linux-s390 , Linux Crypto Mailing List , Linux Media Mailing List , Linux NFS Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uABHDBPe031528 On Thu, Nov 10, 2016 at 8:44 AM, Arnd Bergmann wrote: > > Please merge these directly if you are happy with the result. I will take this. I do see two warnings, but they both seem to be valid and recent, though, so I have no issues with the spurious cases. Warning #1: sound/soc/qcom/lpass-platform.c: In function ‘lpass_platform_pcmops_open’: sound/soc/qcom/lpass-platform.c:83:29: warning: ‘dma_ch’ may be used uninitialized in this function [-Wmaybe-uninitialized] drvdata->substream[dma_ch] = substream; ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ and 'dma_ch' usage there really is crazy and wrong. Broken by 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage") Warning #2 is not a real bug, but it's reasonable that gcc doesn't know that storage_bytes (chip->read_size) has to be 2/4. Again, introduced recently by commit 231147ee77f3 ("iio: maxim_thermocouple: Align 16 bit big endian value of raw reads"), so you didn't see it. drivers/iio/temperature/maxim_thermocouple.c: In function ‘maxim_thermocouple_read_raw’: drivers/iio/temperature/maxim_thermocouple.c:141:5: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (ret) ^ drivers/iio/temperature/maxim_thermocouple.c:128:6: note: ‘ret’ was declared here int ret; ^~~ and I guess that code can just initialize 'ret' to '-EINVAL' or something to just make the theoretical "somehow we had a wrong chip->read_size" case error out cleanly. Linus