linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table
@ 2013-10-22 22:29 Joe Perches
  2013-10-22 22:30 ` [PATCH 19/24] fs: " Joe Perches
  2013-10-22 23:53 ` [PATCH 00/24] treewide: " David Daney
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Perches @ 2013-10-22 22:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, linux-ia64, linux-s390, linux-rdma, linux-raid,
	linux-scsi, codalist, linux-fsdevel, linux-cachefs, linux-nfs,
	linux-ntfs-dev, ocfs2-devel, keyrings, linux-mm,
	linux-security-module

Joe Perches (24):
  arm: Convert use of typedef ctl_table to struct ctl_table
  ia64: Convert use of typedef ctl_table to struct ctl_table
  s390: Convert use of typedef ctl_table to struct ctl_table
  tile: Convert use of typedef ctl_table to struct ctl_table
  cdrom: Convert use of typedef ctl_table to struct ctl_table
  random: Convert use of typedef ctl_table to struct ctl_table
  infiniband: Convert use of typedef ctl_table to struct ctl_table
  md: Convert use of typedef ctl_table to struct ctl_table
  parport: Convert use of typedef ctl_table to struct ctl_table
  scsi: Convert use of typedef ctl_table to struct ctl_table
  coda: Convert use of typedef ctl_table to struct ctl_table
  fscache: Convert use of typedef ctl_table to struct ctl_table
  lockd: Convert use of typedef ctl_table to struct ctl_table
  nfs: Convert use of typedef ctl_table to struct ctl_table
  inotify: Convert use of typedef ctl_table to struct ctl_table
  ntfs: Convert use of typedef ctl_table to struct ctl_table
  ocfs2: Convert use of typedef ctl_table to struct ctl_table
  proc: Convert use of typedef ctl_table to struct ctl_table
  fs: Convert use of typedef ctl_table to struct ctl_table
  key: Convert use of typedef ctl_table to struct ctl_table
  ipc: Convert use of typedef ctl_table to struct ctl_table
  kernel: Convert use of typedef ctl_table to struct ctl_table
  mm: Convert use of typedef ctl_table to struct ctl_table
  security:keys: Convert use of typedef ctl_table to struct ctl_table

 arch/arm/kernel/isa.c              |  6 ++---
 arch/ia64/kernel/crash.c           |  4 +--
 arch/ia64/kernel/perfmon.c         |  6 ++---
 arch/s390/appldata/appldata_base.c | 10 ++++----
 arch/s390/kernel/debug.c           |  2 +-
 arch/s390/mm/cmm.c                 |  8 +++---
 arch/tile/kernel/proc.c            |  4 +--
 drivers/cdrom/cdrom.c              | 10 ++++----
 drivers/char/random.c              |  4 +--
 drivers/infiniband/core/ucma.c     |  2 +-
 drivers/md/md.c                    |  6 ++---
 drivers/parport/procfs.c           | 52 ++++++++++++++++++--------------------
 drivers/scsi/scsi_sysctl.c         |  6 ++---
 fs/coda/sysctl.c                   |  4 +--
 fs/dcache.c                        |  2 +-
 fs/drop_caches.c                   |  2 +-
 fs/eventpoll.c                     |  2 +-
 fs/file_table.c                    |  4 +--
 fs/fscache/main.c                  |  4 +--
 fs/inode.c                         |  2 +-
 fs/lockd/svc.c                     |  6 ++---
 fs/nfs/nfs4sysctl.c                |  6 ++---
 fs/nfs/sysctl.c                    |  6 ++---
 fs/notify/inotify/inotify_user.c   |  2 +-
 fs/ntfs/sysctl.c                   |  4 +--
 fs/ocfs2/stackglue.c               |  8 +++---
 fs/proc/proc_sysctl.c              |  2 +-
 include/linux/key.h                |  2 +-
 ipc/ipc_sysctl.c                   | 14 +++++-----
 ipc/mq_sysctl.c                    | 10 ++++----
 kernel/sysctl.c                    |  2 +-
 kernel/utsname_sysctl.c            |  6 ++---
 mm/page-writeback.c                |  2 +-
 mm/page_alloc.c                    | 12 ++++-----
 security/keys/sysctl.c             |  2 +-
 35 files changed, 111 insertions(+), 113 deletions(-)

-- 
1.8.1.2.459.gbcd45b4.dirty

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 19/24] fs: Convert use of typedef ctl_table to struct ctl_table
  2013-10-22 22:29 [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table Joe Perches
@ 2013-10-22 22:30 ` Joe Perches
  2013-10-22 23:53 ` [PATCH 00/24] treewide: " David Daney
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2013-10-22 22:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Viro, linux-fsdevel

This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/dcache.c      | 2 +-
 fs/drop_caches.c | 2 +-
 fs/eventpoll.c   | 2 +-
 fs/file_table.c  | 4 ++--
 fs/inode.c       | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 59c06e5..7c2f779 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -181,7 +181,7 @@ static long get_nr_dentry_unused(void)
 	return sum < 0 ? 0 : sum;
 }
 
-int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
+int proc_nr_dentry(struct ctl_table *table, int write, void __user *buffer,
 		   size_t *lenp, loff_t *ppos)
 {
 	dentry_stat.nr_dentry = get_nr_dentry();
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index 9fd702f..d9fba09 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -50,7 +50,7 @@ static void drop_slab(void)
 	} while (nr_objects > 10);
 }
 
-int drop_caches_sysctl_handler(ctl_table *table, int write,
+int drop_caches_sysctl_handler(struct ctl_table *table, int write,
 	void __user *buffer, size_t *length, loff_t *ppos)
 {
 	int ret;
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 473e09d..46a221c 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -289,7 +289,7 @@ static LIST_HEAD(tfile_check_list);
 static long zero;
 static long long_max = LONG_MAX;
 
-ctl_table epoll_table[] = {
+struct ctl_table epoll_table[] = {
 	{
 		.procname	= "max_user_watches",
 		.data		= &max_user_watches,
diff --git a/fs/file_table.c b/fs/file_table.c
index abdd15a..bc477d6 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -79,14 +79,14 @@ EXPORT_SYMBOL_GPL(get_max_files);
  * Handle nr_files sysctl
  */
 #if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
-int proc_nr_files(ctl_table *table, int write,
+int proc_nr_files(struct ctl_table *table, int write,
                      void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	files_stat.nr_files = get_nr_files();
 	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 }
 #else
-int proc_nr_files(ctl_table *table, int write,
+int proc_nr_files(struct ctl_table *table, int write,
                      void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	return -ENOSYS;
diff --git a/fs/inode.c b/fs/inode.c
index b33ba8e..00653a4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -105,7 +105,7 @@ long get_nr_dirty_inodes(void)
  * Handle nr_inode sysctl
  */
 #ifdef CONFIG_SYSCTL
-int proc_nr_inodes(ctl_table *table, int write,
+int proc_nr_inodes(struct ctl_table *table, int write,
 		   void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	inodes_stat.nr_inodes = get_nr_inodes();
-- 
1.8.1.2.459.gbcd45b4.dirty

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

* Re: [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table
  2013-10-22 22:29 [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table Joe Perches
  2013-10-22 22:30 ` [PATCH 19/24] fs: " Joe Perches
@ 2013-10-22 23:53 ` David Daney
  2013-10-22 23:58   ` Joe Perches
  1 sibling, 1 reply; 4+ messages in thread
From: David Daney @ 2013-10-22 23:53 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, linux-arm-kernel, linux-ia64, linux-s390,
	linux-rdma, linux-raid, linux-scsi, codalist, linux-fsdevel,
	linux-cachefs, linux-nfs, linux-ntfs-dev, ocfs2-devel, keyrings,
	linux-mm, linux-security-module

On 10/22/2013 03:29 PM, Joe Perches wrote:
> Joe Perches (24):
>    arm: Convert use of typedef ctl_table to struct ctl_table
>    ia64: Convert use of typedef ctl_table to struct ctl_table
>    s390: Convert use of typedef ctl_table to struct ctl_table
>    tile: Convert use of typedef ctl_table to struct ctl_table
>    cdrom: Convert use of typedef ctl_table to struct ctl_table
>    random: Convert use of typedef ctl_table to struct ctl_table
>    infiniband: Convert use of typedef ctl_table to struct ctl_table
>    md: Convert use of typedef ctl_table to struct ctl_table
>    parport: Convert use of typedef ctl_table to struct ctl_table
>    scsi: Convert use of typedef ctl_table to struct ctl_table
>    coda: Convert use of typedef ctl_table to struct ctl_table
>    fscache: Convert use of typedef ctl_table to struct ctl_table
>    lockd: Convert use of typedef ctl_table to struct ctl_table
>    nfs: Convert use of typedef ctl_table to struct ctl_table
>    inotify: Convert use of typedef ctl_table to struct ctl_table
>    ntfs: Convert use of typedef ctl_table to struct ctl_table
>    ocfs2: Convert use of typedef ctl_table to struct ctl_table
>    proc: Convert use of typedef ctl_table to struct ctl_table
>    fs: Convert use of typedef ctl_table to struct ctl_table
>    key: Convert use of typedef ctl_table to struct ctl_table
>    ipc: Convert use of typedef ctl_table to struct ctl_table
>    kernel: Convert use of typedef ctl_table to struct ctl_table
>    mm: Convert use of typedef ctl_table to struct ctl_table
>    security:keys: Convert use of typedef ctl_table to struct ctl_table

After all this work, why not go ahead and remove the typedef?  That way 
people won't add more users of this abomination.

David Daney



>
>   arch/arm/kernel/isa.c              |  6 ++---
>   arch/ia64/kernel/crash.c           |  4 +--
>   arch/ia64/kernel/perfmon.c         |  6 ++---
>   arch/s390/appldata/appldata_base.c | 10 ++++----
>   arch/s390/kernel/debug.c           |  2 +-
>   arch/s390/mm/cmm.c                 |  8 +++---
>   arch/tile/kernel/proc.c            |  4 +--
>   drivers/cdrom/cdrom.c              | 10 ++++----
>   drivers/char/random.c              |  4 +--
>   drivers/infiniband/core/ucma.c     |  2 +-
>   drivers/md/md.c                    |  6 ++---
>   drivers/parport/procfs.c           | 52 ++++++++++++++++++--------------------
>   drivers/scsi/scsi_sysctl.c         |  6 ++---
>   fs/coda/sysctl.c                   |  4 +--
>   fs/dcache.c                        |  2 +-
>   fs/drop_caches.c                   |  2 +-
>   fs/eventpoll.c                     |  2 +-
>   fs/file_table.c                    |  4 +--
>   fs/fscache/main.c                  |  4 +--
>   fs/inode.c                         |  2 +-
>   fs/lockd/svc.c                     |  6 ++---
>   fs/nfs/nfs4sysctl.c                |  6 ++---
>   fs/nfs/sysctl.c                    |  6 ++---
>   fs/notify/inotify/inotify_user.c   |  2 +-
>   fs/ntfs/sysctl.c                   |  4 +--
>   fs/ocfs2/stackglue.c               |  8 +++---
>   fs/proc/proc_sysctl.c              |  2 +-
>   include/linux/key.h                |  2 +-
>   ipc/ipc_sysctl.c                   | 14 +++++-----
>   ipc/mq_sysctl.c                    | 10 ++++----
>   kernel/sysctl.c                    |  2 +-
>   kernel/utsname_sysctl.c            |  6 ++---
>   mm/page-writeback.c                |  2 +-
>   mm/page_alloc.c                    | 12 ++++-----
>   security/keys/sysctl.c             |  2 +-
>   35 files changed, 111 insertions(+), 113 deletions(-)
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table
  2013-10-22 23:53 ` [PATCH 00/24] treewide: " David Daney
@ 2013-10-22 23:58   ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2013-10-22 23:58 UTC (permalink / raw)
  To: David Daney
  Cc: linux-kernel, linux-arm-kernel, linux-ia64, linux-s390,
	linux-rdma, linux-raid, linux-scsi, codalist, linux-fsdevel,
	linux-cachefs, linux-nfs, linux-ntfs-dev, ocfs2-devel, keyrings,
	linux-mm, linux-security-module

On Tue, 2013-10-22 at 16:53 -0700, David Daney wrote:
> After all this work, why not go ahead and remove the typedef?  That way 
> people won't add more users of this abomination.

Hi David.

The typedef can't be removed until all the uses are gone.

I've sent this before as a single large patch as well as
individual patches.

treewide:	https://lkml.org/lkml/2013/7/22/600
RemoveTypedef:	https://lkml.org/lkml/2013/7/22/603


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

end of thread, other threads:[~2013-10-22 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 22:29 [PATCH 00/24] treewide: Convert use of typedef ctl_table to struct ctl_table Joe Perches
2013-10-22 22:30 ` [PATCH 19/24] fs: " Joe Perches
2013-10-22 23:53 ` [PATCH 00/24] treewide: " David Daney
2013-10-22 23:58   ` Joe Perches

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).