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
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
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
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
: 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
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
>> 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
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
>> 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
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 -
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 -
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
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
>> 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
14 matches
Mail list logo