From: Allen Pais <allen.cryptic@gmail.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com,
kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
shivasharan.srikanteshwara@broadcom.com
Cc: keescook@chromium.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
target-devel@vger.kernel.org,
Romain Perier <romain.perier@gmail.com>,
linuxppc-dev@lists.ozlabs.org, megaraidlinux.pdl@broadcom.com
Subject: [PATCH 4/8] scsi: isci: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 14:24:05 +0530 [thread overview]
Message-ID: <20200817085409.25268-5-allen.cryptic@gmail.com> (raw)
In-Reply-To: <20200817085409.25268-1-allen.cryptic@gmail.com>
From: Allen Pais <allen.lkml@gmail.com>
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/scsi/isci/host.c | 4 ++--
drivers/scsi/isci/host.h | 2 +-
drivers/scsi/isci/init.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 7b5deae68d33..599adebd039e 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -1113,9 +1113,9 @@ void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_ta
* @data: This parameter specifies the ISCI host object
*
*/
-void isci_host_completion_routine(unsigned long data)
+void isci_host_completion_routine(struct tasklet_struct *t)
{
- struct isci_host *ihost = (struct isci_host *)data;
+ struct isci_host *ihost = from_tasklet(ihost, t, completion_tasklet);
u16 active;
spin_lock_irq(&ihost->scic_lock);
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index 6bc3f022630a..6abe23682d9b 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -478,7 +478,7 @@ void isci_tci_free(struct isci_host *ihost, u16 tci);
void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_task *task);
int isci_host_init(struct isci_host *);
-void isci_host_completion_routine(unsigned long data);
+void isci_host_completion_routine(struct tasklet_struct *t);
void isci_host_deinit(struct isci_host *);
void sci_controller_disable_interrupts(struct isci_host *ihost);
bool sci_controller_has_remote_devices_stopping(struct isci_host *ihost);
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 085e285f427d..32a0117b5ff4 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -511,8 +511,7 @@ static struct isci_host *isci_host_alloc(struct pci_dev *pdev, int id)
init_waitqueue_head(&ihost->eventq);
ihost->sas_ha.dev = &ihost->pdev->dev;
ihost->sas_ha.lldd_ha = ihost;
- tasklet_init(&ihost->completion_tasklet,
- isci_host_completion_routine, (unsigned long)ihost);
+ tasklet_setup(&ihost->completion_tasklet, isci_host_completion_routine);
/* validate module parameters */
/* TODO: kill struct sci_user_parameters and reference directly */
--
2.17.1
next prev parent reply other threads:[~2020-08-17 11:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 8:54 [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-17 8:54 ` [PATCH 1/8] scsi: aic94xx: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17 8:54 ` [PATCH 2/8] scsi: esas2r: " Allen Pais
2020-08-17 8:54 ` [PATCH 3/8] scsi: ibmvscsi: " Allen Pais
2020-08-17 8:54 ` Allen Pais [this message]
2020-08-17 8:54 ` [PATCH 5/8] scsi: megaraid: " Allen Pais
2020-08-17 8:54 ` [PATCH 6/8] scsi: mvsas: " Allen Pais
2020-08-17 8:54 ` [PATCH 7/8] scsi: pm8001: " Allen Pais
2020-08-17 8:54 ` [PATCH 8/8] scsi: pmcraid: " Allen Pais
2020-08-17 14:41 ` [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup() James Bottomley
2020-08-17 19:28 ` Kees Cook
2020-08-17 19:57 ` James Bottomley
2020-09-01 10:06 ` Allen
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=20200817085409.25268-5-allen.cryptic@gmail.com \
--to=allen.cryptic@gmail.com \
--cc=allen.lkml@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=kashyap.desai@broadcom.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=romain.perier@gmail.com \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.com \
--cc=target-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).