Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2134806pxa; Mon, 17 Aug 2020 01:31:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWmht+gizJxSv8MReQa4hchkOpr4wGUEI1ljN4rFJRFVPwY+PwKL6L8ZEqNOGtKllYtRd+ X-Received: by 2002:a50:de04:: with SMTP id z4mr14135702edk.10.1597653081435; Mon, 17 Aug 2020 01:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597653081; cv=none; d=google.com; s=arc-20160816; b=ByXqex02dLyGjzGBWceau+0a1fEs13GWW/qROtnCITK32uI013KevY9hEqzFXzBKWH H9CReOuOfbcWxlw6mlwZ+yli44Le3H0YFAear/o4b7bFhpbInz4JlmpwljxNPCU/Jd8d RBSTIHBbfvzCytiMH6q0VO4MnCb7nCCJP4T35Xe1x0c37KMaFeCxHn1Rpiqr4gFAKJ5d SiyKxRqcCcdlvBOp2qM+U39+BMEWKDglIGnUXPL35kWuLlRUGwEDu6gK8EB+kSu9rREZ arK2+how9CVS8Ef8bePLix5n/TrMdRdGQeoodZGI3z2MQVKu1f0YJN3M9FJGIZ9BofuJ /tBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=QbVmlo1JjJ+fo8Hrfp8jbDzD1XVMcpN4Uy9zDhtnXEE=; b=Uzq2cy7GjL36mFHNc3QnF8DCFgz5YwZShKmLiQm/zEdC21RFXlIvr/EtwfdyT22xMs 9iDXp10+VTyYioGmDyyoN6ZtjWLdSPsoc2lIGQS0e+gsVunyCjXZZlSsgL+KPp5VaIQo bUVHY4m7EJlSHhCkj5BSYeUQo3LgnzC1TySpnpIDJz40GPz6uBnyPHPiRb/46qOmau3J Jv838ec0poEEzGpPED5bcAUHIvz5G3PlBp2UM5aBPeruZ+7hsEDqq/R4q/j23hpenpGN DCeIIcKPrn42kQWtb+EQ69Ndr++0egJmGkzbL3zXkg0oNsVw8SPsvpli9WC7GbE7uMq/ YkJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nFhwiyKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si10761964ejv.186.2020.08.17.01.30.58; Mon, 17 Aug 2020 01:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nFhwiyKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgHQI30 (ORCPT + 99 others); Mon, 17 Aug 2020 04:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726371AbgHQI3G (ORCPT ); Mon, 17 Aug 2020 04:29:06 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A490C061388; Mon, 17 Aug 2020 01:29:06 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id bh1so7130883plb.12; Mon, 17 Aug 2020 01:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QbVmlo1JjJ+fo8Hrfp8jbDzD1XVMcpN4Uy9zDhtnXEE=; b=nFhwiyKYaN/p+nU496vwSTlNS/FvdfpnsO6ojTqcfaaQIxhpU62MP0r36KyEfgjbuZ E5Ow/NgfXHWYWsW+B/sUCnJ/wuB5rTEBzk1IfQBuRLoSSrsheDkqAe/DZgM4wFBl/2Ds xtrse3ZP2DeVHgpQ6PIKhoroSVqKswJU2+P+pkwDv6+zAsqGBR+beTorlXyS/HthOx7U eT66Z9cOigVFmhSrgcQeo4s+CZ1+H5yN6VpYaWLUDOlUClVUiyeRnG1o9xVenmw7YfK6 3JZEtC7Sa1iDnxtgnhj++0WdpcmglaLtacJVUkctt6fj8LDVOuQtDz4qoRyQB+oEAcwb C0Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QbVmlo1JjJ+fo8Hrfp8jbDzD1XVMcpN4Uy9zDhtnXEE=; b=EzZy6COB3jW5Hp3Wxrj4RXWMm/RPFowLrqEaFbN7iANmt+FlkHVtgDtcu8btaECjMM DzXLyJUZM3v48iXRwSum169cfKcwGu0Skl3CgIir2u9HjFcSMk//LnT46zTcfKBDuCQV DzJB8sBLjk/IvwTnIXVW5iS61xEZ4bcmWi5z5aY/ntUMGHjSD818ORaszWZgxOnB4HXv vivfCAP18nNrnikJY0E64XOQ7cmnkqSduku34Bv6gSjxtzyW4kViBP6maFuWPV8v6wx3 uW2JlVrB9AUB99+NpaAmQoUJiWkAzMn1wWXIaEUZsS6DlfKt5EYCFFLrzyk76Ih3PUPC /WXA== X-Gm-Message-State: AOAM532udhKA9WR3RekmOmnqLx2CVLRIpTY1Hv3zHGQ6fEei/LehAnDk gwjmby7COnDFni5vYJVamWA= X-Received: by 2002:a17:90a:c201:: with SMTP id e1mr11467481pjt.142.1597652945070; Mon, 17 Aug 2020 01:29:05 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id r7sm18948102pfl.186.2020.08.17.01.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:29:04 -0700 (PDT) From: Allen Pais To: selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com Cc: keescook@chromium.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH 2/5] infiniband: hfi1: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:58:41 +0530 Message-Id: <20200817082844.21700-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817082844.21700-1-allen.lkml@gmail.com> References: <20200817082844.21700-1-allen.lkml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Allen Pais --- drivers/infiniband/hw/hfi1/sdma.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index 04575c9afd61..a307d4c8b15a 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c @@ -232,11 +232,11 @@ static const struct sdma_set_state_action sdma_action_table[] = { static void sdma_complete(struct kref *); static void sdma_finalput(struct sdma_state *); static void sdma_get(struct sdma_state *); -static void sdma_hw_clean_up_task(unsigned long); +static void sdma_hw_clean_up_task(struct tasklet_struct *); static void sdma_put(struct sdma_state *); static void sdma_set_state(struct sdma_engine *, enum sdma_states); static void sdma_start_hw_clean_up(struct sdma_engine *); -static void sdma_sw_clean_up_task(unsigned long); +static void sdma_sw_clean_up_task(struct tasklet_struct *); static void sdma_sendctrl(struct sdma_engine *, unsigned); static void init_sdma_regs(struct sdma_engine *, u32, uint); static void sdma_process_event( @@ -545,9 +545,10 @@ static void sdma_err_progress_check(struct timer_list *t) schedule_work(&sde->err_halt_worker); } -static void sdma_hw_clean_up_task(unsigned long opaque) +static void sdma_hw_clean_up_task(struct tasklet_struct *t) { - struct sdma_engine *sde = (struct sdma_engine *)opaque; + struct sdma_engine *sde = from_tasklet(sde, t, + sdma_hw_clean_up_task); u64 statuscsr; while (1) { @@ -604,9 +605,9 @@ static void sdma_flush_descq(struct sdma_engine *sde) sdma_desc_avail(sde, sdma_descq_freecnt(sde)); } -static void sdma_sw_clean_up_task(unsigned long opaque) +static void sdma_sw_clean_up_task(struct tasklet_struct *t) { - struct sdma_engine *sde = (struct sdma_engine *)opaque; + struct sdma_engine *sde = from_tasklet(sde, t, sdma_sw_clean_up_task); unsigned long flags; spin_lock_irqsave(&sde->tail_lock, flags); @@ -1454,11 +1455,10 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) sde->tail_csr = get_kctxt_csr_addr(dd, this_idx, SD(TAIL)); - tasklet_init(&sde->sdma_hw_clean_up_task, sdma_hw_clean_up_task, - (unsigned long)sde); - - tasklet_init(&sde->sdma_sw_clean_up_task, sdma_sw_clean_up_task, - (unsigned long)sde); + tasklet_setup(&sde->sdma_hw_clean_up_task, + sdma_hw_clean_up_task); + tasklet_setup(&sde->sdma_sw_clean_up_task, + sdma_sw_clean_up_task); INIT_WORK(&sde->err_halt_worker, sdma_err_halt_wait); INIT_WORK(&sde->flush_worker, sdma_field_flush); -- 2.17.1