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 BB3AFC433E6 for ; Wed, 27 Jan 2021 15:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8269D207B0 for ; Wed, 27 Jan 2021 15:26:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235949AbhA0PZl (ORCPT ); Wed, 27 Jan 2021 10:25:41 -0500 Received: from a1.mail.mailgun.net ([198.61.254.60]:51031 "EHLO a1.mail.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343793AbhA0PUr (ORCPT ); Wed, 27 Jan 2021 10:20:47 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1611760827; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=sycn5f5l2figDDwj1wRi32dFexXA+kHaqG/mitXByk8=; b=JffxKWRMNOj2y+E1TFFAhd7B91+WKJIMSJYKhgWhtOxTDfdQ5lfpL/xd8fG4V7ajR1TVX+/n fIEMl3Fhhc6seLBZ0SPF7KFquii5GFHP4j0dFce4gqhJ7tWPJnE+Cv1ap1V3qbIcZE8rgzn2 28PrZzmy27usbycXdCQ4Oft+saE= X-Mailgun-Sending-Ip: 198.61.254.60 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd 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 601184982ef52906ced9ee22 (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-kernel@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