linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Ajay.Kathat@microchip.com>
To: <joe@perches.com>, <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
	<Ganesh.Krishna@microchip.com>, <Aditya.Shankar@microchip.com>,
	<Adham.Abozaeid@microchip.com>, <johannes@sipsolutions.net>
Subject: Re: [PATCH 4/8] staging: wilc1000: avoid line over 80 chars in wilc_parse_network_info()
Date: Mon, 5 Nov 2018 12:18:04 +0000	[thread overview]
Message-ID: <fcd1665b-4e75-54f0-ff77-08807fa311f6@microchip.com> (raw)
In-Reply-To: <0244e9225446db503360d9c024e0eb7e25c29944.camel@perches.com>

Hi Joe,

On 11/5/2018 4:27 PM, Joe Perches wrote:
> On Thu, 2018-11-01 at 16:45 +0000, Ajay.Kathat@microchip.com wrote:
>> From: Ajay Singh <ajay.kathat@microchip.com>
>>
>> Use shorter name for 'network_info' variable to avoid line over 80 chars
>> issue.
>
> I suppose this is OK, though perhaps unnecessary.
>
> As well, perhaps there are defects in the original code
> in a couple places.
>
>> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> []
>> -		network_info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp);
>> -		network_info->tsf_lo = (u32)network_info->tsf_hi;
> Perhaps there is a defect for both tsf_hi assignments
> as it appears as if both are missing ">> 32"

Actually, 'tsf_hi' is used to store the complete tsf value as its data
type is u64.  This value is pass to the cfg80211_inform_bss() as it is.
So the conversion of 'tsf_hi' to 32 bit  is not required in this case.

>> +		info->cap_info = le16_to_cpu(mgt->u.beacon.capab_info);
>> +		info->beacon_period = le16_to_cpu(mgt->u.beacon.beacon_int);
>> +		info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp);
>> +		info->tsf_lo = (u32)info->tsf_hi;
> Perhaps this should be 
>
> 		network_info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp) >> 32;
>
> or
>
> 		network_info->tsf_hi = upper_32_bits(le64_to_cpu(...));
> 		network_info->tsf_lo = lower_32_bits(le64_to_cpu(...));
>
>

  reply	other threads:[~2018-11-05 12:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 16:45 [PATCH 0/8] staging: wilc1000: make use of cfg80211 provided API's Ajay.Kathat
2018-11-01 16:45 ` [PATCH 1/8] staging: wilc1000: refactor wilc_parse_network_info() using kernel framework api's Ajay.Kathat
2018-11-01 16:45 ` [PATCH 2/8] staging: wilc1000: remove unused code in coreconfigurator Ajay.Kathat
2018-11-01 16:45 ` [PATCH 3/8] staging: wilc1000: refactor get_bssid() function Ajay.Kathat
2018-11-01 16:45 ` [PATCH 4/8] staging: wilc1000: avoid line over 80 chars in wilc_parse_network_info() Ajay.Kathat
2018-11-04 19:17   ` Joe Perches
2018-11-05  4:42     ` Ajay.Kathat
2018-11-05 10:57   ` Joe Perches
2018-11-05 12:18     ` Ajay.Kathat [this message]
2018-11-05 15:57       ` Joe Perches
2018-11-06  6:01         ` Ajay.Kathat
2018-11-01 16:45 ` [PATCH 5/8] staging: wilc1000: refactor wilc_parse_assoc_resp_info() Ajay.Kathat
2018-11-01 16:45 ` [PATCH 6/8] staging: wilc1000: remove unnecessary MAX_STRING_LEN macro Ajay.Kathat
2018-11-01 16:45 ` [PATCH 7/8] staging: wilc1000: remove coreconfigurator.c file Ajay.Kathat
2018-11-01 16:45 ` [PATCH 8/8] staging: wilc1000: remove coreconfigurator.h file Ajay.Kathat

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=fcd1665b-4e75-54f0-ff77-08807fa311f6@microchip.com \
    --to=ajay.kathat@microchip.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=Aditya.Shankar@microchip.com \
    --cc=Ganesh.Krishna@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=johannes@sipsolutions.net \
    --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 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).