[PATCH] Misc: pass miscdevice through file's private_data

2014-12-04 Thread Tom Van Braeckel
Place the miscdevice in the file's private_data to be used by the file operations. Previously, this was done only when an open() operation had been registered. But it is also useful in the other file operations, so we pass it on unconditionally. Signed-off-by: Tom Van Braeckel --- dr

Re: [PATCH] Misc: pass miscdevice through file's private_data

2014-12-04 Thread Tom Van Braeckel
a and misc_register() were checked to ensure they register an open() operation, in order to verify that this improvement does not break any existing driver that uses the misc subsystem. Signed-off-by: Tom Van Braeckel --- drivers/char/misc.c | 11 --- 1 file changed, 8 insertions(+), 3

[PATCH] misc: pass miscdevice through file's private_data

2014-12-04 Thread Tom Van Braeckel
checked to ensure they register an open() operation in order to verify that this improvement does not break any existing driver that uses the misc subsystem. Signed-off-by: Tom Van Braeckel --- drivers/char/misc.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/c

Re: [PATCH] misc: pass miscdevice through file's private_data

2015-01-11 Thread Tom Van Braeckel
ister a custom open() file operation for this device file. I'm currently testing out patches to make fuse and btrfs independent of this subtle behavior of the misc subsystem. I'll send my patches to the fuse and btrfs maintainers first and when they get accepted, I'll re-send this pat

[PATCH] lguest: explicitly setup /dev/lguest private_data

2015-04-07 Thread Tom Van Braeckel
: Tom Van Braeckel --- Backstory: == The misc subsystem used to initialize a file's private_data to point to the misc device when a driver had registered a custom open file operation and initialized it to NULL when a custom open file operation had *not* been provided. This subtle quir

Re: [PATCH v2] btrfs: explicitly set control file's private_data

2015-03-31 Thread Tom Van Braeckel
Err, upon further inspection, I think that this was a false positive. Btrfs relies on the initial value of the private_data member of a file being NULL in the regular ioctl operation handler for BTRFS_IOC_TRANS_START but it does not use the miscdevice framework for those files. It *does* use the

Re: [PATCH] misc: pass miscdevice through file's private_data

2015-03-31 Thread Tom Van Braeckel
>> Wait, didn't this break FUSE? Or was that some other variant of this >> patch? The fix for FUSE is in 4.0-rc5 and linux-next. Btrfs was not affected, in the end. All kernel code has been checked for potential regressions. So in my opinion, the time has come to apply this patch to char-misc so

[PATCH] misc: pass miscdevice through file's private_data

2015-03-31 Thread Tom Van Braeckel
cture. To resolve this, we now place the miscdevice in the file's private_data member unconditionally when open() is called. Signed-off-by: Tom Van Braeckel --- All kernel code that uses private_data and misc_register() has been checked for potential regressions and the code that relied

Re: drm/i915 KMS regression in Linux 3.16-rc2 (with git bisect result)

2014-06-28 Thread Tom Van Braeckel
>> There seems to be a regression in the upcoming Linux 3.16-rc2 release >> candidate that I bisected down to this first bad commit: >> [dbb42748ac4929987c1449ecb296b39ef8956b62] drm/i915: Move the C3 LP >> write bit setup to gen3_init_clock_gating() for KMS. > > Can you attach the dmesg with rc2 a

[PATCH] btrfs: explicitly set control file's private_data

2015-03-23 Thread Tom Van Braeckel
his in the misc subsystem itself, we need to modify the (few) drivers that rely on this very subtle behavior. [1] https://lkml.org/lkml/2014/12/4/939 Signed-off-by: Martin Kepplinger Signed-off-by: Tom Van Braeckel --- fs/btrfs/super.c | 11 +++ 1 file changed, 11 insertions(+) diff -

[PATCH v2] btrfs: explicitly set control file's private_data

2015-03-24 Thread Tom Van Braeckel
his in the misc subsystem itself, we need to modify the (few) drivers that rely on this very subtle behavior. [1] https://lkml.org/lkml/2014/12/4/939 Signed-off-by: Martin Kepplinger Signed-off-by: Tom Van Braeckel --- fs/btrfs/super.c | 12 1 file changed, 12 insertions(+) diff -

[PATCH] checkpatch: support more uppercase $logFunctions

2015-03-18 Thread Tom Van Braeckel
WARN*) unless they do not exist anywhere in the codebase (such as WARN_once or WARN_ratelimited). Signed-off-by: Tom Van Braeckel --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d124359..c5d1388

[PATCH v2] checkpatch: support more uppercase $logFunctions

2015-03-19 Thread Tom Van Braeckel
WARN_RATELIMIT and WARN_ONCE). Signed-off-by: Tom Van Braeckel --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d124359..18d1ffa 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -352,7

Re: [PATCH v2] checkpatch: support more uppercase $logFunctions

2015-03-19 Thread Tom Van Braeckel
>> unfixable checkpatch warnings (an example: drivers/bluetooth/btusb.c) > > I think BT_DBG is a poor macro as it's just > > #define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) > > and I'd rather see a treewide sed for that to pr_debug Indeed, I also think that BT_DBG() is a poor macro and