Skip to content

drivers: Remove unused unused host_msg field - #877

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
dbaluta:master
Jan 24, 2019
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
dbaluta:master

Conversation

@dbaluta

@dbaluta dbaluta commented Jan 23, 2019

Copy link
Copy Markdown
Collaborator

This is legacy and was used to keep current
message from host.

It is now unused so remove it.

Signed-off-by: Daniel Baluta daniel.baluta@nxp.com

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some CI is still pending, should be able to merge tomorrow

Comment thread src/drivers/intel/baytrail/ipc.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta if you remove this, there's no need for the msg variable too?

@dbaluta dbaluta Jan 23, 2019 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063, true. Unless, we want to keep the debugging message consistent.

`
msg = shim_read(SHIM_IPCXL);

	/* TODO: place message in Q and process later */
	/* It's not Q ATM, may overwrite */
	if (_ipc->host_pending) {
		trace_ipc_error("ipc: dropping msg 0x%x", msg);
		trace_ipc_error(" isr 0x%x imrd 0x%x ipcxh 0x%x",
				isr, shim_read(SHIM_IMRD),
				shim_read(SHIM_IPCXH));

`

But I guess, msg will always be 0.

In my opinion, we should merge the patch as it is now. And then when we really figure out that this is a relict from the past to also remove it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta yes. I think its redundant. So we should just remove the trace logs and msg altogether.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063, so do you mean something like this.

https://pastebin.com/xsFYtwXv

Sorry for using pastebin but inserting code here just kills me.

So, the best thing to do this would be to attach another patch to this series, where we really explain why in case of _ipc->host_pending == true we just do nothing and also do not print any error message.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta the second trace error message is still useful to indicate if we do drop a message. I was only suggesting to remove the msg part of it because it is not really useful.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063 ok, it's clear now. will respin.

This is legacy and was used to keep current
message from host.

It is now unused so remove it. Notice that we
also remove temp var msg.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
@dbaluta

dbaluta commented Jan 23, 2019

Copy link
Copy Markdown
Collaborator Author

@ranj063 @lgirdwood I have updated the patch as per Ranjani's comments. I forced pushed into my branch, I hope this is the right way to send v2 on github.

@plbossart

plbossart commented Jan 23, 2019 via email

Copy link
Copy Markdown
Member

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart the header was originally used on legacy for SHIM message cmd type, but is superfluous since we always need to read the mailbox anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants