All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH] docs: fault-injection: fix non-working usage of negative values
Date: Thu, 3 Jun 2021 15:27:04 +0200	[thread overview]
Message-ID: <CAMuHMdVLzzK-hsaEO4mEkOeCnzKuXgORanB+GGnHZjonwQAD9w@mail.gmail.com> (raw)
In-Reply-To: <20210603125841.27436-1-wsa+renesas@sang-engineering.com>

Hi Wolfram,

On Thu, Jun 3, 2021 at 2:59 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Fault injection uses debugfs in a way that the provided values via sysfs
> are interpreted as u64. Providing negative numbers results in an error:
>
> /sys/kernel/debug/fail_function# echo -1 > times
> sh: write error: Invalid argument

Interesting...

> Update the docs and examples to use "printf %#x <val>" in these cases.
> For "retval", reword the paragraph a little and fix a typo.

Presumably this is something that used to work, but was broken (not
so) recently.  Perhaps the code should be fixed instead?

The code uses debugfs_create_atomic_t(), and atomic_t is signed, so
I'd expect negative numbers to work.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2021-06-03 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 12:58 [PATCH] docs: fault-injection: fix non-working usage of negative values Wolfram Sang
2021-06-03 13:27 ` Geert Uytterhoeven [this message]
2021-06-03 15:35   ` Wolfram Sang
2021-06-14 21:58 ` Jonathan Corbet

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=CAMuHMdVLzzK-hsaEO4mEkOeCnzKuXgORanB+GGnHZjonwQAD9w@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=akinobu.mita@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.