diff mbox

FSP/ELOG: Remove redundant validation

Message ID 20160702144742.4509.17596.stgit@hegdevasant
State Accepted
Headers show

Commit Message

Vasant Hegde July 2, 2016, 2:47 p.m. UTC
We don't need to validate msg->resp message as its always
allocated.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hw/fsp/fsp-elog-read.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Mukesh Ojha July 4, 2016, 7:17 a.m. UTC | #1
Hi Vasant,

On Saturday 02 July 2016 08:17 PM, Vasant Hegde wrote:
> We don't need to validate msg->resp message as its always
> allocated.
>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>   hw/fsp/fsp-elog-read.c |    2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
> index a8e5c12..e9332af 100644
> --- a/hw/fsp/fsp-elog-read.c
> +++ b/hw/fsp/fsp-elog-read.c
> @@ -99,8 +99,6 @@ static void fsp_elog_ack_complete(struct fsp_msg *msg)
>   {
>   	uint8_t val;
>   
> -	if (!msg->resp)
> -		return;

Yeah, This became redundant after your patch on message response memory 
allocation check.
("[PATCH] FSP: Validate fsp_msg response memory allocation:")

Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>

-Mukesh

>   	val = (msg->resp->word1 >> 8) & 0xff;
>   	if (val != 0)
>   		prerror("ELOG: Acknowledgment error\n");
>
> _______________________________________________
> Skiboot mailing list
> Skiboot@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
Stewart Smith July 14, 2016, 8:25 a.m. UTC | #2
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> We don't need to validate msg->resp message as its always
> allocated.
>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hw/fsp/fsp-elog-read.c |    2 --
>  1 file changed, 2 deletions(-)

Thanks! Merged to master as of ffa5589
diff mbox

Patch

diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index a8e5c12..e9332af 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -99,8 +99,6 @@  static void fsp_elog_ack_complete(struct fsp_msg *msg)
 {
 	uint8_t val;
 
-	if (!msg->resp)
-		return;
 	val = (msg->resp->word1 >> 8) & 0xff;
 	if (val != 0)
 		prerror("ELOG: Acknowledgment error\n");