Re: [PATCH 34/40] atm: simplify procfs code

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:51:18AM -0500, Eric W. Biederman wrote: > Christoph Hellwig <h...@lst.de> writes: > > > Use remove_proc_subtree to remove the whole subtree on cleanup, and > > unwind the registration loop into individual calls. Switch to use > > pr

Re: simplify procfs code for seq_file instances V2

2018-05-15 Thread Christoph Hellwig
On Sun, May 06, 2018 at 08:19:49PM +0300, Alexey Dobriyan wrote: > On Wed, Apr 25, 2018 at 05:47:47PM +0200, Christoph Hellwig wrote: > > Changes since V1: > > - open code proc_create_data to avoid setting not fully initialized > >entries live > > - use unsigned i

Re: [PATCH 06/40] proc: introduce proc_create_single{,_data}

2018-05-15 Thread Christoph Hellwig
On Thu, Apr 26, 2018 at 11:45:50AM +1000, Finn Thain wrote: > > > > -/* > > - * /proc/nubus stuff > > - */ > > - > > I don't think that the introduction of proc_create_single{,_data} alters > the value of that comment. That comment and similar comments in the same > file do have a purpose,

Re: [PATCH] ANDROID: binder: remove 32-bit binder interface.

2018-05-14 Thread Christoph Hellwig
On Fri, May 11, 2018 at 09:57:52AM +0200, Martijn Coenen wrote: > On Sat, May 5, 2018 at 2:10 PM, kbuild test robot wrote: > >drivers/android/binder.o: In function `binder_thread_write': > >>> binder.c:(.text+0x6a16): undefined reference to `__get_user_bad' > > Looks like

[PATCH 38/40] ide: remove ide_driver_proc_write

2018-04-25 Thread Christoph Hellwig
The driver proc file hasn't been writeable for a long time, so this is just dead code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ide/ide-proc.c | 46 -- 1 file changed, 46 deletions(-) diff --git a/drivers/ide/ide-proc.c b/drivers/i

[PATCH 39/40] ide: replace ->proc_fops with ->proc_show

2018-04-25 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ide/ide-cd.c | 15 +--- drivers/ide/ide-disk_proc.c | 62 ++-- d

[PATCH 36/40] isdn: replace ->proc_fops with ->proc_show

2018-04-25 Thread Christoph Hellwig
And switch to proc_create_single_data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/isdn/capi/kcapi.c | 3 ++- drivers/isdn/gigaset/capi.c| 16 +--- drivers/isdn/hardware/avm/avmcard.h| 4 ++-- drivers/isdn/hardware/avm/b1.c

[PATCH 33/40] bluetooth: switch to proc_create_seq_data

2018-04-25 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private and private state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/bluetooth/af_bluetooth.c | 40 +--- 1 file changed, 5 insertions(+), 35 deletions(-) diff --

[PATCH 40/40] tty: replace ->proc_fops with ->proc_show

2018-04-25 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/sim/simserial.c| 15 +-- arch/xtensa/platforms/iss/console.

[PATCH 37/40] proc: don't detour through seq->private to get the inode

2018-04-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/array.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index ae2c807fd719..b34796b562ef 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -677,7

[PATCH 35/40] atm: switch to proc_create_seq_private

2018-04-25 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/atm/proc.c | 72 +- 1 file changed, 13 insertions(+), 59 deletions(-) diff --git a/net/atm/proc.c b/net/atm/proc.c index f272b0f59d82..0b0495a41bbe

[PATCH 31/40] netfilter/xt_hashlimit: switch to proc_create_{seq, single}_data

2018-04-25 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/xt_hashlimit.c | 92 +++- 1 file changed, 18 insertions(+), 74 deletions(-) diff --git a/net/

[PATCH 32/40] netfilter/x_tables: switch to proc_create_seq_private

2018-04-25 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 42 ++-- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 344dd0

[PATCH 30/40] neigh: switch to proc_create_seq_data

2018-04-25 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/core/neighbour.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/net/core/neighbour.c b

[PATCH 27/40] rtc/proc: switch to proc_create_single_data

2018-04-25 Thread Christoph Hellwig
And stop trying to get a reference on the submodule, procfs code deals with release after and unloaded module and thus removed proc entry. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/rtc/rtc-proc.c | 33 ++--- 1 file changed, 2 insertions(

[PATCH 15/40] proc: introduce proc_create_net{,_data}

2018-04-25 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

[PATCH 25/40] resource: switch to proc_create_seq_data

2018-04-25 Thread Christoph Hellwig
And use the root resource directly from the proc private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- kernel/resource.c | 43 +-- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c

[PATCH 21/40] afs: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/afs/proc.c | 134 ++-

[PATCH 28/40] bonding: switch to proc_create_seq_data

2018-04-25 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/bonding/bond_procfs.c | 36 ++- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/drivers/ne

[PATCH 22/40] ext4: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ext4/ext4.h| 2 +- fs/ext4/mballoc.

[PATCH 29/40] hostap: switch to proc_create_{seq,single}_data

2018-04-25 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- .../net/wireless/intersil/hostap/hostap_ap.c | 70 ++--- .../net/wireless/intersil/hostap/hostap_hw.c | 17 +-- .../wireless/intersil/hostap/host

[PATCH 23/40] jfs: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/jfs/jfs_debug.c| 43 ++---

[PATCH 24/40] staging/rtl8192u: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Unwind the registration loop into individual calls. Switch to use proc_create_single where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/staging/rtl8192u/r8192U_core.c | 67 ++ 1 file changed, 14 insertions(+), 53 deletions(-) diff

[PATCH 19/40] megaraid: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_single. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/megaraid.c | 140 +++- driver

[PATCH 20/40] sg: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sg.c | 124 +--

[PATCH 18/40] sgi-gru: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/misc/sgi-gru/gruprocfs.c | 81 ++---

[PATCH 09/40] ipv{4,6}/ping: simplify proc file creation

2018-04-25 Thread Christoph Hellwig
Remove the pointless ping_seq_afinfo indirection and make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/ping.h | 11 -- net/ipv4/ping.c| 50 +- net/ipv6/ping.c

[PATCH 17/40] acpi/battery: simplify procfs code

2018-04-25 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> ---

[PATCH 16/40] proc: introduce proc_create_net_single

2018-04-25 Thread Christoph Hellwig
Variant of proc_create_data that directly take a seq_file show callback and deals with network namespaces in ->open and ->release. All callers of proc_create + single_open_net converted over, and single_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

[PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-04-25 Thread Christoph Hellwig
The shole seq_file sequence already operates under a single RCU lock pair, so move the pid namespace lookup into it, and stop grabbing a reference and remove all kinds of boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/ipv6/ip6_flowlabel.

[PATCH 14/40] net: move seq_file_single_net to

2018-04-25 Thread Christoph Hellwig
This helper deals with single_{open,release}_net internals and thus belongs here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/seq_file_net.h | 13 + include/net/ip_vs.h | 12 2 files changed, 13 insertions(+), 12 deletions(-) diff

[PATCH 13/40] netfilter/x_tables: simplify ѕeq_file code

2018-04-25 Thread Christoph Hellwig
Just use the address family from the proc private data instead of copying it into per-file data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 39 +++ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/net/net

[PATCH 12/40] net/kcm: simplify proc registration

2018-04-25 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/kcm/kcmproc.c | 71 --- 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/net/kcm/kcmproc.c b/n

[PATCH 08/40] ipv{4,6}/tcp: simplify procfs registration

2018-04-25 Thread Christoph Hellwig
Avoid most of the afinfo indirections and just call the proc helpers directly. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/tcp.h | 11 ++ net/ipv4/tcp_ipv4.c | 85 + net/ipv6/tcp_ipv6.c | 27 +- 3 files chang

[PATCH 10/40] ipv{4, 6}/raw: simplify ѕeq_file code

2018-04-25 Thread Christoph Hellwig
Pass the hashtable to the proc private data instead of copying it into the per-file private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/raw.h | 4 net/ipv4/raw.c| 36 net/ipv6/raw.c| 6 -- 3 files chang

[PATCH 04/40] proc: introduce proc_create_seq{,_data}

2018-04-25 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/common/sba_iommu.c | 15 +- arch/ia64/

[PATCH 06/40] proc: introduce proc_create_single{,_data}

2018-04-25 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/kernel/dma.c | 14 +--- ar

[PATCH 07/40] ipv{4,6}/udp{,lite}: simplify proc registration

2018-04-25 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/udp.h | 20 -- net/ipv4/udp.c | 99 +- net/ipv4/udplite.c | 21 +++--- net/ipv6/udp.c

[PATCH 05/40] proc: introduce proc_create_seq_private

2018-04-25 Thread Christoph Hellwig
Variant of proc_create_data that directly take a struct seq_operations argument + a private state size and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/locks.c

[PATCH 03/40] proc: add a proc_create_reg helper

2018-04-25 Thread Christoph Hellwig
Common code for creating a regular file. Factor out of proc_create_data, to be reused by other functions soon. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/generic.c | 44 +--- fs/proc/internal.h | 2 ++ 2 files changed, 27 inse

[PATCH 02/40] proc: simplify proc_register calling conventions

2018-04-25 Thread Christoph Hellwig
Return registered entry on success, return NULL on failure and free the passed in entry. Also expose it in internal.h as we'll start using it in proc_net.c soon. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/generic.c | 44 ++-- f

[PATCH 01/40] net/can: single_open_net needs to be paired with single_release_net

2018-04-25 Thread Christoph Hellwig
Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/can/bcm.c | 2 +- net/can/proc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index ac5e5e34fee3..8073fa14e143

Re: simplify procfs code for seq_file instances

2018-04-24 Thread Christoph Hellwig
On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > I want to ask if it is time to start using poorman function overloading > > > with _b_c_e(). There are millions of allocation functions for example, > > > all slightly difference, and people will add more. Seeing /proc interfaces

Re: [PATCH 02/39] proc: introduce proc_create_seq{,_data}

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:41:06PM +0300, Alexey Dobriyan wrote: > Should be oopsable. > Once proc_create_data() returns, entry is live, ->open can be called. Ok, switching to opencoding proc_create_data instead. ___ devel mailing list

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:50:27PM +0300, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 02:41:04PM +0200, Christoph Hellwig wrote: > > Variant of proc_create_data that directly take a struct seq_operations > > > --- a/fs/proc/internal.h > > +++ b/fs/proc/internal.h >

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 05:18:18PM +0300, Dan Carpenter wrote: > > -static const struct file_operations cio_ignore_proc_fops = { > > - .open= cio_ignore_proc_open, > > - .read= seq_read, > > - .llseek = seq_lseek, > > - .release = seq_release_private, > > - .write =

Re: [PATCH 16/39] ipmi: simplify procfs code

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 10:29:29AM -0500, Corey Minyard wrote: > On 04/19/2018 07:41 AM, Christoph Hellwig wrote: >> Use remove_proc_subtree to remove the whole subtree on cleanup instead >> of a hand rolled list of proc entries, unwind the registration loop into >> indi

Re: [PATCH 26/39] rtc/proc: switch to proc_create_single_data

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 03:10:27PM +0200, Alexandre Belloni wrote: > On 19/04/2018 14:41:27+0200, Christoph Hellwig wrote: > > And stop trying to get a reference on the submodule, procfs code deals > > with release after and unloaded module and thus removed proc entry. > > &g

Re: simplify procfs code for seq_file instances

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:57:50PM +0300, Alexey Dobriyan wrote: > > git://git.infradead.org/users/hch/misc.git proc_create > > > I want to ask if it is time to start using poorman function overloading > with _b_c_e(). There are millions of allocation functions for example, > all slightly

[PATCH 26/39] rtc/proc: switch to proc_create_single_data

2018-04-19 Thread Christoph Hellwig
And stop trying to get a reference on the submodule, procfs code deals with release after and unloaded module and thus removed proc entry. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/rtc/rtc-proc.c | 33 ++--- 1 file changed, 2 insertions(

[PATCH 30/39] netfilter/xt_hashlimit: switch to proc_create_{seq, single}_data

2018-04-19 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/xt_hashlimit.c | 92 +++- 1 file changed, 18 insertions(+), 74 deletions(-) diff --git a/net/

[PATCH 12/39] net: move seq_file_single_net to

2018-04-19 Thread Christoph Hellwig
This helper deals with single_{open,release}_net internals and thus belongs here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/seq_file_net.h | 13 + include/net/ip_vs.h | 12 2 files changed, 13 insertions(+), 12 deletions(-) diff

[PATCH 39/39] tty: replace ->proc_fops with ->proc_show

2018-04-19 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/sim/simserial.c| 15 +-- arch/xtensa/platforms/iss/console.

[PATCH 38/39] ide: replace ->proc_fops with ->proc_show

2018-04-19 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ide/ide-cd.c | 15 +--- drivers/ide/ide-disk_proc.c | 62 ++-- d

[PATCH 13/39] proc: introduce proc_create_net{,_data}

2018-04-19 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

[PATCH 19/39] sg: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sg.c | 124 +--

[PATCH 36/39] proc: don't detour through seq->private to get the inode

2018-04-19 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/array.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index ae2c807fd719..b34796b562ef 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -677,7

[PATCH 21/39] ext4: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ext4/ext4.h| 2 +- fs/ext4/mballoc.

[PATCH 28/39] hostap: switch to proc_create_{seq,single}_data

2018-04-19 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- .../net/wireless/intersil/hostap/hostap_ap.c | 70 ++--- .../net/wireless/intersil/hostap/hostap_hw.c | 17 +-- .../wireless/intersil/hostap/host

[PATCH 25/39] drbd: switch to proc_create_single

2018-04-19 Thread Christoph Hellwig
And stop messing with try_module_get on THIS_MODULE, which doesn't make any sense here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 3 ++- drivers/block/drbd/drbd_proc.c | 34 +--

[PATCH 34/39] atm: switch to proc_create_seq_private

2018-04-19 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/atm/proc.c | 72 +- 1 file changed, 13 insertions(+), 59 deletions(-) diff --git a/net/atm/proc.c b/net/atm/proc.c index f272b0f59d82..0b0495a41bbe

[PATCH 17/39] sgi-gru: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/misc/sgi-gru/gruprocfs.c | 81 ++---

[PATCH 37/39] ide: remove ide_driver_proc_write

2018-04-19 Thread Christoph Hellwig
The driver proc file hasn't been writeable for a long time, so this is just dead code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ide/ide-proc.c | 46 -- 1 file changed, 46 deletions(-) diff --git a/drivers/ide/ide-proc.c b/drivers/i

[PATCH 01/39] net/can: single_open_net needs to be paired with single_release_net

2018-04-19 Thread Christoph Hellwig
Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/can/bcm.c | 2 +- net/can/proc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index ac5e5e34fee3..8073fa14e143

[PATCH 07/39] ipv{4,6}/ping: simplify proc file creation

2018-04-19 Thread Christoph Hellwig
Remove the pointless ping_seq_afinfo indirection and make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/ping.h | 11 -- net/ipv4/ping.c| 50 +- net/ipv6/ping.c

[PATCH 33/39] atm: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/atm/proc.c | 65 ++-

[PATCH 04/39] proc: introduce proc_create_single{,_data}

2018-04-19 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/kernel/dma.c | 14 +--- ar

[PATCH 02/39] proc: introduce proc_create_seq{,_data}

2018-04-19 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/common/sba_iommu.c | 15 +- arch/ia64/

[PATCH 31/39] netfilter/x_tables: switch to proc_create_seq_private

2018-04-19 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 42 ++-- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 344dd0

[PATCH 18/39] megaraid: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_single. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/megaraid.c | 140 +++- driver

[PATCH 24/39] resource: switch to proc_create_seq_data

2018-04-19 Thread Christoph Hellwig
And use the root resource directly from the proc private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- kernel/resource.c | 43 +-- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c

[PATCH 23/39] staging/rtl8192u: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Unwind the registration loop into individual calls. Switch to use proc_create_single where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/staging/rtl8192u/r8192U_core.c | 67 ++ 1 file changed, 14 insertions(+), 53 deletions(-) diff

[PATCH 15/39] acpi/battery: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/acpi/battery.c | 121 +-

[PATCH 29/39] neigh: switch to proc_create_seq_data

2018-04-19 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/core/neighbour.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/net/core/neighbour.c b

[PATCH 16/39] ipmi: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup instead of a hand rolled list of proc entries, unwind the registration loop into individual calls. Switch to use proc_create_single to further simplify the code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/cha

[PATCH 05/39] ipv{4,6}/udp{,lite}: simplify proc registration

2018-04-19 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/udp.h | 20 -- net/ipv4/udp.c | 99 +- net/ipv4/udplite.c | 21 +++--- net/ipv6/udp.c

[PATCH 20/39] afs: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/afs/proc.c | 134 ++-

[PATCH 22/39] jfs: simplify procfs code

2018-04-19 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/jfs/jfs_debug.c| 43 ++---

[PATCH 11/39] netfilter/x_tables: simplify ѕeq_file code

2018-04-19 Thread Christoph Hellwig
Just use the address family from the proc private data instead of copying it into per-file data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 39 +++ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/net/net

[PATCH 14/39] proc: introduce proc_create_net_single

2018-04-19 Thread Christoph Hellwig
Variant of proc_create_data that directly take a seq_file show callback and deals with network namespaces in ->open and ->release. All callers of proc_create + single_open_net converted over, and single_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

simplify procfs code for seq_file instances

2018-04-19 Thread Christoph Hellwig
We currently have hundreds of proc files that implement plain, read-only seq_file based interfaces. This series consolidates them using new procfs helpers that take the seq_operations or simple show callback directly. A git tree is available at: git://git.infradead.org/users/hch/misc.git

[PATCH 35/39] isdn: replace ->proc_fops with ->proc_show

2018-04-19 Thread Christoph Hellwig
And switch to proc_create_single_data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/isdn/capi/kcapi.c | 3 ++- drivers/isdn/gigaset/capi.c| 16 +--- drivers/isdn/hardware/avm/avmcard.h| 4 ++-- drivers/isdn/hardware/avm/b1.c

[PATCH 32/39] bluetooth: switch to proc_create_seq_data

2018-04-19 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private and private state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/bluetooth/af_bluetooth.c | 40 +--- 1 file changed, 5 insertions(+), 35 deletions(-) diff --

[PATCH 27/39] bonding: switch to proc_create_seq_data

2018-04-19 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/bonding/bond_procfs.c | 36 ++- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/drivers/ne

[PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-19 Thread Christoph Hellwig
Variant of proc_create_data that directly take a struct seq_operations argument + a private state size and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/s390/cio/blacklist.

[PATCH 08/39] ipv{4, 6}/raw: simplify ѕeq_file code

2018-04-19 Thread Christoph Hellwig
Pass the hashtable to the proc private data instead of copying it into the per-file private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/raw.h | 4 net/ipv4/raw.c| 36 net/ipv6/raw.c| 6 -- 3 files chang

[PATCH 09/39] ipv6/flowlabel: simplify pid namespace lookup

2018-04-19 Thread Christoph Hellwig
The shole seq_file sequence already operates under a single RCU lock pair, so move the pid namespace lookup into it, and stop grabbing a reference and remove all kinds of boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/ipv6/ip6_flowlabel.

[PATCH 06/39] ipv{4,6}/tcp: simplify procfs registration

2018-04-19 Thread Christoph Hellwig
Avoid most of the afinfo indirections and just call the proc helpers directly. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/tcp.h | 11 ++ net/ipv4/tcp_ipv4.c | 85 + net/ipv6/tcp_ipv6.c | 27 +- 3 files chang

[PATCH 10/39] net/kcm: simplify proc registration

2018-04-19 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/kcm/kcmproc.c | 71 --- 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/net/kcm/kcmproc.c b/n

Re: [PATCH v2] drivers: visorbus: move driver out of staging

2017-12-12 Thread Christoph Hellwig
Hi David, as said before, please submit the actual files as new code to the kernel. The code will need a full review, and a simple move is not going to cut it. Posting the actual code as patches will allow for the proper review that is needed. ___

Re: [PATCH 2/2] drivers: visorbus: move driver out of staging

2017-11-17 Thread Christoph Hellwig
Please don' tcreate new subdirectories under include/linux if you don't have to. Also who outside of unisys has reviewed this whole code? Instead of a move please send an actual patchset to add the new files so people can review it just like any other code.

Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-19 Thread Christoph Hellwig
Tejun is fine with using __WQ_LEGACY directly.. Except for this nit this looks fine to me: Reviewed-by: Christoph Hellwig <h...@lst.de> ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-18 Thread Christoph Hellwig
On Mon, Sep 18, 2017 at 05:53:47PM +0200, Greg Kroah-Hartman wrote: > > It seems like a legitimate use case of the binder modules, but > > now there is a kernel Kconfig option that has to match a user > > space binary. > > So, should we revert that? > > I don't really know what to suggest here,

Re: [PATCH] android: binder: fix type mismatch warning

2017-09-18 Thread Christoph Hellwig
On Mon, Sep 18, 2017 at 05:35:03PM +0200, Arnd Bergmann wrote: > Probably not on a native Android device or even a Chromebook that > ships a binder user space together with a kernel, but what about > people using "anbox" or similar projects that allow you to run > Android apps in a container? > >

Re: [PATCH v1 6/6] device property: Switch to use new generic UUID API

2017-08-30 Thread Christoph Hellwig
On Wed, Aug 30, 2017 at 03:46:34PM +0200, Rafael J. Wysocki wrote: > 3689d3d69072 ACPI: device property: Switch to use new generic UUID API > > in my linux-next branch. Isn't it this one? Yes, that should be it. Somehow my linux-next tree seems to be a mess through or my git log skills aren't

Re: [PATCH v1 1/6] efi: Switch to use new generic UUID API

2017-08-30 Thread Christoph Hellwig
Thanks, applied to the uuid for-next tree. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v1 6/6] device property: Switch to use new generic UUID API

2017-08-30 Thread Christoph Hellwig
On Wed, Jul 26, 2017 at 02:27:44AM +0200, Rafael J. Wysocki wrote: > > >> > Cc: "Rafael J. Wysocki" > > >> > Cc: Mika Westerberg > > >> > > >> Acked-by: Mika Westerberg > > > > > > OK > > > > > > Andy, do you

Re: [PATCH v1 3/6] staging: unisys: Switch to use new generic UUID API

2017-08-30 Thread Christoph Hellwig
On Mon, Jul 31, 2017 at 08:20:25PM +0300, Andy Shevchenko wrote: > Yep! There are so many conflicts that would be better just to push > through your tree. > > I have just sent a v2 of this patch separately. Greg, did you pick that patch up? ___ devel

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-23 Thread Christoph Hellwig
Ok. If the stable maintainers are ok with your small fix I'm not going to complain too loudly. But I'm always worried about stable trees divering too much from mainline. ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-22 Thread Christoph Hellwig
Wouldn't it make sense to backport the changes to set the virt_boundary (which probably still is the SG_GAPS flag in such an old kernel)? ___ devel mailing list de...@linuxdriverproject.org

<    1   2   3   4   >