Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp243217pxb; Wed, 27 Jan 2021 06:51:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXQ3+0ffccRAEMss38FnK/IafFrQRsxsOrvmiA37eMM63ZM31xfdw71N8ZWDn+vPbwpzT4 X-Received: by 2002:aa7:d288:: with SMTP id w8mr9319341edq.241.1611759063697; Wed, 27 Jan 2021 06:51:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611759063; cv=none; d=google.com; s=arc-20160816; b=HFeZWl7195Zv87CPqqizQxMRM7nTA5Dtk+OwUGoDS7fQ2S8uuXLKoLYeuj5dbL3kqg vaIJGT2qahvVoQod1DfkFuBLvKSWctzVy1fC3ScOJL34tcRh4hjUoMjYDllc88AgX5rK PW+4JzYvwkcd/Fmcie5992qa29tOBRsS6Te3rW7Bj9Pm7MPMMLbmdGcDHjJTMxbidJpU Ooj13pNLd8bdeQSyOV1TVuW0Es8IdBzY87fHNmVFfEoUg233To7RjH3NvX/p2McsXMkF iqjHAn07l6beELjAWqREIRFl+mCoTAtgwHDUkzrnQjUWiuen4lNm+7/Vv4oihE1845yh LXig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aNp3Htm/mthgfBxdo7SAS+BKT5IjCTT35idqtR5P8KU=; b=ovb9yGEhHDvdL4vBn2E774MAKycrZfFksR/FhyTIwmCPUx4b/u8qHCOsM5FT/5x4VD VkxSZOkir7zvHGtQyIBUR/UHBtMoFvL2dJ4G0DEoce4RBc3KOpgJF26S0qoWN5ypnOLM 4zLZDXolg8JUhcyx4FpWEtKQjP0RNWF1HuLCwp8+T/1p67eeeytVXzAg4lrh57pFxUfR 66IFwgdxmdYOzecFntYZMLRO/Z9Z7UiOQyFUjKnVXpJZGpykBVaVHkk4MFKD4TmjjTc9 GGXdJytRA2wOPdfdE6BuuV0vBKm/JZoA/r7y3d7SxmZEoTbEQkE8pArdteP7y5ZTF5TJ d2gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j4i6ufaQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 e22si964723edu.9.2021.01.27.06.50.14; Wed, 27 Jan 2021 06:51:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=j4i6ufaQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S233950AbhA0OtG (ORCPT + 99 others); Wed, 27 Jan 2021 09:49:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231732AbhA0OsZ (ORCPT ); Wed, 27 Jan 2021 09:48:25 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE97C061573; Wed, 27 Jan 2021 06:47:45 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id ke15so2977910ejc.12; Wed, 27 Jan 2021 06:47:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aNp3Htm/mthgfBxdo7SAS+BKT5IjCTT35idqtR5P8KU=; b=j4i6ufaQC0o+2TEixYwLXlhC1Rn1Nl1H5Hz+M8z0TstK6sU62SiTsFt72Ie4SsfZAg BqbUuooYRez7vUadLxSn1WDX6SqILkb3UUmz+pgEDDAAYGATDnfl7AH9xLoX8OwzoZtC YlpRItDPgy900MxFpfFhUPwyscFI50PpOT/TCtIc2FRW9a2dLYLKL26hxIB9UHIjt27W 8ZhwaXpnRjxMRiQQZjvKR7q67Bx6+wSevHet7aMU1bNUR/oLPScl/raFz0mxb7KyYMJn dM321TiRm/x2vGmyvzwuL4jBuKHOiZIRL+ytZsuLNupir01XkVzFmu4XmtEJZ+EUcc1m AU5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aNp3Htm/mthgfBxdo7SAS+BKT5IjCTT35idqtR5P8KU=; b=an24CHwJjW0c/acuv8Ve1zk8Yz6Mnm9GocDuL4ItcGrj5RydD3nWEPkcPlOrSCgnuK hMd6UFAiZbZ4BJdf7lBDRb3hxgQQ+Sfbk+pxLo5ppFip1e/ByhTyS0lDGH50Li0WggfX tfckHcWWaxj1z2iTB4bhYaNyoSidVTTZJW516hGVfKPBXY5WWRUzeUtrnu6l6Tcu8cQM fr4MZ6p3ptRzfhqGt7OSxNcPj2tfLzW2Tp2bAffWu7OqXRv2Pc3A2hq2TZL0dvdL0SKh s+eiOVITjqZMvOM9po6FBYMNT4Tpa9w4GUF+sMExvta73AHYISgc4xJF1Yi/IU6oP91q 3VVg== X-Gm-Message-State: AOAM531Fr03hsEgLeYzqGr1nE63WfHILNCSDZtHkQXm92yZqmuRc2ly0 vsdlcSR7iFP1M9jhyP3D4p5rkBwr4qlPHDkJ0KFBbQcc X-Received: by 2002:a17:906:fc5:: with SMTP id c5mr6855124ejk.538.1611758864039; Wed, 27 Jan 2021 06:47:44 -0800 (PST) MIME-Version: 1.0 References: <20210126171550.3066-1-kernel@esmil.dk> In-Reply-To: <20210126171550.3066-1-kernel@esmil.dk> From: Willem de Bruijn Date: Wed, 27 Jan 2021 09:47:08 -0500 Message-ID: Subject: Re: [PATCH] rtlwifi: use tasklet_setup to initialize rx_work_tasklet To: Emil Renner Berthing Cc: linux-wireless , Network Development , Ping-Ke Shih , Kalle Valo , "David S. Miller" , Jakub Kicinski , Allen Pais , Romain Perier , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jan 27, 2021 at 5:23 AM Emil Renner Berthing wrote: > > In commit d3ccc14dfe95 most of the tasklets in this driver was > updated to the new API. However for the rx_work_tasklet only the > type of the callback was changed from > void _rtl_rx_work(unsigned long data) > to > void _rtl_rx_work(struct tasklet_struct *t). > > The initialization of rx_work_tasklet was still open-coded and the > function pointer just cast into the old type, and hence nothing sets > rx_work_tasklet.use_callback = true and the callback was still called as > > t->func(t->data); > > with uninitialized/zero t->data. > > Commit 6b8c7574a5f8 changed the casting of _rtl_rx_work a bit and > initialized t->data to a pointer to the tasklet cast to an unsigned > long. > > This way calling t->func(t->data) might actually work through all the > casting, but it still doesn't update the code to use the new tasklet > API. > > Let's use the new tasklet_setup to initialize rx_work_tasklet properly > and set rx_work_tasklet.use_callback = true so that the callback is > called as > > t->callback(t); > > without all the casting. > > Fixes: 6b8c7574a5f8 ("rtlwifi: fix build warning") > Fixes: d3ccc14dfe95 ("rtlwifi/rtw88: convert tasklets to use new tasklet_setup() API") > Signed-off-by: Emil Renner Berthing Since the current code works, this could target net-next without Fixes tags. Acked-by: Willem de Bruijn