Search Linux Wireless

Re: [PATCH 34/34] brcmfmac: Reduce the noise from repeatedly dereferencing common pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/08/17 13:29, Arend van Spriel wrote:
>>  int brcmf_sdio_sleep(struct brcmf_sdio *bus, bool sleep)
>>  {
>> +	struct brcmf_sdio_dev *sdiodev = bus->sdiodev;
>> +	struct sdio_func *func1 = sdiodev->func1;
>
> Actually only wanted to explicitly mention this one. Probably the
> compiler is smart enough to keep sdiodev from the stack, but I would say
> it is a variable you do not really need and also in terms of readability
> it seems clear enough to do it in one assignment.

Yeah, it could be - but as you say, the compiler *will* be smart enough,
and doing it in this manner makes it consistent with all the other code :-)

I'm looking at your other comments atm. :)

-Ian

>>  	int ret;
>>  
>> -	sdio_claim_host(bus->sdiodev->func1);
>> +	sdio_claim_host(func1);
>>  	ret = brcmf_sdio_bus_sleep(bus, sleep, false);
>> -	sdio_release_host(bus->sdiodev->func1);
>> +	sdio_release_host(func1);
>>  




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux