All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-22 14:05 ` Yangtao Li
  0 siblings, 0 replies; 6+ messages in thread
From: Yangtao Li @ 2018-11-22 14:05 UTC (permalink / raw)
  To: linux-arm-kernel

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/firmware/ti_sci.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 69ed1464175c..3fbbb61012c4 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -146,25 +146,8 @@ static int ti_sci_debug_show(struct seq_file *s, void *unused)
 	return 0;
 }
 
-/**
- * ti_sci_debug_open() - debug file open
- * @inode:	inode pointer
- * @file:	file pointer
- *
- * Return: result of single_open
- */
-static int ti_sci_debug_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, ti_sci_debug_show, inode->i_private);
-}
-
-/* log file operations */
-static const struct file_operations ti_sci_debug_fops = {
-	.open = ti_sci_debug_open,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
+/* Provide the log file operations interface*/
+DEFINE_SHOW_ATTRIBUTE(ti_sci_debug);
 
 /**
  * ti_sci_debugfs_create() - Create log debug file
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-22 14:05 ` Yangtao Li
  0 siblings, 0 replies; 6+ messages in thread
From: Yangtao Li @ 2018-11-22 14:05 UTC (permalink / raw)
  To: nm, t-kristo, ssantosh; +Cc: linux-arm-kernel, linux-kernel, Yangtao Li

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/firmware/ti_sci.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 69ed1464175c..3fbbb61012c4 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -146,25 +146,8 @@ static int ti_sci_debug_show(struct seq_file *s, void *unused)
 	return 0;
 }
 
-/**
- * ti_sci_debug_open() - debug file open
- * @inode:	inode pointer
- * @file:	file pointer
- *
- * Return: result of single_open
- */
-static int ti_sci_debug_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, ti_sci_debug_show, inode->i_private);
-}
-
-/* log file operations */
-static const struct file_operations ti_sci_debug_fops = {
-	.open = ti_sci_debug_open,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
+/* Provide the log file operations interface*/
+DEFINE_SHOW_ATTRIBUTE(ti_sci_debug);
 
 /**
  * ti_sci_debugfs_create() - Create log debug file
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
  2018-11-22 14:05 ` Yangtao Li
@ 2018-12-08 16:04   ` Nishanth Menon
  -1 siblings, 0 replies; 6+ messages in thread
From: Nishanth Menon @ 2018-12-08 16:04 UTC (permalink / raw)
  To: Yangtao Li; +Cc: t-kristo, linux-kernel, linux-arm-kernel, ssantosh

On 09:05-20181122, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Thanks for the same and sorry for responding so late.

[...]

Santosh,
could you pick this up? maybe for next rev or so?

Reviewed-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-12-08 16:04   ` Nishanth Menon
  0 siblings, 0 replies; 6+ messages in thread
From: Nishanth Menon @ 2018-12-08 16:04 UTC (permalink / raw)
  To: Yangtao Li; +Cc: t-kristo, ssantosh, linux-arm-kernel, linux-kernel

On 09:05-20181122, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Thanks for the same and sorry for responding so late.

[...]

Santosh,
could you pick this up? maybe for next rev or so?

Reviewed-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
  2018-12-08 16:04   ` Nishanth Menon
@ 2018-12-09  4:26     ` Santosh Shilimkar
  -1 siblings, 0 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2018-12-09  4:26 UTC (permalink / raw)
  To: Nishanth Menon, Yangtao Li
  Cc: t-kristo, linux-kernel, linux-arm-kernel, ssantosh

On 12/8/2018 8:04 AM, Nishanth Menon wrote:
> On 09:05-20181122, Yangtao Li wrote:
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> 
> Thanks for the same and sorry for responding so late.
> 
> [...]
> 
> Santosh,
> could you pick this up? maybe for next rev or so?
> 
> Reviewed-by: Nishanth Menon <nm@ti.com>
> 
Sure !!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-12-09  4:26     ` Santosh Shilimkar
  0 siblings, 0 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2018-12-09  4:26 UTC (permalink / raw)
  To: Nishanth Menon, Yangtao Li
  Cc: t-kristo, ssantosh, linux-arm-kernel, linux-kernel

On 12/8/2018 8:04 AM, Nishanth Menon wrote:
> On 09:05-20181122, Yangtao Li wrote:
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> 
> Thanks for the same and sorry for responding so late.
> 
> [...]
> 
> Santosh,
> could you pick this up? maybe for next rev or so?
> 
> Reviewed-by: Nishanth Menon <nm@ti.com>
> 
Sure !!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-09  4:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 14:05 [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-11-22 14:05 ` Yangtao Li
2018-12-08 16:04 ` Nishanth Menon
2018-12-08 16:04   ` Nishanth Menon
2018-12-09  4:26   ` Santosh Shilimkar
2018-12-09  4:26     ` Santosh Shilimkar

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.