linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings
@ 2021-08-20  3:08 CGEL
  2021-08-20  8:16 ` Sumit Saxena
  2021-09-14  3:43 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: CGEL @ 2021-08-20  3:08 UTC (permalink / raw)
  To: Kashyap Desai
  Cc: Sumit Saxena, Shivasharan S, James E . J . Bottomley,
	Martin K . Petersen, megaraidlinux.pdl, linux-scsi, linux-kernel,
	jing yangyang, Zeal Robot

From: jing yangyang <jing.yangyang@zte.com.cn>

WARNING !A || A && B is equivalent to !A || B

This issue was detected with the help of Coccinelle.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e4298bf..17c87ac 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -8773,8 +8773,7 @@ int megasas_update_device_list(struct megasas_instance *instance,
 
 		if (event_type & SCAN_VD_CHANNEL) {
 			if (!instance->requestorId ||
-			    (instance->requestorId &&
-			     megasas_get_ld_vf_affiliation(instance, 0))) {
+			megasas_get_ld_vf_affiliation(instance, 0)) {
 				dcmd_ret = megasas_ld_list_query(instance,
 						MR_LD_QUERY_TYPE_EXPOSED_TO_HOST);
 				if (dcmd_ret != DCMD_SUCCESS)
-- 
1.8.3.1



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

* Re: [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings
  2021-08-20  3:08 [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings CGEL
@ 2021-08-20  8:16 ` Sumit Saxena
  2021-09-14  3:43 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Sumit Saxena @ 2021-08-20  8:16 UTC (permalink / raw)
  To: CGEL
  Cc: Kashyap Desai, Shivasharan S, James E . J . Bottomley,
	Martin K . Petersen, PDL,MEGARAIDLINUX, Linux SCSI List, LKML,
	jing yangyang, Zeal Robot

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

On Fri, Aug 20, 2021 at 8:38 AM CGEL <cgel.zte@gmail.com> wrote:
>
> From: jing yangyang <jing.yangyang@zte.com.cn>
>
> WARNING !A || A && B is equivalent to !A || B
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

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

* Re: [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings
  2021-08-20  3:08 [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings CGEL
  2021-08-20  8:16 ` Sumit Saxena
@ 2021-09-14  3:43 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-09-14  3:43 UTC (permalink / raw)
  To: Kashyap Desai, CGEL
  Cc: Martin K . Petersen, linux-scsi, James E . J . Bottomley,
	Zeal Robot, Sumit Saxena, jing yangyang, Shivasharan S,
	linux-kernel, megaraidlinux.pdl

On Thu, 19 Aug 2021 20:08:05 -0700, CGEL wrote:

> From: jing yangyang <jing.yangyang@zte.com.cn>
> 
> WARNING !A || A && B is equivalent to !A || B
> 
> This issue was detected with the help of Coccinelle.
> 
> 
> [...]

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: megaraid: fix Coccinelle warnings
      https://git.kernel.org/mkp/scsi/c/17dfd54d391e

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-09-14  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  3:08 [PATCH linux-next] scsi: megaraid: fix Coccinelle warnings CGEL
2021-08-20  8:16 ` Sumit Saxena
2021-09-14  3:43 ` Martin K. Petersen

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