Skip to contentSkip to conversation

Hid: Intel-thc-hid: Intel-thc: Fix "dubious: !x | !y" issue

PATCH Applied Even Xu 2 participants 3 messages Feb 13, 2025 – Feb 19, 2025

Subsystems (2)
lore
Share & tools
lore

Even Xu

author maintainer
#0 lore raw

PATCH 1/1 Hid: Intel-thc-hid: Intel-thc: Fix "dubious: !x | !y" issue

Change to use "||" to make it more readable and avoid miss understanding.

---
 drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +1 -1
index eb23bea77686..8f97e71df7f4 100644
@@ -295,7 +295,7 @@ static void release_dma_buffers(struct thc_device *dev,
 		return;
 
 	for (i = 0; i < config->prd_tbl_num; i++) {
-		if (!config->sgls[i] | !config->sgls_nent[i])
+		if (!config->sgls[i] || !config->sgls_nent[i])
 			continue;
 
 		dma_unmap_sg(dev->dev, config->sgls[i],
Signature · 1 line
2.40.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Even Xu

Change to use "||" to make it more readable and avoid miss understanding.

---
 drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +0 -0
index eb23bea77686..8f97e71df7f4 100644

drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c static void release_dma_buffers(struct thc_device *dev, · line 299

Quoted 6 lines
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +1 -1
@@ -295,7 +295,7 @@ static void release_dma_buffers(struct thc_device *dev,
 		return;
 
 	for (i = 0; i < config->prd_tbl_num; i++) {
-		if (!config->sgls[i] | !config->sgls_nent[i])
+		if (!config->sgls[i] || !config->sgls_nent[i])
 			continue;

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs
author maintainer
#2 lore raw

Thanks Jiri!

Best Regards,
Even Xu

Quoted 42 lines

-----Original Message-----
From: Jiri Kosina <[email protected]>
Sent: Wednesday, February 19, 2025 5:10 AM
To: Xu, Even <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; lkp <[email protected]>
Subject: Re: [PATCH] Hid: Intel-thc-hid: Intel-thc: Fix "dubious: !x | !y" issue

drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c static void release_dma_buffers(struct thc_device

Quoted 18 lines · Even Xu

Change to use "||" to make it more readable and avoid miss understanding.

Closes:
https://lore.kernel.org/oe-kbuild-all/202501292144.eFDq4ovr-lkp@intel.
com

---
 drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +0 -0
index eb23bea77686..8f97e71df7f4 100644
@@ -295,7 +295,7 @@ static void release_dma_buffers(struct thc_device

*dev,

drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c static void release_dma_buffers(struct thc_device *dev, · line 299

Quoted 6 lines
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c +1 -1
 		return;
 
 	for (i = 0; i < config->prd_tbl_num; i++) {
-		if (!config->sgls[i] | !config->sgls_nent[i])
+		if (!config->sgls[i] || !config->sgls_nent[i])
 			continue;

Applied, thanks.

--
Jiri Kosina
SUSE Labs