Re: [PATCH v4 3/3] printf: implicate test line in failure messages

2025-02-19 Thread Rasmus Villemoes
On Fri, 14 Feb 2025 at 22:53, Tamir Duberstein wrote: > > This improves the failure output by pointing to the failing line at the > top level of the test, e.g.: > # test_number: EXPECTATION FAILED at lib/printf_kunit.c:103 > lib/printf_kunit.c:167: vsnprintf(buf, 256, "%#-12x", ...) wrote

Re: [PATCH v3 0/2] printf: convert self-test to KUnit

2025-02-14 Thread Rasmus Villemoes
On Fri, 14 Feb 2025 at 17:53, Tamir Duberstein wrote: > > On Fri, Feb 14, 2025 at 11:02 AM Andy Shevchenko > wrote: > > > > On Fri, Feb 14, 2025 at 04:35:12PM +0100, Petr Mladek wrote: > > > I have just quickly tested this before leaving for a week. > > > And I am fine with the result. > > Than

Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree

2024-01-09 Thread Rasmus Villemoes
On 14/12/2023 08.33, Masahiro Yamada wrote: > On Thu, Dec 14, 2023 at 3:12 PM Masahiro Yamada wrote: >> > One more question to confirm if I can use this > for my practical use-cases. > > Is U-Boot able to handle FIT (includes kernel + DTs) > and a separate initrd? > > # bootm : > > > Pre

Re: [PATCH v3] docs: Use make invocation's -j argument for parallelism

2019-10-15 Thread Rasmus Villemoes
On 06/10/2019 21.33, Rasmus Villemoes wrote: > On 04/10/2019 18.08, Kees Cook wrote: >> The best solution would be to teach sphinx-build about the Make >> jobserver, though I expect that would be weird. Another idea would be to >> hold the reservation until sphinx-build fin

[PATCH v5] printf: add support for printing symbolic error names

2019-10-15 Thread Rasmus Villemoes
bottom so that one takes precedence. Acked-by: Uwe Kleine-König Reviewed-by: Petr Mladek Signed-off-by: Rasmus Villemoes --- Found a few more things, so sending new revision anyway. v5: Fix cosmetic issues per Petr. Fix missing "-" in "EDQUOT". Fix a few comments on at the e

Re: [PATCH v3] docs: Use make invocation's -j argument for parallelism

2019-10-06 Thread Rasmus Villemoes
On 04/10/2019 18.08, Kees Cook wrote: > On Fri, Oct 04, 2019 at 11:15:46AM +0200, Rasmus Villemoes wrote: >> On 25/09/2019 01.29, Kees Cook wrote: >>> +# Extract and prepare jobserver file descriptors from envirnoment. >> >> Ah, reading more carefully you set O_NO

Re: [PATCH v3] docs: Use make invocation's -j argument for parallelism

2019-10-04 Thread Rasmus Villemoes
On 25/09/2019 01.29, Kees Cook wrote: > > # User-friendly check for pdflatex and latexmk > HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; > else echo 0; fi) > @@ -68,6 +68,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath > $(BUILDDIR)/$3/$4) > PYTHOND

Re: [PATCH v3] printf: add support for printing symbolic error codes

2019-09-29 Thread Rasmus Villemoes
> > On Tue 2019-09-17 08:59:59, Rasmus Villemoes wrote: >> With my embedded hat on, I've made it possible to remove this. >> >> I've tested that the #ifdeffery in errcode.c is sufficient to make >> this compile on arm, arm64, mips, powerpc, s390, x86 - I&

[PATCH 5/5] lib/math: remove int_pow()

2019-09-19 Thread Rasmus Villemoes
No users left. Signed-off-by: Rasmus Villemoes --- Documentation/core-api/kernel-api.rst | 3 --- include/linux/kernel.h| 1 - lib/math/Makefile | 2 +- lib/math/int_pow.c| 32 --- 4 files changed, 1 insertion

[PATCH v3] printf: add support for printing symbolic error codes

2019-09-17 Thread Rasmus Villemoes
it grep -w Efoo | wc) to the bottom so that one takes precedence. Acked-by: Uwe Kleine-König Signed-off-by: Rasmus Villemoes --- Andrew: please consider picking this up, even if we're already in the merge window. Quite a few people have said they'd like to see something like this, it

Re: [PATCH v2] printf: add support for printing symbolic error codes

2019-09-16 Thread Rasmus Villemoes
On 16/09/2019 14.23, Uwe Kleine-König wrote: > Hello Rasmus, > > On 9/9/19 10:38 PM, Rasmus Villemoes wrote: >> It has been suggested several times to extend vsnprintf() to be able >> to convert the numeric value of ENOSPC to print "ENOSPC". This is yet >>

Re: [PATCH v2] printf: add support for printing symbolic error codes

2019-09-11 Thread Rasmus Villemoes
On 11/09/2019 11.37, Uwe Kleine-König wrote: > On 9/11/19 8:43 AM, Rasmus Villemoes wrote: >> On 11/09/2019 02.15, Joe Perches wrote: >>> On Tue, 2019-09-10 at 18:26 +0300, Andy Shevchenko wrote: >>>> On Mon, Sep 9, 2019 at 11:39 PM Rasmus Villemoes >>>>

Re: [PATCH v2] printf: add support for printing symbolic error codes

2019-09-10 Thread Rasmus Villemoes
On 11/09/2019 02.15, Joe Perches wrote: > On Tue, 2019-09-10 at 18:26 +0300, Andy Shevchenko wrote: >> On Mon, Sep 9, 2019 at 11:39 PM Rasmus Villemoes >> wrote: >>> +#define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = #err >>> +#define E(

[PATCH v2] printf: add support for printing symbolic error codes

2019-09-09 Thread Rasmus Villemoes
it grep -w Efoo | wc) to the bottom so that one takes precedence. Acked-by: Uwe Kleine-König Signed-off-by: Rasmus Villemoes --- v2: - add #include to errcode.h (0day) - keep 'x' handling in switch() (Andy) - add paragraph to Documentation/core-api/printk-formats.rst - add ack

Re: [PATCH v2] vsprintf: introduce %dE for error constants

2019-08-30 Thread Rasmus Villemoes
On 29/08/2019 19.39, Uwe Kleine-König wrote: > On 8/29/19 11:09 AM, Rasmus Villemoes wrote: >> still prefer making it %pE, both because it's easier to convert integers >> to ERR_PTRs than having to worry about the type of PTR_ERR() being long >> and not int, and beca

Re: [PATCH v2] vsprintf: introduce %dE for error constants

2019-08-29 Thread Rasmus Villemoes
On 29/08/2019 10.27, Juergen Gross wrote: > On 29.08.19 10:12, Petr Mladek wrote: >> On Wed 2019-08-28 21:18:37, Uwe Kleine-König  wrote: >>> >>> I'd like to postpone the discussion about "how" until we agreed about >>> the "if at all". >> >> It seems that all people like this feature. > > Hmm, wh

Re: [PATCH v2] vsprintf: introduce %dE for error constants

2019-08-29 Thread Rasmus Villemoes
On 29/08/2019 10.12, Petr Mladek wrote: > On Wed 2019-08-28 21:18:37, Uwe Kleine-König wrote: > BTW: I though more about generating or cut&pasting the arrary. > I can't find any reasonable way how to generate it. Something like this seems to work, though it probably needs some massage to be acce

Re: [PATCH v2] vsprintf: introduce %dE for error constants

2019-08-28 Thread Rasmus Villemoes
On 28/08/2019 14.02, Sergey Senozhatsky wrote: > On (08/28/19 14:54), Jani Nikula wrote: > [..] >>> I personally think that this feature is not worth the code, data, >>> and bikeshedding. >> >> The obvious alternative, I think already mentioned, is to just add >> strerror() or similar as a function

Re: [PATCH v1 1/2] vsprintf: introduce %dE for error constants

2019-08-26 Thread Rasmus Villemoes
On 25/08/2019 01.37, Uwe Kleine-König wrote: > pr_info("probing failed (%dE)\n", ret); > > expands to > > probing failed (EIO) > > if ret holds -EIO (or EIO). This introduces an array of error codes. If > the error code is missing, %dE falls back to %d and so prints the plain > numbe

Re: [PATCH v10 3/3] watchdog: make the device time out at open_deadline when open_timeout is used

2019-06-14 Thread Rasmus Villemoes
On 07/06/2019 20.38, Guenter Roeck wrote: > On Wed, Jun 05, 2019 at 02:06:44PM +0000, Rasmus Villemoes wrote: >> When the watchdog device is not open by userspace, the kernel takes >> care of pinging it. When the open_timeout feature is in use, we should >> ensure that the ha

[PATCH v10 3/3] watchdog: make the device time out at open_deadline when open_timeout is used

2019-06-05 Thread Rasmus Villemoes
r the on-board watchdog by booting with 'init=/bin/sh', timestamping the lines on the serial console, and comparing the timestamp of the 'imx2-wdt 20bc000.wdog: timeout nnn sec' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Sugg

[PATCH v10 2/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2019-06-05 Thread Rasmus Villemoes
, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 8 drivers/wat

[PATCH v10 1/3] watchdog: introduce watchdog.open_timeout commandline parameter

2019-06-05 Thread Rasmus Villemoes
-opening it shortly, the application can emulate the open timeout feature by combining the nowayout feature with an appropriate WDIOC_SETTIMEOUT immediately prior to closing the device. Signed-off-by: Rasmus Villemoes --- .../watchdog/watchdog-parameters.txt | 8 + drivers/watchdog

[PATCH v10 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2019-06-05 Thread Rasmus Villemoes
Make the unit seconds instead of milliseconds. Rasmus Villemoes (3): watchdog: introduce watchdog.open_timeout commandline parameter watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT watchdog: make the device time out at open_deadline when open_timeout is used .../watchdog/wat

Re: [PATCH v9 1/3] watchdog: introduce watchdog.open_timeout commandline parameter

2019-01-29 Thread Rasmus Villemoes
On 29/01/2019 21.35, Rasmus Villemoes wrote: > On 22/01/2019 18.29, Guenter Roeck wrote: >> On Mon, Jan 21, 2019 at 08:45:39PM +0000, Rasmus Villemoes wrote: >>> >>> static void watchdog_ping_work(struct kthread_work *work) >>> @@ -297,7 +317,7 @@ static int

Re: [PATCH v9 1/3] watchdog: introduce watchdog.open_timeout commandline parameter

2019-01-29 Thread Rasmus Villemoes
On 22/01/2019 18.29, Guenter Roeck wrote: > On Mon, Jan 21, 2019 at 08:45:39PM +0000, Rasmus Villemoes wrote: >> The watchdog framework takes care of feeding a hardware watchdog until >> userspace opens /dev/watchdogN. If that never happens for some reason >> (buggy init

[PATCH v9 1/3] watchdog: introduce watchdog.open_timeout commandline parameter

2019-01-21 Thread Rasmus Villemoes
/watchdog; conversely, one can of course also have the current behaviour of allowing indefinite time until the first open, and then set that module parameter. Signed-off-by: Rasmus Villemoes --- .../watchdog/watchdog-parameters.txt | 8 + drivers/watchdog/watchdog_dev.c | 30

[PATCH v9 2/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2019-01-21 Thread Rasmus Villemoes
, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 8 drivers/wat

[PATCH v9 3/3] watchdog: make the device time out at open_deadline when open_timeout is used

2019-01-21 Thread Rasmus Villemoes
c' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Suggested-by: Guenter Roeck Signed-off-by: Rasmus Villemoes --- drivers/watchdog/watchdog_dev.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/watchdo

[PATCH v9 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2019-01-21 Thread Rasmus Villemoes
y easy by the ktime_t conversion. v7 submission at <https://lore.kernel.org/lkml/1511865350-20665-1-git-send-email-rasmus.villem...@prevas.dk/> Rasmus Villemoes (3): watchdog: introduce watchdog.open_timeout commandline parameter watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT watchdog: m

[PATCH v8 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2019-01-16 Thread Rasmus Villemoes
.kernel.org/lkml/1511865350-20665-1-git-send-email-rasmus.villem...@prevas.dk/> Rasmus Villemoes (3): watchdog: introduce watchdog.open_timeout commandline parameter watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT watchdog: make the device time out at open_deadline when open_

[PATCH v8 3/3] watchdog: make the device time out at open_deadline when open_timeout is used

2019-01-16 Thread Rasmus Villemoes
2-wdt 20bc000.wdog: timeout nnn sec' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Suggested-by: Guenter Roeck Signed-off-by: Rasmus Villemoes --- drivers/watchdog/watchdog_dev.c | 11 ++- 1 file changed, 6 insertions(+), 5 dele

[PATCH v8 2/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2019-01-16 Thread Rasmus Villemoes
, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 3 ++- drivers/wat

[PATCH v8 1/3] watchdog: introduce watchdog.open_timeout commandline parameter

2019-01-16 Thread Rasmus Villemoes
initially, requiring a somewhat liberal open_timeout, but when (for whatever reason) the application might then want to re-exec itself, it can set a much smaller threshold. Signed-off-by: Rasmus Villemoes --- .../watchdog/watchdog-parameters.txt | 8 + drivers/watchdog/watchdog_dev.c

[RFC 1/5] seq_file: introduce seq_open_data helper

2018-03-01 Thread Rasmus Villemoes
There are quite a few callers of seq_open that could be simplified by setting the ->private member via the seq_open call instead of fetching file->private_data afterwards. Signed-off-by: Rasmus Villemoes --- I've just included a few examples of possible users of this helper, there ar

Re: [PATCH 1/2] watchdog: introduce watchdog.open_timeout commandline parameter

2017-11-29 Thread Rasmus Villemoes
On 2017-11-28 23:14, Guenter Roeck wrote: > On Tue, Nov 28, 2017 at 11:35:49AM +0100, Rasmus Villemoes wrote: >> >> The unit is milliseconds rather than seconds because that covers more >> use cases. For example, one can effectively disable the kernel handling >> by se

[PATCH 2/2] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2017-11-28 Thread Rasmus Villemoes
, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes Reviewed-by: Esben Haabendal --- Documentation/watchdog/watchdog-parameter

[PATCH v7 0/2] watchdog: allow setting deadline for opening /dev/watchdogN

2017-11-28 Thread Rasmus Villemoes
ernel.org/patch/9754095/ [2] https://patchwork.kernel.org/patch/9754093/ Rasmus Villemoes (2): watchdog: introduce watchdog.open_timeout commandline parameter watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT Documentation/watchdog/watchdog-parameters.txt | 9 + drivers/w

[PATCH 1/2] watchdog: introduce watchdog.open_timeout commandline parameter

2017-11-28 Thread Rasmus Villemoes
, 4500 ms of kernel handling, and then up to 250 ms from the last ping until userspace takes over). Signed-off-by: Rasmus Villemoes Reviewed-by: Esben Haabendal --- Documentation/watchdog/watchdog-parameters.txt | 8 drivers/watchdog/watchdog_dev.c| 27

Re: [PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2017-06-06 Thread Rasmus Villemoes
On 2017-05-30 10:56, Rasmus Villemoes wrote: > > v6 tweaks the wording in watchdog-parameters.txt to avoid having to > update it if and when the watchdog core grows new parameters. It also > adds a little more rationale to the commit messages for 2/3 and 3/3, > and adds Reviewed-b

[PATCH v6 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2017-05-30 Thread Rasmus Villemoes
, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 3 ++- drivers/wat

[PATCH v6 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2017-05-30 Thread Rasmus Villemoes
, and the ability to set the default value for the watchdog.open_timeout command line parameter via Kconfig is split into a separate patch. Compared to v2/v3, this drops the ability to set the open_timeout via a device property; I'll leave implementing that to those who actually need it. R

[PATCH v6 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-05-30 Thread Rasmus Villemoes
more than 5 seconds after the bootloader hands control to the kernel (250 ms until the driver gets registered and kernel handling starts, 4500 ms of kernel handling, and then up to 250 ms from the last ping until userspace takes over). Signed-off-by: Rasmus Villemoes --- Documentation/watchdog

Re: [PATCH v5 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-05-30 Thread Rasmus Villemoes
On 2017-05-25 02:56, Guenter Roeck wrote: > On 05/22/2017 07:06 AM, Rasmus Villemoes wrote: >> diff --git a/Documentation/watchdog/watchdog-parameters.txt >> b/Documentation/watchdog/watchdog-parameters.txt >> index 914518a..4801ec6 100644 >> --- a/Documentation/watch

Re: [PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2017-05-23 Thread Rasmus Villemoes
On 2017-05-22 20:07, Alan Cox wrote: > On Mon, 22 May 2017 16:06:36 +0200 > Rasmus Villemoes wrote: > >> If a watchdog driver tells the framework that the device is running, >> the framework takes care of feeding the watchdog until userspace opens >> the device. I

[PATCH v5 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-05-22 Thread Rasmus Villemoes
, ...). The open timeout is also used as a maximum time for an application to re-open /dev/watchdogN after closing it. A value of 0 (the default) means infinite timeout, preserving the current behaviour. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 9

[PATCH v5 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2017-05-22 Thread Rasmus Villemoes
at to those who actually need it. Rasmus Villemoes (3): watchdog: introduce watchdog_worker_should_ping helper watchdog: introduce watchdog.open_timeout commandline parameter watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT Documentation/watchdog/watchdog-parameters.txt | 10 +++ dr

[PATCH v5 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2017-05-22 Thread Rasmus Villemoes
This allows setting a default value for the watchdog.open_timeout commandline parameter via Kconfig. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 9 + drivers/watchdog/Kconfig | 9 + drivers/watchdog/watchdog_dev.c

Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-30 Thread Rasmus Villemoes
On 2017-01-13 10:11, Rasmus Villemoes wrote: > On 2017-01-11 12:02, Guenter Roeck wrote: >> This will require input from others on the semantics. > > I agree, it would be nice to have others chime in on whether they'd even > find this useful, and what semantics they

Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-13 Thread Rasmus Villemoes
On 2017-01-11 12:02, Guenter Roeck wrote: > On 01/11/2017 12:11 AM, Rasmus Villemoes wrote: >> On 2017-01-10 19:08, Guenter Roeck wrote: >>> On Mon, Jan 09, 2017 at 04:02:32PM +0100, Rasmus Villemoes wrote: >>>> >>>> +static unsigned open_timeout; &

Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-11 Thread Rasmus Villemoes
On 2017-01-10 19:08, Guenter Roeck wrote: On Mon, Jan 09, 2017 at 04:02:32PM +0100, Rasmus Villemoes wrote: +static unsigned open_timeout; +module_param(open_timeout, uint, 0644); + +static bool watchdog_past_open_deadline(struct watchdog_core_data *data) +{ + if (!open_timeout

[PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-09 Thread Rasmus Villemoes
, ...). The open timeout is also used as a maximum time for an application to re-open /dev/watchdogN after closing it. A value of 0 (the default) means infinite timeout, preserving the current behaviour. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 9

[PATCH v4 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2017-01-09 Thread Rasmus Villemoes
This allows setting a default value for the watchdog.open_timeout commandline parameter via Kconfig. Signed-off-by: Rasmus Villemoes --- Documentation/watchdog/watchdog-parameters.txt | 9 + drivers/watchdog/Kconfig | 9 + drivers/watchdog/watchdog_dev.c

[PATCH v4 0/3] watchdog: allow setting deadline for opening /dev/watchdogN

2017-01-09 Thread Rasmus Villemoes
watchdog.open_timeout command line parameter via Kconfig is split into a separate patch. Compared to v2/v3, this drops the ability to set the open_timeout via a device property; I'll leave implementing that to those who actually need it. Rasmus Villemoes (3): watchdog: intr

Re: [PATCH] printk: introduce kptr_restrict level 3

2016-10-05 Thread Rasmus Villemoes
On Wed, Oct 05 2016, william.c.robe...@intel.com wrote: > From: William Roberts > > Some out-of-tree modules do not use %pK and just use %p, as it's > the common C paradigm for printing pointers. Because of this, > kptr_restrict has no affect on the output and thus, no way to > contain the kernel