linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] stm class/intel_th: Fixes for v5.11
@ 2021-01-15 19:59 Alexander Shishkin
  2021-01-15 19:59 ` [PATCH 1/2] stm class: Fix module init return on allocation failure Alexander Shishkin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Shishkin @ 2021-01-15 19:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Alexander Shishkin

Hi Greg,

Here are updates that I have for v5.11. These are: one minor bugfix and
a new PCI ID.

Alexander Shishkin (1):
  intel_th: pci: Add Alder Lake-P support

Wang Hui (1):
  stm class: Fix module init return on allocation failure

 drivers/hwtracing/intel_th/pci.c  | 5 +++++
 drivers/hwtracing/stm/heartbeat.c | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.29.2


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

* [PATCH 1/2] stm class: Fix module init return on allocation failure
  2021-01-15 19:59 [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Alexander Shishkin
@ 2021-01-15 19:59 ` Alexander Shishkin
  2021-01-15 19:59 ` [PATCH 2/2] intel_th: pci: Add Alder Lake-P support Alexander Shishkin
  2021-01-21 17:55 ` [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Shishkin @ 2021-01-15 19:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Wang Hui, Hulk Robot, Alexander Shishkin

From: Wang Hui <john.wanghui@huawei.com>

In stm_heartbeat_init(): return value gets reset after the first
iteration by stm_source_register_device(), so allocation failures
after that will, after a clean up, return success. Fix that.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 119291853038 ("stm class: Add heartbeat stm source device")
Signed-off-by: Wang Hui <john.wanghui@huawei.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
 drivers/hwtracing/stm/heartbeat.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c
index 3e7df1c0477f..81d7b21d31ec 100644
--- a/drivers/hwtracing/stm/heartbeat.c
+++ b/drivers/hwtracing/stm/heartbeat.c
@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
 
 static int stm_heartbeat_init(void)
 {
-	int i, ret = -ENOMEM;
+	int i, ret;
 
 	if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX)
 		return -EINVAL;
@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)
 	for (i = 0; i < nr_devs; i++) {
 		stm_heartbeat[i].data.name =
 			kasprintf(GFP_KERNEL, "heartbeat.%d", i);
-		if (!stm_heartbeat[i].data.name)
+		if (!stm_heartbeat[i].data.name) {
+			ret = -ENOMEM;
 			goto fail_unregister;
+		}
 
 		stm_heartbeat[i].data.nr_chans	= 1;
 		stm_heartbeat[i].data.link	= stm_heartbeat_link;
-- 
2.29.2


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

* [PATCH 2/2] intel_th: pci: Add Alder Lake-P support
  2021-01-15 19:59 [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Alexander Shishkin
  2021-01-15 19:59 ` [PATCH 1/2] stm class: Fix module init return on allocation failure Alexander Shishkin
@ 2021-01-15 19:59 ` Alexander Shishkin
  2021-01-21 17:55 ` [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Shishkin @ 2021-01-15 19:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Alexander Shishkin

This adds support for the Trace Hub in Alder Lake-P.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
 drivers/hwtracing/intel_th/pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
index 52acd77438ed..251e75c9ba9d 100644
--- a/drivers/hwtracing/intel_th/pci.c
+++ b/drivers/hwtracing/intel_th/pci.c
@@ -268,6 +268,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7aa6),
 		.driver_data = (kernel_ulong_t)&intel_th_2x,
 	},
+	{
+		/* Alder Lake-P */
+		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6),
+		.driver_data = (kernel_ulong_t)&intel_th_2x,
+	},
 	{
 		/* Alder Lake CPU */
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x466f),
-- 
2.29.2


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

* Re: [PATCH 0/2] stm class/intel_th: Fixes for v5.11
  2021-01-15 19:59 [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Alexander Shishkin
  2021-01-15 19:59 ` [PATCH 1/2] stm class: Fix module init return on allocation failure Alexander Shishkin
  2021-01-15 19:59 ` [PATCH 2/2] intel_th: pci: Add Alder Lake-P support Alexander Shishkin
@ 2021-01-21 17:55 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-01-21 17:55 UTC (permalink / raw)
  To: Alexander Shishkin; +Cc: linux-kernel

On Fri, Jan 15, 2021 at 10:59:15PM +0300, Alexander Shishkin wrote:
> Hi Greg,
> 
> Here are updates that I have for v5.11. These are: one minor bugfix and
> a new PCI ID.
> 
> Alexander Shishkin (1):
>   intel_th: pci: Add Alder Lake-P support
> 
> Wang Hui (1):
>   stm class: Fix module init return on allocation failure
> 
>  drivers/hwtracing/intel_th/pci.c  | 5 +++++
>  drivers/hwtracing/stm/heartbeat.c | 6 ++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)

Now applied, thanks.

greg k-h

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

end of thread, other threads:[~2021-01-21 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 19:59 [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Alexander Shishkin
2021-01-15 19:59 ` [PATCH 1/2] stm class: Fix module init return on allocation failure Alexander Shishkin
2021-01-15 19:59 ` [PATCH 2/2] intel_th: pci: Add Alder Lake-P support Alexander Shishkin
2021-01-21 17:55 ` [PATCH 0/2] stm class/intel_th: Fixes for v5.11 Greg Kroah-Hartman

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