From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D185623DE92 for ; Tue, 10 Dec 2024 09:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.145.95.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733824738; cv=none; b=XpZ9jgWD5o0iZz2ihMNrI6h012X4ErTccgk27YyTf/LpmOG3CMZ+HFvOpZi+JsO9AejVVAjdW3a57pNNtDax3xJEAsx24EfopIwpKCZsev58OhBytXwmP0luZU+2dz/BJE31KkrHg+vyphRyjWe6kJXL/9JbRALXeIPccoq1538= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733824738; c=relaxed/simple; bh=lo0j2H2dZfXOjbJTv4vtXGi8iUWP3x8twvv/cqXlGbQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=BlzdDyWN1cnRewi1jDVF+MTpploYdeJF4Y6zqkpyIc9wNgxyqLSj6Wij/sOCqf8orjWl4DoXzsr2siAy2J9puaKGGdBRcmj1AUc3+B7N9AVOQlAwK591ufA2ab/5l2CSeddIRBzHJmQ7cJNXVx6QTf+Wgw9J88Pvmcl9Oaf3KuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=toke.dk; spf=pass smtp.mailfrom=toke.dk; dkim=pass (2048-bit key) header.d=toke.dk header.i=@toke.dk header.b=eEbJJJSk; arc=none smtp.client-ip=45.145.95.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=toke.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=toke.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toke.dk header.i=@toke.dk header.b="eEbJJJSk" From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1733824724; bh=lo0j2H2dZfXOjbJTv4vtXGi8iUWP3x8twvv/cqXlGbQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eEbJJJSkBanWk0J+0FWLQkx7KxFfBQrKxxtmPaOa43ovtXaIPMh9iYkIOli/XmXHq Rxy3gUxm780EFx+sI6Uhv0Np4uzyfFzzFhEjCFRZ4BADbe0+Q4bHG8tYr3G1kwFLg4 QaiO41RgiJ5YtlXCM7LnAY1MxWOY1OYR+sag8o0CbBcd5A+WygLLdW0bsZ/7vvGTWr IRcpGd4pu4aScC4jp41SWcaOMIxvQ3Sq2nbH2QC+5NqpMdWKvaCXS/XHIzY4dQGZo9 vL7HKRhMHaRDbFTmevG1Dfwsn5FIuY/Yx4aoyelrKDAmCtwneXIeTeAwEge/lGyowh 7PBhXjLQCqMww== To: Dmitry Antipov Cc: Kalle Valo , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, Dmitry Antipov Subject: Re: [PATCH 3/3] wifi: ath9k: simplify internal time management In-Reply-To: <20241209155027.636400-3-dmantipov@yandex.ru> References: <20241209155027.636400-1-dmantipov@yandex.ru> <20241209155027.636400-3-dmantipov@yandex.ru> Date: Tue, 10 Dec 2024 10:58:44 +0100 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <877c877tbf.fsf@toke.dk> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Dmitry Antipov writes: > Prefer 'ktime_t' over 'struct timespec64' for 'struct ath_chanctx' and > 'struct ath_softc' timestamps, choose standard kernel time API over an > ad-hoc math in 'chanctx_event_delta()' and 'ath9k_hw_get_tsf_offset()', > adjust related users. Compile tested only. > > Signed-off-by: Dmitry Antipov Nice cleanup! Just one formatting nit: [...] > diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c > index 2f137856a823..cf664a0dedaa 100644 > --- a/drivers/net/wireless/ath/ath9k/main.c > +++ b/drivers/net/wireless/ath/ath9k/main.c > @@ -247,10 +247,8 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start) > if (!sc->cur_chan->offchannel && start) { > /* restore per chanctx TSF timer */ > if (sc->cur_chan->tsf_val) { > - u32 offset; > - > - offset = ath9k_hw_get_tsf_offset(&sc->cur_chan->tsf_ts, > - NULL); > + u32 offset = ath9k_hw_get_tsf_offset > + (sc->cur_chan->tsf_ts, 0); This turned into a really odd line break. Let's just keep the variable definition on its own line like it was before, so we can keep the function call the way it is as well... -Toke