Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp285739pxb; Wed, 27 Jan 2021 07:42:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzotsZJYu4wn77zUo8g/EG+PkP79A7sQnAbGa0O8XPLN64l/mhet9YM+ufNYKFTsgpKgjGc X-Received: by 2002:a50:b746:: with SMTP id g64mr9740268ede.33.1611762171937; Wed, 27 Jan 2021 07:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611762171; cv=none; d=google.com; s=arc-20160816; b=pUXPcONgBkbgaurLwnzQ645VzdhXb8M80rqIC+F+pMT7B1C0HDVgI1e3SENppSl8MK jXr5KkxOyPl5tG7ij6CcHk9DDvMVmJoB8Y/t228d6fbDd05HqhTeYO4ESQ5CQU0/a4xB eZCHmdaMF6eDZxornb2eRnsW/vLJLcMO3NEVfAIE6SIjcGZIU0aGxRtGU1DnVX+y5Rag FU1qzOpTcg0ZHetXWxXoGadS9pp0imFPnrw/asVbwSgjMdWxpOsE6/lmep0pA84dGpIM 3kyhmw2Ro/91fSY2c0ez3ZecplUYDdkntygeAz37xMwTHC6BVT72dXJ2ibvfWWyjF0au G8cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=6DkDkEV7TGoJ4NLBbSGZElh1mjjPhmyjl8xd9psqcTo=; b=WoMU86o9tw6femR28byYfZj8nhpi2LIlIwP7LzygV5vyfDqzEMePbeAfQDoMy/V1yu lwLhz/K+yIDiDoQqVS8EZF5L3lRoOoKJcXrPOPH5MIobBz5QQB+aECMxzBUG0cu0s2nB 4goOETGHPc6ssQyjMldYPQhs7q9cBJC3dDBsH6XEFIfss46rFTxXMEmt4A2D2e/8gUzN 0U/+KddWduC4tR+qCYKgxMNTY9We1ZmO3iQKQfLAolwZDWUAtL9gmZ+9ZnDMll7OofJH VixkYpW2vfk6FUR2s/iBUmCfd1c9/Ccmp0xkarr6kzYRnY5C7tXl1AOxHBCllKymk2e8 xvJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=gCsh8GDN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si957704ejz.31.2021.01.27.07.42.25; Wed, 27 Jan 2021 07:42:51 -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=@mg.codeaurora.org header.s=smtp header.b=gCsh8GDN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236383AbhA0Pkb (ORCPT + 99 others); Wed, 27 Jan 2021 10:40:31 -0500 Received: from a1.mail.mailgun.net ([198.61.254.60]:44133 "EHLO a1.mail.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236209AbhA0PeL (ORCPT ); Wed, 27 Jan 2021 10:34:11 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1611761632; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=6DkDkEV7TGoJ4NLBbSGZElh1mjjPhmyjl8xd9psqcTo=; b=gCsh8GDN5EpUHJatooqGAn4wXdLHDidNNF06jdR150eAgFQ0kwA5vlnw2VurOylp8apAp1zO Why+XUuoeJKNXOQxaT2TiPRDhmgFhcEWhnaIQRcoh/A7UHQ52PPiFMnPevZnhycPrPnxbmgA kqNlexThs4EepTaHXeRh0DBU3W0= X-Mailgun-Sending-Ip: 198.61.254.60 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-n04.prod.us-east-1.postgun.com with SMTP id 601187bc2c36b2106d390520 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 Jan 2021 15:33:16 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C163FC43463; Wed, 27 Jan 2021 15:33:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 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 45BA3C43463; Wed, 27 Jan 2021 15:33:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 45BA3C43463 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: Emil Renner Berthing Cc: Willem de Bruijn , 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> <87pn1q8l0t.fsf@codeaurora.org> Date: Wed, 27 Jan 2021 17:33:10 +0200 In-Reply-To: (Emil Renner Berthing's message of "Wed, 27 Jan 2021 16:25:39 +0100") Message-ID: <87lfce8keh.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 Emil Renner Berthing writes: > On Wed, 27 Jan 2021 at 16:20, Kalle Valo wrote: >> >> 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. Forgot to mention that I can remove the Fixes tags during commit, so no need to resend just because of those. > I can definitely see how you can reasonably disagree, but I would not > be comfortable having code that only works because the calling > conventions of all relevant architectures happen to put the first > unsigned long argument and the first pointer argument in the same > register. If there's a bug this patch fixes please explain it clearly in the commit log. But as I read it (though I admit very quickly) I understood this is just cleanup. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches