mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: kernel test robot <lkp@intel.com>,
	David Lechner <dlechner@baylibre.com>,
	Jonathan Cameron <jic23@kernel.org>
Cc: <llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	David Lechner <dlechner@baylibre.com>
Subject: Re: [PATCH] iio: core: make iio_device_claim_direct_mode() __must_check
Date: Fri, 4 Oct 2024 10:57:48 -0700	[thread overview]
Message-ID: <67002c9cdb068_10a0a294a7@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <202410040721.upAHwZJm-lkp@intel.com>

kernel test robot wrote:
> Hi David,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 431c39f6d3edbab14f48dbf37a58ccdc0ac3be1e]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/David-Lechner/iio-core-make-iio_device_claim_direct_mode-__must_check/20241002-233644
> base:   431c39f6d3edbab14f48dbf37a58ccdc0ac3be1e
> patch link:    https://lore.kernel.org/r/20241002-iio-must-check-claim-direct-v1-1-ab94ce728731%40baylibre.com
> patch subject: [PATCH] iio: core: make iio_device_claim_direct_mode() __must_check
[..]
> >> include/linux/iio/iio.h:669:50: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
>      669 | DEFINE_GUARD(iio_claim_direct, struct iio_dev *, iio_device_claim_direct_mode(_T),

So I think this points to the fact that iio_device_claim_direct_mode()
should not be using DEFINE_GUARD() in the first instance. I think
iio_claim_direct() really wants to be using DEFINE_CLASS() directly.
Skip usage of DEFINE_GUARD() which I now see is unable to interoperate
with a __must_check locking function.

Perhaps the new class can be something like:

    DEFINE_GUARD_EXCL_COND()

...which creates a guard that is exclusively conditional and has no
unconditional flavor. However, maybe that only lives in iio unless and
until another user arrives.

  reply	other threads:[~2024-10-04 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 15:34 David Lechner
2024-10-03 23:26 ` kernel test robot
2024-10-04 17:57   ` Dan Williams [this message]
2024-10-04 19:12     ` David Lechner

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=67002c9cdb068_10a0a294a7@dwillia2-mobl3.amr.corp.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®