linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	"linux-wireless\@vger.kernel.org"
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] rtlwifi: rtl8188ee: mark RTX_POWER_{BEFORE,AFTER}_IQK_A reads as unused
Date: Tue, 13 Jun 2023 11:17:20 +0300	[thread overview]
Message-ID: <87ilbrepyn.fsf@kernel.org> (raw)
In-Reply-To: <0d1f24b9-a058-52fd-b669-54aa4e9162f9@yandex.ru> (Dmitry Antipov's message of "Thu, 1 Jun 2023 16:50:02 +0300")

Dmitry Antipov <dmantipov@yandex.ru> 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

  parent reply	other threads:[~2023-06-13  8:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 15:54 [PATCH] rtlwifi: rtl8188ee: drop RTX_POWER_BEFORE_IQK_A and RTX_POWER_AFTER_IQK_A reads Dmitry Antipov
2023-05-30 17:42 ` Larry Finger
2023-05-30 18:26   ` Dmitry Antipov
2023-05-30 18:55     ` Larry Finger
2023-05-31  0:25       ` Ping-Ke Shih
2023-05-31  5:51         ` Dmitry Antipov
2023-06-01  0:53           ` Ping-Ke Shih
2023-06-01 10:52           ` [PATCH] rtlwifi: rtl8188ee: mark RTX_POWER_{BEFORE,AFTER}_IQK_A reads as unused Dmitry Antipov
2023-06-01 12:30             ` Ping-Ke Shih
2023-06-01 13:50               ` Dmitry Antipov
2023-06-02  6:13                 ` Ping-Ke Shih
2023-06-05  9:43                   ` Dmitry Antipov
2023-06-13  8:17                 ` Kalle Valo [this message]
2023-06-13  8:18             ` Kalle Valo

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=87ilbrepyn.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=dmantipov@yandex.ru \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /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).