From: Nicholas Mc Guire <der.herr@hofr.at>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>,
QLogic-Storage-Upstream@qlogic.com,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicholas Mc Guire <der.herr@hofr.at>
Subject: [PATCH] qla4xxx: drop redundant init_completion
Date: Wed, 22 Mar 2017 11:44:22 +0100 [thread overview]
Message-ID: <1490179462-16559-1-git-send-email-der.herr@hofr.at> (raw)
The redundant init_completion() here seems to be a cut&past error as
struct scsi_qla_host only has 4 completion elements to initialize, thus
the duplicate init_completion(disable_acb_comp) is simply removed.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
Found by experimental coccinelle script:
./drivers/scsi/qla4xxx/ql4_os.c:8667:1-16: WARNING: possible duplicate
init_completion
checking struct scsi_qla_host in
drivers/scsi/qla4xxx/ql4_def.h:457 "Linux Host Adapter structure"
it contain only the following 4 completion objects:
struct completion disable_acb_comp;
struct completion idc_comp;
struct completion link_up_comp;
struct completion mbx_intr_comp;
so it seems the double initialization of disable_acb_comp was just a
cut&past but and no omission of some other completion object - thus
the second initialization is simply removed.
Patch was only compile tested with: x86_64_defconfig + SCSI_LOWLEVEL=y,
CONFIG_SCSI_QLA_ISCSI=m
(...quite a few sparse and coccinelle errors/warnings during build-tests)
Patch is against 4.11-rc3 (localversion-next is next-20170322)
drivers/scsi/qla4xxx/ql4_os.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index ac52150..64c6fa5 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8663,9 +8663,8 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
init_completion(&ha->mbx_intr_comp);
init_completion(&ha->disable_acb_comp);
init_completion(&ha->idc_comp);
init_completion(&ha->link_up_comp);
- init_completion(&ha->disable_acb_comp);
spin_lock_init(&ha->hardware_lock);
spin_lock_init(&ha->work_lock);
--
2.1.4
next reply other threads:[~2017-03-22 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 10:44 Nicholas Mc Guire [this message]
2017-04-06 17:15 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490179462-16559-1-git-send-email-der.herr@hofr.at \
--to=der.herr@hofr.at \
--cc=QLogic-Storage-Upstream@qlogic.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=vikas.chaudhary@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®