Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755031AbcKJKE0 (ORCPT ); Thu, 10 Nov 2016 05:04:26 -0500 Received: from www3345.sakura.ne.jp ([49.212.235.55]:43682 "EHLO www3345.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbcKJKEZ (ORCPT ); Thu, 10 Nov 2016 05:04:25 -0500 X-Greylist: delayed 2294 seconds by postgrey-1.27 at vger.kernel.org; Thu, 10 Nov 2016 05:04:24 EST Message-ID: <58243D24.5080302@jinso.co.jp> Date: Thu, 10 Nov 2016 18:25:56 +0900 From: Hiep Cao Minh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Arnd Bergmann , Mark Brown CC: Chris Brandt , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: rspi: avoid uninitialized variable access References: <20161108134624.1905209-1-arnd@arndb.de> In-Reply-To: <20161108134624.1905209-1-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 757 Lines: 21 Hi Arnd, Thanks for your fixed patch. On 11/08/2016 10:46 PM, Arnd Bergmann wrote: > The newly introduced rspi_pio_transfer_in_or_our() function must > take either a valid 'rx' or 'tx' pointer, and has undefined behavior > if both are NULL, as found by 'gcc -Wmaybe-unintialized': > > drivers/spi/spi-rspi.c: In function 'rspi_pio_transfer_in_or_our': > drivers/spi/spi-rspi.c:558:5: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized] Could you tell me what kind of GCC are you using? I'd like to reproduce it on my environment, too. I am using the Linaro's gcc of "gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux". But there is no error message like this on my environment. Best regards, Jinzai Solution Inc, Hiep.