All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
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 17:35:39 +0200	[thread overview]
Message-ID: <YLj2jJi/iuskaemH@kunai> (raw)
In-Reply-To: <CAMuHMdVLzzK-hsaEO4mEkOeCnzKuXgORanB+GGnHZjonwQAD9w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]


Yeah, I also assume that it used to work at some time. Didn't bother to
investigate, though.

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

In debugfs, it is all cast from unsigned long long to something. Check
simple_attr_write() where the value is obtained with kstrtoull. The code
fix would be to not use simple_attr, I think. I opted for the doc fix.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-06-03 15:35 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
2021-06-03 15:35   ` Wolfram Sang [this message]
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=YLj2jJi/iuskaemH@kunai \
    --to=wsa+renesas@sang-engineering.com \
    --cc=akinobu.mita@gmail.com \
    --cc=corbet@lwn.net \
    --cc=geert@linux-m68k.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.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 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.