From: Miklos Szeredi <miklos@szeredi.hu>
To: Matthew Wilcox <willy@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
lsf-pc <lsf-pc@lists.linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] tracing the source of errors
Date: Wed, 7 Feb 2024 13:19:46 +0100 [thread overview]
Message-ID: <CAJfpegssQ73Wv2w0F6oHm7yhUP3Q2n2vmqAPWw2E72Xa2MMSSw@mail.gmail.com> (raw)
In-Reply-To: <ZcNw-ek8s3AHxxCB@casper.infradead.org>
On Wed, 7 Feb 2024 at 13:00, Matthew Wilcox <willy@infradead.org> wrote:
> To be perfectly clear, you're suggesting two things.
>
> Option (a) change "all" code like this:
> - ret = -EINVAL;
> + ret = -ERR(EINVAL);
>
> where ERR would do some magic with __func__ and __LINE__.
>
> Option (b)
>
> -#define EINVAL 22
> +#define E_INVAL 22
> +#define EINVAL ERR(E_INVAL)
>
> and then change all code that does something like:
>
> if (err == -EINVAL)
> to
> if (err == -E_INVAL)
>
> Or have I misunderstood?
Something like that, yes.
Thanks,
Miklos
next prev parent reply other threads:[~2024-02-07 12:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 9:54 [LSF/MM/BPF TOPIC] tracing the source of errors Miklos Szeredi
2024-02-07 11:00 ` [Lsf-pc] " Jan Kara
2024-02-07 11:23 ` Miklos Szeredi
2024-02-07 12:00 ` Matthew Wilcox
2024-02-07 12:19 ` Miklos Szeredi [this message]
2024-02-08 20:47 ` Gabriel Krisman Bertazi
2024-02-07 19:29 ` Eric Sandeen
2024-02-08 20:39 ` Gabriel Krisman Bertazi
2024-02-07 17:16 ` Darrick J. Wong
2024-02-07 21:37 ` Dave Chinner
2024-02-08 9:09 ` Miklos Szeredi
2024-02-09 2:27 ` Dave Chinner
2024-02-08 15:57 ` Matthew Wilcox
2024-02-09 1:55 ` Dave Chinner
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=CAJfpegssQ73Wv2w0F6oHm7yhUP3Q2n2vmqAPWw2E72Xa2MMSSw@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=willy@infradead.org \
/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).