From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 05BA520352609 for ; Thu, 26 Oct 2017 06:51:21 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id w105so3271455wrc.0 for ; Thu, 26 Oct 2017 06:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GwehT6qsdc62RUjhgKDYkXzj1mm71kfoTcmubVlm44A=; b=YNKI/xhMVLg55IuqG9GOjBW1pF4rUoTseoAEeiAyt3otPWyYa12tSHU42XJheaLbWC TI5dwmvR5JgaChvVlHlYYd5mBU61zXJAyXdYipP3FuLzxawN5P8i4fMzvpXgQ/I+Mj/D mVxqSl6nMi+fqDuhxbHBr29ZZ7jlcEDrH10Fc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GwehT6qsdc62RUjhgKDYkXzj1mm71kfoTcmubVlm44A=; b=eE9vDw9Q6aPVsuFzIP7OPNNBUHI6EXn22PWWPMXxWCyJbxk/KyldHiI4yAb3NO+EsN yhdx+20FxMzgv+DSemjlANeCi/nubiQwu/aqJTQyReWMk7EU/iUgHMITtVidTNrzcz22 qxKCaEZ6SUzWfWn8iGDPQ3muIsre5aPFzHXlhU5942c+pRX1d1SWyF5R1u/J4bDLXNnp ePb/6QCrQt+lkTGoaCttRY2IEG3QTnS/5IVl9yIpBra1+t43HRK97ykrUGQQzLmDTvpb o9rRHdnCE+/wnMBp7W/i1dbn19X97LIHg0tPOcb1BGfPeaIIg3ohmMSrERldVVM086jT qf9Q== X-Gm-Message-State: AMCzsaVqRa4oxXUu2RvpU0VOipQOpnv8cbgqxJO18NL1aX48ZZIo4kP1 4eVhMjHKIP7EPOovVogvptmHuQ== X-Google-Smtp-Source: ABhQp+QsGevrTaXokbo7T3HJ1vOV7HP34WUhxnmWOLLtNCt+XWlXo8+mkh3bHr0rq3KZvelErvlFDg== X-Received: by 10.223.168.45 with SMTP id l42mr5359872wrc.15.1509026106892; Thu, 26 Oct 2017 06:55:06 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u57sm5613832wrf.43.2017.10.26.06.55.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Oct 2017 06:55:05 -0700 (PDT) Date: Thu, 26 Oct 2017 14:55:04 +0100 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel-01 , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Message-ID: <20171026135504.zjwt2l3o72yu5tr5@bivouac.eciton.net> References: <1508980777-29006-1-git-send-email-mw@semihalf.com> <1508980777-29006-3-git-send-email-mw@semihalf.com> <20171026131117.pnutgjmhrr52b4ng@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH 02/10] Marvell/Drivers: MvI2cDxe: Fix returning status in MvI2cStartRequest X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 13:51:22 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 26, 2017 at 03:22:32PM +0200, Marcin Wojtas wrote: > 2017-10-26 15:11 GMT+02:00 Leif Lindholm : > > On Thu, Oct 26, 2017 at 03:19:29AM +0200, Marcin Wojtas wrote: > >> In MvI2cStartRequest the status was assigned to the variable > >> without dereferencing a pointer. Fix it. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Marcin Wojtas > >> --- > >> Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c b/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c > >> index 7faf1f7..8ed96f0 100755 > >> --- a/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c > >> +++ b/Platform/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c > >> @@ -631,7 +631,7 @@ MvI2cStartRequest ( > >> } > >> > >> if (I2cStatus != NULL) > >> - I2cStatus = EFI_SUCCESS; > >> + *I2cStatus = Status; > > > > Oh, that's horrible! And only did not generate warnings because > > EFI_SUCCESS is 0. > > This parameter is 'optional', so me must have been also lucky not to > use it in basic operation. > > > > > However, you also change from setting *I2cStatus to Status instead of > > EFI_SUCCESS. This should be mentioned in commit message. > > > > / > > We can leave EFI_SUCCESS, as it's the only option at this place. It > was changed to Status, due to first patch of the series. I will leave > the original and just modify *. Yes, that works too - thanks! / Leif