From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F129BC77B7A for ; Tue, 13 Jun 2023 08:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241062AbjFMIRa (ORCPT ); Tue, 13 Jun 2023 04:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240580AbjFMIR2 (ORCPT ); Tue, 13 Jun 2023 04:17:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E66F170C for ; Tue, 13 Jun 2023 01:17:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA0D461446 for ; Tue, 13 Jun 2023 08:17:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 896F5C433EF; Tue, 13 Jun 2023 08:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686644245; bh=v97Pgmi2O3ZAlo7DqMrbTlr6gqnIz2L9jXl7WR2Mjfk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZZaGGjSE2XvY6utuR0FG36SfM6DeKX4MivxEEmxfHSpnaf2sSgMyBWMZgQEcoCvJl EgT1MQonaVzrtl8Bnb0wv0fHs8P0kUJwNcl9KKyHBZXLQ1BvPSzGAD8LE4Voa/nrVU +4LajWnvtbZlIyfiw230euIaxOpeHtV9NnPmocG/2RWKfC4ng9NsanyxU/U1zGKcV4 1CpL1xqtAdiat7dg/5SJZ4sdHxBlc/2glaKES53KEdTpxcmtXAPaNnqTjK/kcfgSoa Yq1hgDAB7irJT5iFBy+4gL5IVdZegGLeNkz6m2NmVFA1X7RK3RkfAi5xhhdypF+nzp o30WA75CoVeZA== From: Kalle Valo To: Dmitry Antipov Cc: Ping-Ke Shih , "linux-wireless\@vger.kernel.org" Subject: Re: [PATCH] rtlwifi: rtl8188ee: mark RTX_POWER_{BEFORE,AFTER}_IQK_A reads as unused References: <20230601105215.27013-1-dmantipov@yandex.ru> <3b92f9205003f44187f7ebf7add6c3e0626e9646.camel@realtek.com> <0d1f24b9-a058-52fd-b669-54aa4e9162f9@yandex.ru> Date: Tue, 13 Jun 2023 11:17:20 +0300 In-Reply-To: <0d1f24b9-a058-52fd-b669-54aa4e9162f9@yandex.ru> (Dmitry Antipov's message of "Thu, 1 Jun 2023 16:50:02 +0300") Message-ID: <87ilbrepyn.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Dmitry Antipov 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