From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (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 57C87203525FD for ; Thu, 26 Oct 2017 06:18:47 -0700 (PDT) Received: by mail-io0-x241.google.com with SMTP id e89so5281256ioi.11 for ; Thu, 26 Oct 2017 06:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6rOzHmO2Jqf6Rj722AvvY8XvWfxqDA9KuU8qLDkW6wY=; b=jqZnX3WFu6L2POh8WmRnuVHZxBBRfh7cTFyh8sCbTIqDJoOwYWh5mHJT/j9nLdw4qf cAreGbYaIGZckrLgrKaOZA1ZLbzMKSvaZP5+vPduoFXFFs7HXBrighhaJdo8BhblHA8Q Eof/vKGlj2f80ZAZhA+9JEfZX6kpnLWD+LAI+oB5ggH7tz+R1aGA6qa4Lz9hau4OFQ/m E0wQm/8aUlKzRr/efZ55jaV/3Vko4uUp9DOIR96EzdY1h/GINZigs79rOZfw9y+a9op4 kVPW/mEz+/jkyhbNyEDRfZMTvxl6Mz1qwWhTtKrBXZ4NQlmFawIzFh/mSIGA3WkLlePo FiRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6rOzHmO2Jqf6Rj722AvvY8XvWfxqDA9KuU8qLDkW6wY=; b=Ic0jG/BlJ/v2neisb+BDsTgIXuQYJY5mCfT+r8LWs8WL1TZO8ZvEBnYACeH3BmAf71 gHIY6jEXasDVKXay6mUwd8w7Pr902wzrrabYOaclIuaqjXy6CfZsCqnqrqjMdAGXcYN8 EKjkUkNPPsvBi2511fG5g7Nh93/E9LuqOT1kXGRabVtC8jc+5zc2eP0pOtr1xD4xVE3v 54VWnX3Y+FBZus6pEQxkcgWY5xrAxMzz3yWtcdaMpVJWumTuoOkWqYpCV85PhqdADaLa l/z+5V7PH2xKUiSgqPym30unQwtHIvTVj6qtcM6KXELfDKfQ32MIkzMo3pQs583jDMdi XK2Q== X-Gm-Message-State: AMCzsaU167Q96bRCTobjxAoWx4g+g/SCbaec+SveeBk8v35GxCaCSezm 78VA0OUeBEBe1ivcjhdMs2NYuWFkSVNCpnx8WaTmYg== X-Google-Smtp-Source: ABhQp+Q0xn1KwEEW6kv7xSqgc5Dojsz45xNBm7NSRmPKcHf3/SsdfothoRNksQg81SGaI4DVjHTVyVniou/cefPmnFs= X-Received: by 10.36.110.71 with SMTP id w68mr2457113itc.113.1509024152961; Thu, 26 Oct 2017 06:22:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.167.208 with HTTP; Thu, 26 Oct 2017 06:22:32 -0700 (PDT) In-Reply-To: <20171026131117.pnutgjmhrr52b4ng@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> From: Marcin Wojtas Date: Thu, 26 Oct 2017 15:22:32 +0200 Message-ID: To: Leif Lindholm Cc: edk2-devel-01 , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan 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:18:47 -0000 Content-Type: text/plain; charset="UTF-8" 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 *.