ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
Subsystems (4)
PATCH 1/1 ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
Since we have resource_intersection() helper, let's utilize it here.
---
Promised clean up for recently introduced helper.
This has dependency to the patches currently in linux-pm tree. Other than that everything else is already in upstream. Hence, logically it's better to push thru Rafael's tree than wait one more cycle.
sound/soc/intel/catpt/core.h | 11 ----------- sound/soc/intel/catpt/loader.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-)
sound/soc/intel/catpt/core.h +0 -11
@@ -22,17 +22,6 @@ void catpt_sram_free(struct resource *sram);struct resource *catpt_request_region (struct resource *root,resource_size_t size); -static inline bool catpt_resource_overlapping (struct resource *r1, -struct resource *r2, -struct resource *ret) -{ -if (!resource_overlaps (r1, r2)) -return false; - ret->start =max (r1->start, r2->start); - ret->end =min (r1->end, r2->end); -return true; -} - struct catpt_ipc_msg { union { u32 header;
sound/soc/intel/catpt/loader.c +1 -1
@@ -267,7 +267,7 @@ static int catpt_restore_fwimage(struct catpt_dev *cdev, r2.start = off; r2.end = r2.start + info->size -1 ; -if (!catpt_resource_overlapping (&r2, &r1, &common)) +if (!resource_intersection (&r2, &r1, &common))continue ;/* calculate start offset of common data area */ off = common.start - r1.start;
Signature · 1 line
2.29.2
Quoted 7 lines · Andy Shevchenko
Since we have
resource_intersection()helper, let's utilize it here.Signed-off-by Andy Shevchenko <[email protected]>---
Promised clean up for recently introduced helper.
Quoted 8 lines
This has dependency to the patches currently in linux-pm tree. Other than that everything else is already in upstream. Hence, logically it's better to push thru Rafael's tree than wait one more cycle.
sound/soc/intel/catpt/core.h | 11 ----------- sound/soc/intel/catpt/loader.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-)
Thanks for the patch, Andy.
I hope you didn't get the impression I somehow forgotten about this : ) Wanted to make it part of "cleanup/code reduction" after addition of last two missing features (fw traces + external module support).
Fixes and removal of lpt-specific code were the priority though. As change is already here, I don't see any reason for delaying its merge:
Regards,
Czarek
Quoted 24 lines · Cezary
Quoted 7 lines · Andy Shevchenko
Since we have
resource_intersection()helper, let's utilize it here.Signed-off-by Andy Shevchenko <[email protected]>---
Promised clean up for recently introduced helper.
Quoted 8 lines
This has dependency to the patches currently in linux-pm tree. Other than that everything else is already in upstream. Hence, logically it's better to push thru Rafael's tree than wait one more cycle.
sound/soc/intel/catpt/core.h | 11 ----------- sound/soc/intel/catpt/loader.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-)Thanks for the patch, Andy.
I hope you didn't get the impression I somehow forgotten about this : ) Wanted to make it part of "cleanup/code reduction" after addition of last two missing features (fw traces + external module support).
Quoted 5 lines
Fixes and removal of lpt-specific code were the priority though. As change is already here, I don't see any reason for delaying its merge:
Acked-by Cezary Rojewski <[email protected]>
Applied as 5.11 material, thanks!
Quoted 2 lines · Rafael J. Wysocki
On Tue, Nov 24, 2020 at 1:13 PM Rojewski, Cezary
<[email protected]> wrote:
...
Quoted 1 line
Applied as 5.11 material, thanks!
Thanks!
There is one fix to the series [1]. But now I realized that I forgot to Cc linux-acpi@. Do you want me resend it?
[1]: https://lore.kernel.org/lkml/[email protected]/
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rafael J. Wysocki
maintainerQuoted 5 lines · Andy Shevchenko
Quoted 2 lines · Rafael J. Wysocki
On Tue, Nov 24, 2020 at 1:13 PM Rojewski, Cezary
<[email protected]> wrote:
Quoted 8 lines
...
Quoted 1 line
Applied as 5.11 material, thanks!
Thanks!
There is one fix to the series [1]. But now I realized that I forgot to Cc linux-acpi@. Do you want me resend it?
Yes, please!
Quoted 3 lines · Rafael J. Wysocki
Quoted 1 line · Andy Shevchenko
On Wed, Nov 25, 2020 at 04:49:39PM +0100, Rafael J. Wysocki wrote:
...
Quoted 4 lines
Quoted 2 lines
There is one fix to the series [1]. But now I realized that I forgot to Cc linux-acpi@. Do you want me resend it?
Yes, please!
Done! Sent as v2.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
Since we have
resource_intersection()helper, let's utilize it here.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
(no commit info)
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 11 lines · Mark Brown
Quoted 1 line · Andy Shevchenko
Since we have
resource_intersection()helper, let's utilize it here.Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: catpt: Replace open coded variant of
resource_intersection()
(no commit info)
As I mentioned in the comment (after --- line) the patch relies on the stuff in linux-pm tree. Do you have any immutable branch pulled? Otherwise Rafael already took it where it won't break compilation.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 3 lines · Andy Shevchenko
As I mentioned in the comment (after --- line) the patch relies on the stuff in linux-pm tree. Do you have any immutable branch pulled? Otherwise Rafael already took it where it won't break compilation.
b4 had a bug which caused it to send thanks for every patch I'd ever downloaded but not applied, the "no commit info" means there wasn't an actual matching commit. I'd been going to review it but then it got applied anyway.