From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 856CBC433E6 for ; Wed, 27 Jan 2021 15:24:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F31B2079A for ; Wed, 27 Jan 2021 15:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235162AbhA0PY2 (ORCPT ); Wed, 27 Jan 2021 10:24:28 -0500 Received: from m42-8.mailgun.net ([69.72.42.8]:29763 "EHLO m42-8.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343620AbhA0PUq (ORCPT ); Wed, 27 Jan 2021 10:20:46 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1611760826; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=sycn5f5l2figDDwj1wRi32dFexXA+kHaqG/mitXByk8=; b=Qjcl47t3kKKS5HHuWz6tVXvzEMiHTv8CvsVi0KNjYHT401ODY78s/goAkMdWb1qDTygzFbD4 E+vXDsawHDO6S3HNNga8mkWMQy2oAtQqu0//eP7MexEQHTVaN+Kkm1m1rSG/5XihMtKH6RvV sggTWhNJkWu/dGpLLQQH3RoetVM= X-Mailgun-Sending-Ip: 69.72.42.8 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 601184982ef52906ced9ee23 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 Jan 2021 15:19:52 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 92294C43463; Wed, 27 Jan 2021 15:19:52 +0000 (UTC) Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7DC4EC433C6; Wed, 27 Jan 2021 15:19:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7DC4EC433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Willem de Bruijn Cc: Emil Renner Berthing , linux-wireless , Network Development , Ping-Ke Shih , "David S. Miller" , Jakub Kicinski , Allen Pais , Romain Perier , LKML Subject: Re: [PATCH] rtlwifi: use tasklet_setup to initialize rx_work_tasklet References: <20210126171550.3066-1-kernel@esmil.dk> Date: Wed, 27 Jan 2021 17:19:46 +0200 In-Reply-To: (Willem de Bruijn's message of "Wed, 27 Jan 2021 09:47:08 -0500") Message-ID: <87pn1q8l0t.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Willem de Bruijn writes: > 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 This should go to wireless-drivers-next, not net-next. > without Fixes tags. Correct, no need for Fixes tag as there's no bug to fix. This is only cleanup AFAICS. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches