* [PATCH v2] staging: android: ion: use macro DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
@ 2020-04-09 17:13 R Veera Kumar
2020-04-10 7:32 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: R Veera Kumar @ 2020-04-09 17:13 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: R Veera Kumar, Laura Abbott, Sumit Semwal,
Arve Hjønnevåg, Todd Kjos, Martijn Coenen,
Joel Fernandes, Christian Brauner, devel, dri-devel,
linaro-mm-sig, linux-kernel
It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
operation rather than DEFINE_SIMPLE_ATTRIBUTE.
Found using coccinelle.
Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
Changes in v2:
- Give correct explanation for patch
- Adjust git commit tag and msg accordingly
---
drivers/staging/android/ion/ion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 38b51eace4f9..dbe4018a6f83 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -554,8 +554,8 @@ static int debug_shrink_get(void *data, u64 *val)
return 0;
}
-DEFINE_SIMPLE_ATTRIBUTE(debug_shrink_fops, debug_shrink_get,
- debug_shrink_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(debug_shrink_fops, debug_shrink_get,
+ debug_shrink_set, "%llu\n");
void ion_device_add_heap(struct ion_heap *heap)
{
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] staging: android: ion: use macro DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
2020-04-09 17:13 [PATCH v2] staging: android: ion: use macro DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops R Veera Kumar
@ 2020-04-10 7:32 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2020-04-10 7:32 UTC (permalink / raw)
To: R Veera Kumar
Cc: devel, Todd Kjos, linux-kernel, dri-devel, linaro-mm-sig,
Arve Hjønnevåg, Joel Fernandes, Laura Abbott,
Martijn Coenen, Sumit Semwal, Christian Brauner
On Thu, Apr 09, 2020 at 10:43:18PM +0530, R Veera Kumar wrote:
> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
> operation rather than DEFINE_SIMPLE_ATTRIBUTE.
No, it is not "more clear", the two defines are not the same thing, they
do different things. If they were just identical, we would not need
them both :)
So please be very explicit as to _why_ you want to change this, and show
how you have verified that changing this is the correct thing to do, and
how you tested. Because the user-visible change can be quite different
with this type of kernel change.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-10 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 17:13 [PATCH v2] staging: android: ion: use macro DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops R Veera Kumar
2020-04-10 7:32 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).