alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
@ 2020-11-24  9:56 Andy Shevchenko
  2020-11-24 12:13 ` Rojewski, Cezary
  2020-12-01 13:57 ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-24  9:56 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	alsa-devel, Mark Brown, linux-acpi, Rafael J. Wysocki
  Cc: Andy Shevchenko

Since we have resource_intersection() helper, let's utilize it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

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(-)

diff --git a/sound/soc/intel/catpt/core.h b/sound/soc/intel/catpt/core.h
index 0f53a0d43254..a64a0a77dcb7 100644
--- a/sound/soc/intel/catpt/core.h
+++ b/sound/soc/intel/catpt/core.h
@@ -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;
diff --git a/sound/soc/intel/catpt/loader.c b/sound/soc/intel/catpt/loader.c
index 40c22e4bb263..ff7b8f0d34ac 100644
--- a/sound/soc/intel/catpt/loader.c
+++ b/sound/soc/intel/catpt/loader.c
@@ -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;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-24  9:56 [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection() Andy Shevchenko
@ 2020-11-24 12:13 ` Rojewski, Cezary
  2020-11-25 15:49   ` Rafael J. Wysocki
  2020-12-01 13:57 ` Mark Brown
  1 sibling, 1 reply; 9+ messages in thread
From: Rojewski, Cezary @ 2020-11-24 12:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: alsa-devel, Rafael J. Wysocki, Jie Yang, Pierre-Louis Bossart,
	Liam Girdwood, linux-acpi, Mark Brown

On 2020-11-24 10:56 AM, Andy Shevchenko wrote:
> Since we have resource_intersection() helper, let's utilize it here.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> 
> 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(-)
> 

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:

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>

Regards,
Czarek

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-24 12:13 ` Rojewski, Cezary
@ 2020-11-25 15:49   ` Rafael J. Wysocki
  2020-11-25 16:10     ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2020-11-25 15:49 UTC (permalink / raw)
  To: Rojewski, Cezary, Andy Shevchenko
  Cc: alsa-devel, Rafael J. Wysocki, Jie Yang, Pierre-Louis Bossart,
	Liam Girdwood, linux-acpi, Mark Brown

On Tue, Nov 24, 2020 at 1:13 PM Rojewski, Cezary
<cezary.rojewski@intel.com> wrote:
>
> On 2020-11-24 10:56 AM, Andy Shevchenko wrote:
> > Since we have resource_intersection() helper, let's utilize it here.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >
> > 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(-)
> >
>
> 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:
>
> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>

Applied as 5.11 material, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-25 15:49   ` Rafael J. Wysocki
@ 2020-11-25 16:10     ` Andy Shevchenko
  2020-11-25 16:10       ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-25 16:10 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rojewski, Cezary, alsa-devel, Rafael J. Wysocki, Jie Yang,
	Pierre-Louis Bossart, Liam Girdwood, linux-acpi, Mark Brown

On Wed, Nov 25, 2020 at 04:49:39PM +0100, Rafael J. Wysocki wrote:
> On Tue, Nov 24, 2020 at 1:13 PM Rojewski, Cezary
> <cezary.rojewski@intel.com> wrote:

...

> 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/20201119105327.89917-1-andriy.shevchenko@linux.intel.com/

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-25 16:10     ` Andy Shevchenko
@ 2020-11-25 16:10       ` Rafael J. Wysocki
  2020-11-25 16:18         ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2020-11-25 16:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rojewski, Cezary, alsa-devel, Rafael J. Wysocki,
	Rafael J. Wysocki, Jie Yang, Pierre-Louis Bossart, Liam Girdwood,
	linux-acpi, Mark Brown

On Wed, Nov 25, 2020 at 5:09 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, Nov 25, 2020 at 04:49:39PM +0100, Rafael J. Wysocki wrote:
> > On Tue, Nov 24, 2020 at 1:13 PM Rojewski, Cezary
> > <cezary.rojewski@intel.com> wrote:
>
> ...
>
> > 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!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-25 16:10       ` Rafael J. Wysocki
@ 2020-11-25 16:18         ` Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-25 16:18 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rojewski, Cezary, alsa-devel, Rafael J. Wysocki, Jie Yang,
	Pierre-Louis Bossart, Liam Girdwood, linux-acpi, Mark Brown

On Wed, Nov 25, 2020 at 05:10:50PM +0100, Rafael J. Wysocki wrote:
> On Wed, Nov 25, 2020 at 5:09 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Wed, Nov 25, 2020 at 04:49:39PM +0100, Rafael J. Wysocki wrote:

...

> > 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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-11-24  9:56 [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection() Andy Shevchenko
  2020-11-24 12:13 ` Rojewski, Cezary
@ 2020-12-01 13:57 ` Mark Brown
  2020-12-01 18:33   ` Andy Shevchenko
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2020-12-01 13:57 UTC (permalink / raw)
  To: Jie Yang, Andy Shevchenko, Rafael J. Wysocki, Cezary Rojewski,
	Pierre-Louis Bossart, Liam Girdwood, alsa-devel, linux-acpi

On Tue, 24 Nov 2020 11:56:28 +0200, Andy Shevchenko wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-12-01 13:57 ` Mark Brown
@ 2020-12-01 18:33   ` Andy Shevchenko
  2020-12-02 12:28     ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2020-12-01 18:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Cezary Rojewski, alsa-devel, Jie Yang, Rafael J. Wysocki,
	Pierre-Louis Bossart, Liam Girdwood, linux-acpi

On Tue, Dec 01, 2020 at 01:57:56PM +0000, Mark Brown wrote:
> On Tue, 24 Nov 2020 11:56:28 +0200, Andy Shevchenko wrote:
> > 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.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  2020-12-01 18:33   ` Andy Shevchenko
@ 2020-12-02 12:28     ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2020-12-02 12:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Cezary Rojewski, alsa-devel, Jie Yang, Rafael J. Wysocki,
	Pierre-Louis Bossart, Liam Girdwood, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

On Tue, Dec 01, 2020 at 08:33:29PM +0200, Andy Shevchenko wrote:

> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-02 12:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24  9:56 [PATCH v1] ASoC: Intel: catpt: Replace open coded variant of resource_intersection() Andy Shevchenko
2020-11-24 12:13 ` Rojewski, Cezary
2020-11-25 15:49   ` Rafael J. Wysocki
2020-11-25 16:10     ` Andy Shevchenko
2020-11-25 16:10       ` Rafael J. Wysocki
2020-11-25 16:18         ` Andy Shevchenko
2020-12-01 13:57 ` Mark Brown
2020-12-01 18:33   ` Andy Shevchenko
2020-12-02 12:28     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).