From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754222AbbLJPHW (ORCPT ); Thu, 10 Dec 2015 10:07:22 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52711 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753876AbbLJPGq (ORCPT ); Thu, 10 Dec 2015 10:06:46 -0500 From: Arnd Bergmann To: kbuild test robot Cc: kbuild-all@01.org, Wolfram Sang , linux-i2c@vger.kernel.org, Niklas =?ISO-8859-1?Q?S=F6derlund?= , linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: allow building emev2 without slave mode again Date: Thu, 10 Dec 2015 16:06:10 +0100 Message-ID: <2592093.cGKEcKVqLU@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <201512102224.cVm7Hcp0%fengguang.wu@intel.com> References: <201512102224.cVm7Hcp0%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:O7SZPJ8xB3nQABt4CC8wHwa385ORzmmXpXa8QaTwqrX1iYv+01h W++WJlzEJpFS3KZkUnslMP8WdHU40RZu6veiC4mHtKaKcVx1jiWl/QFqERuzgwsC8zT0wdR C102jSNP8HEHU8kFjdM4fme2mvA6nyojLFdoGIDrtcRyX/vDnns8v6G4yimpfL9EWvxCTEh LJTpWVGrmxD/HwPZCS/6g== X-UI-Out-Filterresults: notjunk:1;V01:K0:bRvSdL5BoJg=:CDNisXfmg4F3E6Kvq10yr1 QCF4BlgnBKmtCwkAXr5RZRiqDifDA0gV/sj3Wex5phVhhjordYJ1jGxam99CGSDJJeteb1+Pc H+36GS0xnSn9+AS6CA8brgvJEDzclL2664Lswwu0tXCdJup/KhFoDppA2IaLaBcSpmoUK7XbM FkPDNXSvmGLjQyiDpqBT7DyUb9jDRQa+15ZPZ4w5SelkfLS1Xm0Bf980jFuwSeRCI/Q2lqSNA BafJUuMpE+Kl7hrtv7O03vDL0ook4fuZh8sYOCPDwKmV1ky+cxkokE9U0VjVuyrU2OqLHtE9u HsGM79orqLQ7G5YKstAnI1sO9OWtzRNQfz2maBcNhWrGtgN8IzDPxNX+MofZVznGaHAnIZqe8 6XVS/uXtSKRn2MtdAYS26vdA+qvcHE/dB1FQLqWomYi6v+oHhAZJoEsdoWeI/oTkMVaYGK++K B4O0LOhqDupb4wUFjf/sypFdIpjvm5Oz3u1WEhpXozXZl2Kj8m/W+ldTwTJG5oYCwA5qncK21 HV8J0r4J5+HfiNCLyt0N/H+wlMj1VhE2ag6NyQ3saKLk7wQyVKzjOb+y17iicBqp+acXx3zXC 7qsuBMNONFniSrKmPpnSd2d/QeQFtmX7MG919RscgPLD0plGPz3evB07w96EGHDUDBFlTPVAM 4R59a0dayAWR7jSZdGEuJr0ty07F5wcOseCH1NuhOoYaG+moQXVdE9Mhgl0IoBtQpPqGBbFCX h9796fouxPDP6FPt Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 10 December 2015 22:54:25 kbuild test robot wrote: > > In file included from arch/x86/include/asm/realmode.h:5:0, > from arch/x86/include/asm/acpi.h:33, > from arch/x86/include/asm/fixmap.h:19, > from arch/x86/include/asm/apic.h:12, > from arch/x86/include/asm/smp.h:12, > from arch/x86/include/asm/mmzone_64.h:10, > from arch/x86/include/asm/mmzone.h:4, > from include/linux/mmzone.h:856, > from include/linux/gfp.h:5, > from include/linux/device.h:29, > from drivers/i2c/busses/i2c-emev2.c:15: > drivers/i2c/busses/i2c-emev2.c: In function 'em_i2c_irq_handler': > >> arch/x86/include/asm/io.h:53:3: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized] > { asm volatile("mov" size " %0,%1": :reg (val), \ > ^ > drivers/i2c/busses/i2c-emev2.c:232:13: note: 'value' was declared here > u8 status, value; > ^ The warning was indeed introduced by my change, but I think there was a preexisting issue: The slave_cb callback function is supposed to set the 'value' here, but it might return an error not assign the pointer, which is something that both the rcar and the emev2 drivers do not handle correctly. It might be best to change the callback to return 'void' and not allow it to fail. At least the eeprom slave cannot fail anyway, and it is the only implementation we have at the moment. The inline function would then have to be changed to initialize the 'value'. Alternatively, the inline could return an error, and both bus drivers check for the error before using 'value'. Arnd