netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
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: Wed, 30 Jul 2014 17:39:08 -0700	[thread overview]
Message-ID: <53D9902C.1060002@linaro.org> (raw)
In-Reply-To: <20140731102750.4a4c1315@canb.auug.org.au>

On 07/30/2014 05:27 PM, Stephen Rothwell wrote:
> 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 ...
Gah. That's embarrassing. Thank you. I'll fix that up.

thanks
john

  reply	other threads:[~2014-07-31  0:39 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
2014-07-31  0:39   ` John Stultz [this message]
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=53D9902C.1060002@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mingo@elte.hu \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rmanohar@qti.qualcomm.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).