Message ID | 1589186626-17243-1-git-send-email-wangxiongfeng2@huawei.com (mailing list archive) |
---|---|
State | Rejected, archived |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1jY457-003V2g-T3; Mon, 11 May 2020 08:46:38 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729180AbgEKIt6 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 11 May 2020 04:49:58 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36900 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728562AbgEKIt5 (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 11 May 2020 04:49:57 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id BB63AB93F3FEEFD6C057; Mon, 11 May 2020 16:49:53 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 11 May 2020 16:49:45 +0800 From: Xiongfeng Wang <wangxiongfeng2@huawei.com> To: <ezequiel@vanguardiasur.com.ar>, <mchehab@kernel.org> CC: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <wangxiongfeng2@huawei.com> Subject: [PATCH] [media] tw686x: add a missing newline when printing parameter 'dma_mode' Date: Mon, 11 May 2020 16:43:46 +0800 Message-ID: <1589186626-17243-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
[media] tw686x: add a missing newline when printing parameter 'dma_mode'
|
|
Commit Message
Xiongfeng Wang
May 11, 2020, 8:43 a.m. UTC
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>
---
drivers/media/pci/tw686x/tw686x-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
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 >
Hi Ezequiel, Thanks for your reply ! On 2020/5/14 3:32, Ezequiel Garcia wrote: > 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? It's not an issue for me. It's just that if the result is in a separate line, it reads more easily. I am also planning to fix the parameters below '/sys/module/acpi/parameters'. Thanks, Xiongfeng > > 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 >> >
On Wed, 13 May 2020 at 22:32, Xiongfeng Wang <wangxiongfeng2@huawei.com> wrote: > > Hi Ezequiel, > > Thanks for your reply ! > > On 2020/5/14 3:32, Ezequiel Garcia wrote: > > 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? > > It's not an issue for me. It's just that if the result is in a separate line, it > reads more easily. I am also planning to fix the parameters below > '/sys/module/acpi/parameters'. > If you don't have a real reason behind this, such as a documented expectation or something breaking due to this, but just readability, then I don't think it's worth going through _all_ the module parameters fixing this. While I appreciate your effort, this cleanup exceeds the level of nitpicking I care for. Thanks! Ezequiel > Thanks, > Xiongfeng > > > > > 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 > >> > > >
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)