Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented May 25, 2023

Rework set_new_local_buffer() to not set dd->local_buffer multiple times.

@kv2019i
Copy link
Collaborator Author

kv2019i commented May 25, 2023

Not sure @lyakh this helps much, but we do avoid one extra dd->local_buffer write.

Copy link

@juimonen juimonen left a comment

Choose a reason for hiding this comment

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

not sure I understand the optimization, but looks innocent enough to me

Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

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

looks good, thanks for fixing it! But need to fix one hick up.

@lyakh
Copy link
Collaborator

lyakh commented May 26, 2023

@kv2019i @juimonen Given two possibilities:

	never_fails();
	ret = might_fail();
	if (ret < 0) {
		undo_never_fails();
		return ret;
	}

and

	ret = might_fail();
	if (ret < 0)
		return ret;

	never_fails();

as long as the order indeed isn't important - often both will work correctly, but I think one is clearly preferable over the other and should be used whenever possible.

Rework set_new_local_buffer() to not set dd->local_buffer multiple
times. Also remove erroneous __sparse_cache attribute for "local_buf".

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i kv2019i force-pushed the 202305-local-buffer-set-refactor branch from 55ceca3 to 1ac1ea1 Compare June 5, 2023 12:49
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 5, 2023

V2 uploaded, please review.

@kv2019i kv2019i requested review from btian1 and lyakh June 5, 2023 16:06
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 6, 2023

The Intel CI System/merge/build fails to one run of "TestSrcFullScope::test_01_04_src" indicating a glitch on one platform. I don't think it can be related to this PR, but need to do another run to be sure.

@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

@kv2019i still failing CI, can you check. Thanks

@kv2019i kv2019i closed this Sep 13, 2023
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.

7 participants