moduleparams: Add hexint type parameter
authorPaul Menzel <pmenzel@molgen.mpg.de>
Fri, 3 Jul 2020 14:29:38 +0000 (16:29 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 28 Jul 2020 11:44:53 +0000 (13:44 +0200)
commit7d8365771ffb0edc336f2cd45e96ef8214a83dca
tree8268106c46c8eb1733b4ecdca6ef65cc094f620f
parent31ed1b5dff46fc5c9347338b7e65973f34e9713f
moduleparams: Add hexint type parameter

For bitmasks printing values in hex is more convenient.

Prefix with `0x` to make it clear, that it’s a hex value, and pad it
out.

Using the helper for `amdgpu.ppfeaturemask`, it will look like below.

Before:

    $ more /sys/module/amdgpu/parameters/ppfeaturemask
    4294950911

After:

    $ more /sys/module/amdgpu/parameters/ppfeaturemask
    0xffffbfff

Cc: linux-kernel@vger.kernel.org
Cc: amd-gfx@lists.freedesktop.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/374726/
include/linux/moduleparam.h
kernel/params.c