From: Stephen Rothwell <sfr@canb•auug.org.au>
To: John Stultz <john.stultz@linaro•org>
Cc: linux-kernel@vger•kernel.org, Ingo Molnar <mingo@elte•hu>,
"H. Peter Anvin" <hpa@zytor•com>,
Peter Zijlstra <peterz@infradead•org>,
David Miller <davem@davemloft•net>,
"John W. Linville" <linville@tuxdriver•com>,
Felix Fietkau <nbd@openwrt•org>,
Rajkumar Manoharan <rmanohar@qti•qualcomm.com>,
netdev@vger•kernel.org,
QCA ath9k Development <ath9k-devel@qca•qualcomm.com>,
linux-next@vger•kernel.org
Subject: Re: [RFC][PATCH] wireless: ath9k: Convert from timespecs to ktime_t
Date: Thu, 31 Jul 2014 10:27:50 +1000 [thread overview]
Message-ID: <20140731102750.4a4c1315@canb.auug.org.au> (raw)
In-Reply-To: <1406764865-26860-1-git-send-email-john.stultz@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Hi John,
One obvious thing ...
On Wed, 30 Jul 2014 17:01:05 -0700 John Stultz <john.stultz@linaro•org> wrote:
>
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index fd0158f..d15f48e 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -1731,19 +1731,14 @@ fail:
> return -EINVAL;
> }
>
> -u32 ath9k_hw_get_tsf_offset(struct timespec *last, struct timespec *cur)
> +u32 ath9k_hw_get_tsf_offset(ktime_t *last, ktime_t *cur)
> {
> - struct timespec ts;
> s64 usec;
>
> - if (!cur) {
> - getrawmonotonic(&ts);
> - cur = &ts;
> - }
> -
> - usec = cur->tv_sec * 1000000ULL + cur->tv_nsec / 1000;
> - usec -= last->tv_sec * 1000000ULL + last->tv_nsec / 1000;
> + if (!cur)
> + *cur = ktime_get_raw();
You are assigning through a NULL pointer here ...
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-07-31 0:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 0:01 [RFC][PATCH] wireless: ath9k: Convert from timespecs to ktime_t John Stultz
2014-07-31 0:27 ` Stephen Rothwell [this message]
2014-07-31 0:39 ` John Stultz
2014-07-31 0:48 ` [RFC][PATCH v2] " John Stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140731102750.4a4c1315@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=ath9k-devel@qca$(echo .)qualcomm.com \
--cc=davem@davemloft$(echo .)net \
--cc=hpa@zytor$(echo .)com \
--cc=john.stultz@linaro$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linville@tuxdriver$(echo .)com \
--cc=mingo@elte$(echo .)hu \
--cc=nbd@openwrt$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=peterz@infradead$(echo .)org \
--cc=rmanohar@qti$(echo .)qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox