diff mbox series

FSP/NVRAM: Do not assert in vNVRAM statistics call

Message ID 20201019114408.32068-1-hegdevasant@linux.vnet.ibm.com
State Accepted
Headers show
Series FSP/NVRAM: Do not assert in vNVRAM statistics call | expand

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (f901fcafae14d38e29f1cc11440086ee678785d0)

Commit Message

Vasant Hegde Oct. 19, 2020, 11:44 a.m. UTC
`msg` is valid pointer here. I don't recall why I added assert here :-(
This is not correct. We shouldn't call assert here.  Also we are not using
`msg`. Hence convert it to `__unused`.

Fixes: 19d4f98e ('FSP/NVRAM: Handle "get vNVRAM statistics" command')
Cc: skiboot-stable@lists.ozlabs.org # v5.4.x +
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hw/fsp/fsp-nvram.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mahesh J Salgaonkar Oct. 19, 2020, 11:57 a.m. UTC | #1
On 10/19/20 5:14 PM, Vasant Hegde wrote:
> `msg` is valid pointer here. I don't recall why I added assert here :-(
> This is not correct. We shouldn't call assert here.  Also we are not using
> `msg`. Hence convert it to `__unused`.

Yup agree.

Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>

Thanks,
-Mahesh.

> 
> Fixes: 19d4f98e ('FSP/NVRAM: Handle "get vNVRAM statistics" command')
> Cc: skiboot-stable@lists.ozlabs.org # v5.4.x +
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hw/fsp/fsp-nvram.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/fsp/fsp-nvram.c b/hw/fsp/fsp-nvram.c
> index 80c842407..aa17cb5e7 100644
> --- a/hw/fsp/fsp-nvram.c
> +++ b/hw/fsp/fsp-nvram.c
> @@ -305,12 +305,11 @@ static struct fsp_client fsp_nvram_client_rr = {
>  	.message = fsp_nvram_msg_rr,
>  };
>  
> -static bool fsp_vnvram_msg(u32 cmd_sub_mod, struct fsp_msg *msg)
> +static bool fsp_vnvram_msg(u32 cmd_sub_mod, struct fsp_msg *msg __unused)
>  {
>  	u32 cmd;
>  	struct fsp_msg *resp;
>  
> -	assert(msg == NULL);
>  	switch (cmd_sub_mod) {
>  	case FSP_CMD_GET_VNV_STATS:
>  		prlog(PR_DEBUG,
>
diff mbox series

Patch

diff --git a/hw/fsp/fsp-nvram.c b/hw/fsp/fsp-nvram.c
index 80c842407..aa17cb5e7 100644
--- a/hw/fsp/fsp-nvram.c
+++ b/hw/fsp/fsp-nvram.c
@@ -305,12 +305,11 @@  static struct fsp_client fsp_nvram_client_rr = {
 	.message = fsp_nvram_msg_rr,
 };
 
-static bool fsp_vnvram_msg(u32 cmd_sub_mod, struct fsp_msg *msg)
+static bool fsp_vnvram_msg(u32 cmd_sub_mod, struct fsp_msg *msg __unused)
 {
 	u32 cmd;
 	struct fsp_msg *resp;
 
-	assert(msg == NULL);
 	switch (cmd_sub_mod) {
 	case FSP_CMD_GET_VNV_STATS:
 		prlog(PR_DEBUG,