<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap/regmap-debugfs.c, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-09-19T14:38:12Z</updated>
<entry>
<title>regmap: debugfs: Don't bother actually printing when calculating max length</title>
<updated>2015-09-19T14:38:12Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-09-19T14:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=176fc2d5770a0990eebff903ba680d2edd32e718'/>
<id>urn:sha1:176fc2d5770a0990eebff903ba680d2edd32e718</id>
<content type='text'>
The in kernel snprintf() will conveniently return the actual length of
the printed string even if not given an output beffer at all so just do
that rather than relying on the user to pass in a suitable buffer,
ensuring that we don't need to worry if the buffer was truncated due to
the size of the buffer passed in.

Reported-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>regmap: debugfs: Ensure we don't underflow when printing access masks</title>
<updated>2015-09-19T14:38:11Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-09-19T14:00:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b763ec17ac762470eec5be8ebcc43e4f8b2c2b82'/>
<id>urn:sha1:b763ec17ac762470eec5be8ebcc43e4f8b2c2b82</id>
<content type='text'>
If a read is attempted which is smaller than the line length then we may
underflow the subtraction we're doing with the unsigned size_t type so
move some of the calculation to be additions on the right hand side
instead in order to avoid this.

Reported-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>regmap: debugfs: Fix misuse of IS_ENABLED</title>
<updated>2015-08-07T12:31:58Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-08-06T02:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1635e88885a8e16dec21206c981421f1f3c3b1df'/>
<id>urn:sha1:1635e88885a8e16dec21206c981421f1f3c3b1df</id>
<content type='text'>
IS_ENABLED should only be used for CONFIG_* symbols.

I have done a small test:
  #define REGMAP_ALLOW_WRITE_DEBUGFS
  IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.

  #define REGMAP_ALLOW_WRITE_DEBUGFS 0
  IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.

  #define REGMAP_ALLOW_WRITE_DEBUGFS 1
  IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 1.

  #define REGMAP_ALLOW_WRITE_DEBUGFS 2
  IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.

So fix the misuse of IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) and switch to
use #if defined(REGMAP_ALLOW_WRITE_DEBUGFS) instead.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Allow writes to cache state settings</title>
<updated>2015-07-20T17:45:00Z</updated>
<author>
<name>Richard Fitzgerald</name>
<email>rf@opensource.wolfsonmicro.com</email>
</author>
<published>2015-06-23T13:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3dc5430d68fb91a62d971648170b34d46ab85bc'/>
<id>urn:sha1:d3dc5430d68fb91a62d971648170b34d46ab85bc</id>
<content type='text'>
Allow the user to write the cache_only and cache_bypass settings.
This can be useful for debugging.

Since this can lead to the hardware getting out-of-sync with the
cache, at least for the period that the cache state is forced, the
kernel is tainted and the action is recorded in the kernel log.

When disabling cache_only through debugfs a cache sync will be performed.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.wolfsonmicro.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus</title>
<updated>2014-09-29T19:49:40Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2014-09-29T19:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18a64d844c0e98ad00f735f5ea6a3affb6b76639'/>
<id>urn:sha1:18a64d844c0e98ad00f735f5ea6a3affb6b76639</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: Fix debugfs-file 'registers' mode</title>
<updated>2014-09-29T17:22:26Z</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2014-09-08T06:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18c0301f9898feaac38135b2cea476bb606830e3'/>
<id>urn:sha1:18c0301f9898feaac38135b2cea476bb606830e3</id>
<content type='text'>
The macro "REGMAP_ALLOW_WRITE_DEBUGFS" can be used to enable write
support on the registers file in the debugfs. The mode of the file is
fixed to 0400 so it is not possible to write the file ever.

This patch fixes the mode by setting it to the correct value depending
on the macro.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: fix possbile NULL pointer dereference</title>
<updated>2014-09-28T10:49:56Z</updated>
<author>
<name>Xiubo Li</name>
<email>Li.Xiubo@freescale.com</email>
</author>
<published>2014-09-28T03:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c98e0c1cc6b8e86f1978286c3d4e0769ee9d733'/>
<id>urn:sha1:2c98e0c1cc6b8e86f1978286c3d4e0769ee9d733</id>
<content type='text'>
If 'map-&gt;dev' is NULL and there will lead dev_name() to be NULL pointer
dereference. So before dev_name(), we need to have check of the map-&gt;dev
pionter.

We also should make sure that the 'name' pointer shouldn't be NULL for
debugfs_create_dir(). So here using one default "dummy" debugfs name when
the 'name' pointer and 'map-&gt;dev' are both NULL.

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'regmap-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap</title>
<updated>2014-09-15T23:20:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-09-15T23:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2324067fa9a41b2d0b6ddbc7ac0497d105593b76'/>
<id>urn:sha1:2324067fa9a41b2d0b6ddbc7ac0497d105593b76</id>
<content type='text'>
Pull regmap fix from Mark Brown:
 "Fix registers file in debugfs

  Ensure that the mode reported for the registers file in debugfs is
  accurate by marking it as read only when the define to enable writes
  has not been set.  This is on the edge of being a bug fix but it's
  debugfs and it makes it much easier for users to spot what's going
  wrong when they forget to enable writeability"

* tag 'regmap-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fix debugfs-file 'registers' mode
</content>
</entry>
<entry>
<title>regmap: Fix debugfs-file 'registers' mode</title>
<updated>2014-09-08T11:16:19Z</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2014-09-08T06:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffff7a12ace24c54220631b79abb02ab65780b5a'/>
<id>urn:sha1:ffff7a12ace24c54220631b79abb02ab65780b5a</id>
<content type='text'>
The macro "REGMAP_ALLOW_WRITE_DEBUGFS" can be used to enable write
support on the registers file in the debugfs. The mode of the file is
fixed to 0400 so it is not possible to write the file ever.

This patch fixes the mode by setting it to the correct value depending
on the macro.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Fix regcache debugfs initialization</title>
<updated>2014-08-26T08:11:56Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2014-08-24T13:32:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e0cbe78762b5f02986bf9e59a188dad2f6e0be1'/>
<id>urn:sha1:5e0cbe78762b5f02986bf9e59a188dad2f6e0be1</id>
<content type='text'>
Commit 6cfec04bcc05 ("regmap: Separate regmap dev initialization") moved the
regmap debugfs initialization after regcache initialization. This means
that the regmap debugfs directory is not created yet when the cache
initialization runs and so any debugfs files registered by the regcache are
created in the debugfs root directory rather than the debugfs directory of
the regmap instance. Fix this by adding a separate callback for the
regcache debugfs initialization which will be called after the parent
debugfs entry has been created.

Fixes: 6cfec04bcc05 (regmap: Separate regmap dev initialization)
Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
</feed>
