Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932923AbcKCRMd (ORCPT ); Thu, 3 Nov 2016 13:12:33 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:32819 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932390AbcKCRMa (ORCPT ); Thu, 3 Nov 2016 13:12:30 -0400 From: Jakub Kicinski To: netdev@vger.kernel.org Cc: Jakub Kicinski , Greg Kroah-Hartman , Nicolai Stange , Christian Lamparter , LKML Subject: [PATCH net-next resend 10/13] debugfs: constify argument to debugfs_real_fops() Date: Thu, 3 Nov 2016 17:12:06 +0000 Message-Id: <1478193129-23476-11-git-send-email-jakub.kicinski@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478193129-23476-1-git-send-email-jakub.kicinski@netronome.com> References: <1478193129-23476-1-git-send-email-jakub.kicinski@netronome.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1025 Lines: 29 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 CC: Nicolai Stange CC: Christian Lamparter CC: LKML Signed-off-by: Jakub Kicinski --- 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