From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: improve vdev map handling.
Date: Fri, 16 May 2014 07:11:11 -0700 [thread overview]
Message-ID: <53761C7F.80505@candelatech.com> (raw)
In-Reply-To: <87bnux4y42.fsf@kamboji.qca.qualcomm.com>
On 05/16/2014 07:06 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> writes:
>
>> On 05/16/2014 06:37 AM, Kalle Valo wrote:
>>
>>>> - ar->free_vdev_map &= ~BIT(arvif->vdev_id);
>>>> + ar->free_vdev_map &= ~(1 << arvif->vdev_id);
>>>
>>> Why remove the BIT()? Not that it matters much, I just think it's easier
>>> to read when BIT() macro is used. Would be good to convert all cases to
>>> use BIT anyway, but that's for a separate patch.
>>
>> BIT doesn't work on 64-bit numbers (ie, if vdev_id > 31)
>
> Oh, I didn't know that. Too bad, but then removing it makes sense.
>
>> and it takes a long time to figure out exactly what it does (try
>> grepping for BIT). Open-coding means much easier to fully understand
>> the code.
>
> All Linux engineers should know what BIT() does. If not, they should
> learn that ;)
Yeah, but see your comment above :P
Pain in the ass to track down the difference between (1 << x) and (1LLU << x),
and even worse when it's hidden behind a macro.
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath10k: improve vdev map handling.
Date: Fri, 16 May 2014 07:11:11 -0700 [thread overview]
Message-ID: <53761C7F.80505@candelatech.com> (raw)
In-Reply-To: <87bnux4y42.fsf@kamboji.qca.qualcomm.com>
On 05/16/2014 07:06 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> writes:
>
>> On 05/16/2014 06:37 AM, Kalle Valo wrote:
>>
>>>> - ar->free_vdev_map &= ~BIT(arvif->vdev_id);
>>>> + ar->free_vdev_map &= ~(1 << arvif->vdev_id);
>>>
>>> Why remove the BIT()? Not that it matters much, I just think it's easier
>>> to read when BIT() macro is used. Would be good to convert all cases to
>>> use BIT anyway, but that's for a separate patch.
>>
>> BIT doesn't work on 64-bit numbers (ie, if vdev_id > 31)
>
> Oh, I didn't know that. Too bad, but then removing it makes sense.
>
>> and it takes a long time to figure out exactly what it does (try
>> grepping for BIT). Open-coding means much easier to fully understand
>> the code.
>
> All Linux engineers should know what BIT() does. If not, they should
> learn that ;)
Yeah, but see your comment above :P
Pain in the ass to track down the difference between (1 << x) and (1LLU << x),
and even worse when it's hidden behind a macro.
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2014-05-16 14:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 18:22 [PATCH] ath10k: improve vdev map handling greearb
2014-04-30 18:22 ` greearb
2014-05-16 13:18 ` Kalle Valo
2014-05-16 13:18 ` Kalle Valo
2014-05-16 13:26 ` Ben Greear
2014-05-16 13:26 ` Ben Greear
2014-05-16 13:37 ` Kalle Valo
2014-05-16 13:37 ` Kalle Valo
2014-05-16 14:01 ` Ben Greear
2014-05-16 14:01 ` Ben Greear
2014-05-16 14:06 ` Kalle Valo
2014-05-16 14:06 ` Kalle Valo
2014-05-16 14:11 ` Ben Greear [this message]
2014-05-16 14:11 ` Ben Greear
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=53761C7F.80505@candelatech.com \
--to=greearb@candelatech.com \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.