Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2133044pxa; Mon, 17 Aug 2020 01:27:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2Zsbzl51wX3CImjdSz4VoH1IKyK7S+Q0V4/VkGg+1Wfi8WFfYUcHSO51IXk8mMxNZUOWH X-Received: by 2002:a50:fd8d:: with SMTP id o13mr14271312edt.313.1597652879717; Mon, 17 Aug 2020 01:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597652879; cv=none; d=google.com; s=arc-20160816; b=OX4s/MCwY7MMguod2xUS9BupdEH6E/aQ62L+uGSfn8yKAXE7rGLGVM/Q9UfcFElSxy /kF04VE9kYZZo9U7XIUv21GDF8sF13IjJUG/DQx3paqSLB5sAmzj+Az6ZmheHHEDswoZ VJh0j+R5QgK5/LoRmVYZxV8f1pWDI9JdHdDT7Yj3eU0CSydQx3SJCMpCnZfrx0+CT+8Q ZAQ+0XqYXMWR4JjdBabFfY7KTQHSKLfPOB67ak0PTWB2syK4mi1FvOxoSVstbuGf5b// iSCJFn8qw6NHKviMPFFfBoEJtuV/IIRXkvo+Ag4pobLyxxg1Y1iJOAb0IN5d22UzuDTl If3Q== 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=ieaDS0kZabvaM2FQJESKDtwss85i612EBlDqx55UScQ=; b=o/hiAoVuQLdVmdkqNnCKx60N03lCYH+Xm5OsT1SscieXoNHrXmtM1luRIZAX0x1KzW oDUQ4lOi6TRLcXZjHHiiaxYA8dSQk6tF3k3kOjuko6FZnHagg1nyQpaeoHqTNw4KkOpS +Ex2cW5ghtIUdiT0bPTZZGq7Lkn/ivG7w7n+d3P8OJDTRXp3d1OYNbsWNGArSUU54IeU /SKdLJEaX+fuA8oSBu9+RzBSC+OxbcleUfgLf9U7qLBkEPmc3kORedGjZEB9f/nlC56q fxnGMhySC+nD7R2eXK9a0KrOiI5FSpkYanDpCGf5cKIkaW9SDJluK2rnECPFm/MewKlu lR/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r7fmQpvu; 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 g16si11417800ejf.103.2020.08.17.01.27.36; Mon, 17 Aug 2020 01:27:59 -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=r7fmQpvu; 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 S1726946AbgHQIZG (ORCPT + 99 others); Mon, 17 Aug 2020 04:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728038AbgHQIZB (ORCPT ); Mon, 17 Aug 2020 04:25:01 -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 25F33C061388; Mon, 17 Aug 2020 01:25:01 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id y10so5573766plr.11; Mon, 17 Aug 2020 01:25:01 -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=ieaDS0kZabvaM2FQJESKDtwss85i612EBlDqx55UScQ=; b=r7fmQpvu0cXvpoW4a9CZ/cT3MW3lztUUfiJGRP8uWIdQW718lbHcerRIY+XPN5w2dW 8g+GmL3UQQs5IIbiFNkDPeYmyJmo6J0G97FL2TFOQlxobIrYeQh4Dn+ntQyJsWRS19dy PTPV1tWwnnTudwXH3EQrSU8PuCBQePLEB3tvkFDsQf/gTFUy/QcukQKVyFRIHqYYhVbK XfL1vYS4KiGvTfyMx4FOO3+nJXthNtT0T5BY0uYgM16rcWekI1UZ4yLoM5VO2cIiYTSx p2FU4vZh0YJx9+hEx0TcRwmJdfBx6wOKgbsNWYUm9v0uh4ntUQD2A8SoKTqkRnAhIxsS Nk+A== 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=ieaDS0kZabvaM2FQJESKDtwss85i612EBlDqx55UScQ=; b=gweCUjG+xs/07YtEQdMp37lzPZlXjpa2ut93OLgY1Q8ibbHw3oTIw7R64BfcFCOomN uVJvilu1BMAO70Y6EKQvchp6sKfcwoxzzkPFihzGf0P5+v0rFvftVh1eHAD6rPqKokzb XvoNwfvh8rxoouyYVr53TCIxKjhUInSTBcBTfO9Om5sIzf+7Ch4OaMOUhYhyVfdaV7DA DfFQx5FaXX9uW73y3HKYhHnWCWp5YKsNWHWyA9SUiwirAd7KcT3ZWTxcZCMKSdz6lNeq 4mA/gblIfnQHH6iYqkvd7fyz45vsgM+8RdtQJhOVP5A1MJbyLBqdYatO3q9uHa/eng8k 276Q== X-Gm-Message-State: AOAM530Yd/gR2yRxNfxRotmSoVhtWTt8MrJi0wEtYeb05O88nRBWtowc QRR/ZX8F1ybiDPwSdUHI9UU= X-Received: by 2002:a17:90b:100e:: with SMTP id gm14mr11406569pjb.39.1597652700729; Mon, 17 Aug 2020 01:25:00 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id r186sm19928482pfr.162.2020.08.17.01.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 01:25:00 -0700 (PDT) From: Allen Pais To: jes@trained-monkey.org, davem@davemloft.net, kuba@kernel.org, kda@linux-powerpc.org, dougmill@linux.ibm.com, cooldavid@cooldavid.org, mlindner@marvell.com, borisp@mellanox.com Cc: keescook@chromium.org, linux-acenic@sunsite.dk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-rdma@vger.kernel.org, oss-drivers@netronome.com, Allen Pais , Romain Perier Subject: [PATCH] ethernet: cxgb4: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 13:54:15 +0530 Message-Id: <20200817082434.21176-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817082434.21176-1-allen.lkml@gmail.com> References: <20200817082434.21176-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/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c | 3 +-- drivers/net/ethernet/chelsio/cxgb4/sge.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index 9cb8b229c1b3..84fa9b8a9087 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h @@ -2100,7 +2100,7 @@ void free_tx_desc(struct adapter *adap, struct sge_txq *q, void cxgb4_eosw_txq_free_desc(struct adapter *adap, struct sge_eosw_txq *txq, u32 ndesc); int cxgb4_ethofld_send_flowc(struct net_device *dev, u32 eotid, u32 tc); -void cxgb4_ethofld_restart(unsigned long data); +void cxgb4_ethofld_restart(struct tasklet_struct *t); int cxgb4_ethofld_rx_handler(struct sge_rspq *q, const __be64 *rsp, const struct pkt_gl *si); void free_txq(struct adapter *adap, struct sge_txq *q); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c index ae7123a9de8e..6c259de96f96 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c @@ -114,8 +114,7 @@ static int cxgb4_init_eosw_txq(struct net_device *dev, eosw_txq->cred = adap->params.ofldq_wr_cred; eosw_txq->hwqid = hwqid; eosw_txq->netdev = dev; - tasklet_init(&eosw_txq->qresume_tsk, cxgb4_ethofld_restart, - (unsigned long)eosw_txq); + tasklet_setup(&eosw_txq->qresume_tsk, cxgb4_ethofld_restart); return 0; } diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index e668e17711c8..482b2bd602e6 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -3883,9 +3883,9 @@ static int napi_rx_handler(struct napi_struct *napi, int budget) return work_done; } -void cxgb4_ethofld_restart(unsigned long data) +void cxgb4_ethofld_restart(struct tasklet_struct *t) { - struct sge_eosw_txq *eosw_txq = (struct sge_eosw_txq *)data; + struct sge_eosw_txq *eosw_txq = from_tasklet(eosw_txq, t, qresume_tsk); int pktcount; spin_lock(&eosw_txq->lock); -- 2.17.1