<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/char/misc.c, branch v4.13</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drivers: char: misc: Replace printk with pr_err.</title>
<updated>2017-04-08T15:53:06+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2017-04-07T11:34:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8ab44b4003381cf4bae7ccdfe81059aa9ce76033'/>
<id>8ab44b4003381cf4bae7ccdfe81059aa9ce76033</id>
<content type='text'>
Replace printk with pr_err to fix the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace printk with pr_err to fix the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: char: misc: Add blank line after declaration.</title>
<updated>2017-04-08T15:53:06+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2017-04-07T11:32:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5b884a95a5561c9ccea7b5cdf6a2fe9b48b589f5'/>
<id>5b884a95a5561c9ccea7b5cdf6a2fe9b48b589f5</id>
<content type='text'>
Add a blank line after declaration, to fix the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a blank line after declaration, to fix the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: char: misc: Add space after ','.</title>
<updated>2017-04-08T15:53:06+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2017-04-07T11:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=50a5e314792a4edbd64b1156ad4112480189a8dd'/>
<id>50a5e314792a4edbd64b1156ad4112480189a8dd</id>
<content type='text'>
Add space which is required after ',' to follow linux coding style. This
patch fixes the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add space which is required after ',' to follow linux coding style. This
patch fixes the checkpatch issue.

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: char: misc: Replace "foo * bar" with "foo *bar".</title>
<updated>2017-04-08T15:53:06+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2017-04-07T11:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=65ebd3dfe79553b294f893ad2b6f54f8b8680e44'/>
<id>65ebd3dfe79553b294f893ad2b6f54f8b8680e44</id>
<content type='text'>
Remove space after * in pointer type, to follow linux coding style. This
patch fixes the following checkpatch issue:

ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove space after * in pointer type, to follow linux coding style. This
patch fixes the following checkpatch issue:

ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>char: make misc_deregister a void function</title>
<updated>2015-08-05T17:35:49+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-07-30T22:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e'/>
<id>f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e</id>
<content type='text'>
With well over 200+ users of this api, there are a mere 12 users that
actually checked the return value of this function.  And all of them
really didn't do anything with that information as the system or module
was shutting down no matter what.

So stop pretending like it matters, and just return void from
misc_deregister().  If something goes wrong in the call, you will get a
WARNING splat in the syslog so you know how to fix up your driver.
Other than that, there's nothing that can go wrong.

Cc: Alasdair Kergon &lt;agk@redhat.com&gt;
Cc: Neil Brown &lt;neilb@suse.com&gt;
Cc: Oleg Drokin &lt;oleg.drokin@intel.com&gt;
Cc: Andreas Dilger &lt;andreas.dilger@intel.com&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Cc: Wim Van Sebroeck &lt;wim@iguana.be&gt;
Cc: Christine Caulfield &lt;ccaulfie@redhat.com&gt;
Cc: David Teigland &lt;teigland@redhat.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Acked-by: Joel Becker &lt;jlbec@evilplan.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With well over 200+ users of this api, there are a mere 12 users that
actually checked the return value of this function.  And all of them
really didn't do anything with that information as the system or module
was shutting down no matter what.

So stop pretending like it matters, and just return void from
misc_deregister().  If something goes wrong in the call, you will get a
WARNING splat in the syslog so you know how to fix up your driver.
Other than that, there's nothing that can go wrong.

Cc: Alasdair Kergon &lt;agk@redhat.com&gt;
Cc: Neil Brown &lt;neilb@suse.com&gt;
Cc: Oleg Drokin &lt;oleg.drokin@intel.com&gt;
Cc: Andreas Dilger &lt;andreas.dilger@intel.com&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Cc: Wim Van Sebroeck &lt;wim@iguana.be&gt;
Cc: Christine Caulfield &lt;ccaulfie@redhat.com&gt;
Cc: David Teigland &lt;teigland@redhat.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Acked-by: Joel Becker &lt;jlbec@evilplan.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>char: misc: fix error path</title>
<updated>2015-07-27T17:30:47+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-07-13T12:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1037b2787b6df12f31b7051f7cdbb289f7972ee7'/>
<id>1037b2787b6df12f31b7051f7cdbb289f7972ee7</id>
<content type='text'>
Lets call remove_proc_entry() in the error path only if we have
successfully created "misc" in procfs.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lets call remove_proc_entry() in the error path only if we have
successfully created "misc" in procfs.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>char: misc: remove redundant ifdef</title>
<updated>2015-07-27T17:30:47+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-07-13T12:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=344e62b36d3fa680ffbd35ee26b52f7bf4c1c4ec'/>
<id>344e62b36d3fa680ffbd35ee26b52f7bf4c1c4ec</id>
<content type='text'>
The check for CONFIG_PROC_FS is not required as the check is being done
in proc_fs.h and incase CONFIG_PROC_FS is not defined then proc_create()
is defined as NULL.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The check for CONFIG_PROC_FS is not required as the check is being done
in proc_fs.h and incase CONFIG_PROC_FS is not defined then proc_create()
is defined as NULL.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>char: misc: restore MISC_DYNAMIC_MINOR on device_create() failure</title>
<updated>2015-05-31T21:38:21+00:00</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vladimir_zapolskiy@mentor.com</email>
</author>
<published>2015-05-18T17:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b575f7124ab33b2a4239613bcc870380308fe0a7'/>
<id>b575f7124ab33b2a4239613bcc870380308fe0a7</id>
<content type='text'>
On attempt to register a dynamic minor misc device its minor number is
updated to a virtual minor number prior to device_create() call,
however on error path misc-&gt;minor == MISC_DYNAMIC_MINOR is not
restored.

Following the rule of thumb that a function returning an error must
not change the state of the caller, assign MISC_DYNAMIC_MINOR back.

The problem is met in a sutuation, when subsys_initcall(misc_init) is
not yet called and misc_class is not created, but misc_register()
modifies statically defined ".minor = MISC_DYNAMIC_MINOR", therefore
implicitly changing the client's logic on next attempt (e.g. retrying
from deferred list) to register a misc device, whose minor number is
converted from dynamic to some unknown static one.

Signed-off-by: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On attempt to register a dynamic minor misc device its minor number is
updated to a virtual minor number prior to device_create() call,
however on error path misc-&gt;minor == MISC_DYNAMIC_MINOR is not
restored.

Following the rule of thumb that a function returning an error must
not change the state of the caller, assign MISC_DYNAMIC_MINOR back.

The problem is met in a sutuation, when subsys_initcall(misc_init) is
not yet called and misc_class is not created, but misc_register()
modifies statically defined ".minor = MISC_DYNAMIC_MINOR", therefore
implicitly changing the client's logic on next attempt (e.g. retrying
from deferred list) to register a misc device, whose minor number is
converted from dynamic to some unknown static one.

Signed-off-by: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: char: misc.c: remove trailing whitespace</title>
<updated>2015-05-24T19:11:55+00:00</updated>
<author>
<name>Tal Shorer</name>
<email>tal.shorer@gmail.com</email>
</author>
<published>2015-05-01T11:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=898bc2824ece39a769b40e94579f5fc277689aba'/>
<id>898bc2824ece39a769b40e94579f5fc277689aba</id>
<content type='text'>
Remove trailing whitespace from several lines in drivers/char/misc.c
This was done using scripts/cleanfile

Signed-off-by: Tal Shorer &lt;tal.shorer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove trailing whitespace from several lines in drivers/char/misc.c
This was done using scripts/cleanfile

Signed-off-by: Tal Shorer &lt;tal.shorer@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>misc: pass miscdevice through file's private_data</title>
<updated>2015-04-03T14:15:30+00:00</updated>
<author>
<name>Tom Van Braeckel</name>
<email>tomvanbraeckel@gmail.com</email>
</author>
<published>2015-03-31T14:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0b509d8d336eef6d622d66b3ae2a1fc3a072bf92'/>
<id>0b509d8d336eef6d622d66b3ae2a1fc3a072bf92</id>
<content type='text'>
Make the miscdevice accessible through the file's private_data.

Previously, this was done only when an open() file operation had been
registered. If no custom open() file operation was defined,
private_data was set to NULL.

This subtle quirk was confusing, to the point where kernel code
registered *empty* file open operations to have private_data point to
the misc device structure and avoid duplicating that logic.

And it could easily lead to bugs, where the addition or removal of a
custom open() file operation surprisingly changes the initial value of
a file's private_data structure.

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 &lt;tomvanbraeckel@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the miscdevice accessible through the file's private_data.

Previously, this was done only when an open() file operation had been
registered. If no custom open() file operation was defined,
private_data was set to NULL.

This subtle quirk was confusing, to the point where kernel code
registered *empty* file open operations to have private_data point to
the misc device structure and avoid duplicating that logic.

And it could easily lead to bugs, where the addition or removal of a
custom open() file operation surprisingly changes the initial value of
a file's private_data structure.

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 &lt;tomvanbraeckel@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
