Search Linux Wireless

Re: [PATCH] rtlwifi: rtl8188ee: mark RTX_POWER_{BEFORE,AFTER}_IQK_A reads as unused

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

 



Dmitry Antipov <dmantipov@xxxxxxxxx> writes:

>> Why not just
>>
>> rtl_get_bbreg(hw, RTX_POWER_BEFORE_IQK_A, MASKDWORD);
>> rtl_get_bbreg(hw, RTX_POWER_AFTER_IQK_A, MASKDWORD);
>
> Compiler with -Wextra etc. or static analysis tool may complain about an unused
> return value. As far as I know GCC has __attribute__((warn_unused_result)) but
> lacks an opposite thing, so (somewhat ugly explicit) cast to 'void' may be helpful.

I assume you are referring to this attribute:

#define __must_check                    __attribute__((__warn_unused_result__))

But if __must_check is NOT set doesn't it mean that checking of the
function's return value is optional? At least that's how I interpret the
meaning.


-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



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

  Powered by Linux