lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] [media] tw686x: add a missing newline when printing parameter 'dma_mode'
On Mon, 11 May 2020 at 05:49, Xiongfeng Wang <wangxiongfeng2@huawei.com> wrote:
>
> When I cat module parameter 'dma_mode' by sysfs, it displays as follows.
> It is better to add a newline for easy reading.
>
> [root@hulk-202 ~]# cat /sys/module/tw686x/parameters/dma_mode
> memcpy[root@hulk-202 ~]#
>
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>

I don't mind this change, but I don't think this is standard.
The lack of newline follows what other drivers are doing.

# hexdump -c /sys/module/acpi/parameters/ec_event_clearing
0000000 q u e r y
0000005

Is it really an issue for you?

Thanks,
Ezequiel

> ---
> drivers/media/pci/tw686x/tw686x-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw686x/tw686x-core.c
> index 74ae4f0..bfc61da 100644
> --- a/drivers/media/pci/tw686x/tw686x-core.c
> +++ b/drivers/media/pci/tw686x/tw686x-core.c
> @@ -71,7 +71,7 @@ static const char *dma_mode_name(unsigned int mode)
>
> static int tw686x_dma_mode_get(char *buffer, const struct kernel_param *kp)
> {
> - return sprintf(buffer, "%s", dma_mode_name(dma_mode));
> + return sprintf(buffer, "%s\n", dma_mode_name(dma_mode));
> }
>
> static int tw686x_dma_mode_set(const char *val, const struct kernel_param *kp)
> --
> 1.7.12.4
>

\
 
 \ /
  Last update: 2020-05-13 21:32    [W:0.067 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site