* [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops()
[not found] <1478193129-23476-1-git-send-email-jakub.kicinski@netronome.com>
@ 2016-11-03 17:12 ` Jakub Kicinski
2016-11-10 14:25 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2016-11-03 17:12 UTC (permalink / raw)
To: netdev
Cc: Jakub Kicinski, Greg Kroah-Hartman, Nicolai Stange,
Christian Lamparter, LKML
seq_file users can only access const version of file pointer,
because the ->file member of struct seq_operations is marked
as such. Make parameter to debugfs_real_fops() const.
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Nicolai Stange <nicstange@gmail.com>
CC: Christian Lamparter <chunkeey@gmail.com>
CC: LKML <linux-kernel@vger.kernel.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
include/linux/debugfs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 4d3f0d1aec73..bf1907d96097 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -52,7 +52,8 @@ struct debugfs_regset32 {
* Must only be called under the protection established by
* debugfs_use_file_start().
*/
-static inline const struct file_operations *debugfs_real_fops(struct file *filp)
+static inline const struct file_operations *
+debugfs_real_fops(const struct file *filp)
__must_hold(&debugfs_srcu)
{
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops()
2016-11-03 17:12 ` [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops() Jakub Kicinski
@ 2016-11-10 14:25 ` Greg Kroah-Hartman
2016-11-10 15:42 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2016-11-10 14:25 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, Nicolai Stange, Christian Lamparter, LKML
On Thu, Nov 03, 2016 at 05:12:06PM +0000, Jakub Kicinski wrote:
> seq_file users can only access const version of file pointer,
> because the ->file member of struct seq_operations is marked
> as such. Make parameter to debugfs_real_fops() const.
>
> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CC: Nicolai Stange <nicstange@gmail.com>
> CC: Christian Lamparter <chunkeey@gmail.com>
> CC: LKML <linux-kernel@vger.kernel.org>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
> include/linux/debugfs.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
> index 4d3f0d1aec73..bf1907d96097 100644
> --- a/include/linux/debugfs.h
> +++ b/include/linux/debugfs.h
> @@ -52,7 +52,8 @@ struct debugfs_regset32 {
> * Must only be called under the protection established by
> * debugfs_use_file_start().
> */
> -static inline const struct file_operations *debugfs_real_fops(struct file *filp)
> +static inline const struct file_operations *
> +debugfs_real_fops(const struct file *filp)
Ick. Tell me that looks better :(
Please just don't wrap things like that, just make it go longer than 80
columns, I can handle the complaints...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops()
2016-11-10 14:25 ` Greg Kroah-Hartman
@ 2016-11-10 15:42 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2016-11-10 15:42 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: netdev, Nicolai Stange, Christian Lamparter, LKML
On Thu, 10 Nov 2016 15:25:59 +0100, Greg Kroah-Hartman wrote:
> On Thu, Nov 03, 2016 at 05:12:06PM +0000, Jakub Kicinski wrote:
> > seq_file users can only access const version of file pointer,
> > because the ->file member of struct seq_operations is marked
> > as such. Make parameter to debugfs_real_fops() const.
> >
> > CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > CC: Nicolai Stange <nicstange@gmail.com>
> > CC: Christian Lamparter <chunkeey@gmail.com>
> > CC: LKML <linux-kernel@vger.kernel.org>
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > ---
> > include/linux/debugfs.h | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
> > index 4d3f0d1aec73..bf1907d96097 100644
> > --- a/include/linux/debugfs.h
> > +++ b/include/linux/debugfs.h
> > @@ -52,7 +52,8 @@ struct debugfs_regset32 {
> > * Must only be called under the protection established by
> > * debugfs_use_file_start().
> > */
> > -static inline const struct file_operations *debugfs_real_fops(struct file *filp)
> > +static inline const struct file_operations *
> > +debugfs_real_fops(const struct file *filp)
>
> Ick. Tell me that looks better :(
>
> Please just don't wrap things like that, just make it go longer than 80
> columns, I can handle the complaints...
Ugh, I should've gone with my gut feeling then. I'll post a fix up
shortly since this is already in Dave's tree.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-10 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1478193129-23476-1-git-send-email-jakub.kicinski@netronome.com>
2016-11-03 17:12 ` [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops() Jakub Kicinski
2016-11-10 14:25 ` Greg Kroah-Hartman
2016-11-10 15:42 ` Jakub Kicinski
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).