[PATCH v4 1/8] misc: sram: fix enabled clock leak on error path

2015-05-25 Thread Vladimir Zapolskiy
red as an error, so it is safe to place devm_clk_get() at the end of probe(). No functional change. Signed-off-by: Vladimir Zapolskiy --- Changes from v3 to v4: - squashed patches v3 1/9 (fix) and 7/9 (clean-up) into v4 1/8 drivers/misc/sram.c | 22 +- 1 file changed, 9 insertions(+),

[PATCH v4 8/8] misc: sram: sort and clean up included headers

2015-05-25 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 59562fa..52a0d53 100644 --- a/drivers

[PATCH v4 6/8] misc: sram: add private struct device and virt_base members

2015-05-25 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy --- Changes from v3 to v4: - rebased on top of v4 3/8 misc: sram: use phys_addr_t instead of u32 for physical address Changes

[PATCH v4 4/8] misc: sram: bump error message level on unclean driver unbinding

2015-05-25 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index a35be46f

[PATCH v4 7/8] misc: sram: move reserved block logic out of probe function

2015-05-25 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy --- Changes from v2 to v3: - fixes a variable may be uninitialized warning drivers/misc/sram.c | 82

[PATCH v4 4/8] misc: sram: bump error message level on unclean driver unbinding

2015-05-25 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b

[PATCH v4 7/8] misc: sram: move reserved block logic out of probe function

2015-05-25 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v2 to v3: - fixes a variable may be uninitialized warning

[PATCH v4 8/8] misc: sram: sort and clean up included headers

2015-05-25 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 59562fa

[PATCH v4 6/8] misc: sram: add private struct device and virt_base members

2015-05-25 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v3 to v4: - rebased on top of v4 3/8 misc: sram: use phys_addr_t instead of u32

[PATCH v4 2/8] misc: sram: fix device node reference leak on error

2015-05-25 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc

[PATCH v4 0/8] misc: sram: minor fixes and clean up

2015-05-25 Thread Vladimir Zapolskiy
of denominator '1024' to SZ_1K requires explicit include of linux/sizes.h on some platforms, keep it as a number Vladimir Zapolskiy (8): misc: sram: fix enabled clock leak on error path misc: sram: fix device node reference leak on error misc: sram: use phys_addr_t instead of u32

[PATCH v4 5/8] misc: sram: report correct SRAM pool size

2015-05-25 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v1 to v2: - rebased on top of v2 3/9 misc: sram: use phys_addr_t

[PATCH v4 3/8] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-25 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v3 to v4: - replaced 0x%llx with 0x%pa to display phys_addr_t values Changes from v1 to v2: - report size of SRAM

[PATCH v4 1/8] misc: sram: fix enabled clock leak on error path

2015-05-25 Thread Vladimir Zapolskiy
as an error, so it is safe to place devm_clk_get() at the end of probe(). No functional change. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v3 to v4: - squashed patches v3 1/9 (fix) and 7/9 (clean-up) into v4 1/8 drivers/misc/sram.c | 22 +- 1 file

Re: [PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-24 Thread Vladimir Zapolskiy
Hi Philipp, On 20.05.2015 14:30, Philipp Zabel wrote: > Hi Vladimir, > > Am Dienstag, den 19.05.2015, 16:11 +0300 schrieb Vladimir Zapolskiy: >> Hi Philipp, >> >> On 19.05.2015 13:41, Philipp Zabel wrote: >>> Am Montag, den 18.05.2015, 22

Re: [PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-24 Thread Vladimir Zapolskiy
Hi Philipp, On 20.05.2015 14:30, Philipp Zabel wrote: Hi Vladimir, Am Dienstag, den 19.05.2015, 16:11 +0300 schrieb Vladimir Zapolskiy: Hi Philipp, On 19.05.2015 13:41, Philipp Zabel wrote: Am Montag, den 18.05.2015, 22:08 +0300 schrieb Vladimir Zapolskiy: If devm_gen_pool_create() fails

Re: [PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
Hello Tejun, On 22.05.2015 02:26, Tejun Heo wrote: > Hello, Vladimir. > > On Fri, May 22, 2015 at 02:04:31AM +0300, Vladimir Zapolskiy wrote: >> But "!size" is a special case, >> >> if (!count || pos >= size) >> return 0; >>

Re: [PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
Hello Tejun, On 22.05.2015 01:14, Tejun Heo wrote: > Hello, > > On Fri, May 22, 2015 at 12:21:16AM +0300, Vladimir Zapolskiy wrote: >> If count == 0 bytes are requested by a reader, sysfs_kf_bin_read() >> deliberately returns 0 without passing a potentially harmful value

[PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
this value is handed over to battr->read(). The change intends to make obsolete (and remove later) a redundant sanity check in battr->read(), if it is present, or add more protection to struct bin_attribute users, who does not care about input arguments. Signed-off-by: Vladimir Zapolskiy ---

[PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
is handed over to battr-read(). The change intends to make obsolete (and remove later) a redundant sanity check in battr-read(), if it is present, or add more protection to struct bin_attribute users, who does not care about input arguments. Signed-off-by: Vladimir Zapolskiy v...@mleia.com --- fs/sysfs

Re: [PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
Hello Tejun, On 22.05.2015 01:14, Tejun Heo wrote: Hello, On Fri, May 22, 2015 at 12:21:16AM +0300, Vladimir Zapolskiy wrote: If count == 0 bytes are requested by a reader, sysfs_kf_bin_read() deliberately returns 0 without passing a potentially harmful value to some externally defined

Re: [PATCH] fs: sysfs: don't pass count == 0 to bin file readers

2015-05-21 Thread Vladimir Zapolskiy
Hello Tejun, On 22.05.2015 02:26, Tejun Heo wrote: Hello, Vladimir. On Fri, May 22, 2015 at 02:04:31AM +0300, Vladimir Zapolskiy wrote: But !size is a special case, if (!count || pos = size) return 0; seems to be incorrect in case of !size === (pos = size) == true

Re: [PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-19 Thread Vladimir Zapolskiy
Hi Philipp, On 19.05.2015 13:41, Philipp Zabel wrote: > Am Montag, den 18.05.2015, 22:08 +0300 schrieb Vladimir Zapolskiy: >> If devm_gen_pool_create() fails, the previously enabled sram->clk is >> not disabled on probe() exit. >> >> Signed-off-by: Vladimir Zapo

Re: [PATCH v3 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-19 Thread Vladimir Zapolskiy
Hi Philipp, thank you for review. On 19.05.2015 13:38, Philipp Zabel wrote: > Hi Vladimir, > > Am Montag, den 18.05.2015, 22:08 +0300 schrieb Vladimir Zapolskiy: >> To avoid any problems on non 32-bit platforms get and store memory >> addresses under phys_addr_t t

Re: [PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-19 Thread Vladimir Zapolskiy
Hi Philipp, On 19.05.2015 13:41, Philipp Zabel wrote: Am Montag, den 18.05.2015, 22:08 +0300 schrieb Vladimir Zapolskiy: If devm_gen_pool_create() fails, the previously enabled sram-clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com

Re: [PATCH v3 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-19 Thread Vladimir Zapolskiy
Hi Philipp, thank you for review. On 19.05.2015 13:38, Philipp Zabel wrote: Hi Vladimir, Am Montag, den 18.05.2015, 22:08 +0300 schrieb Vladimir Zapolskiy: To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir

[PATCH v3 5/9] misc: sram: report correct SRAM pool size

2015-05-18 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v2: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32 for physical

[PATCH v3 2/9] misc: sram: fix device node reference leak on error

2015-05-18 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b44a423..999684a

[PATCH v3 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-18 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b7a3a24

[PATCH v3 6/9] misc: sram: add private struct device and virt_base members

2015-05-18 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v2: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32 for physical address drivers

[PATCH v3 9/9] misc: sram: sort and clean up included headers

2015-05-18 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 582a893..2791def 100644 --- a/drivers

[PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-18 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram->clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index eeaa

[PATCH v3 7/9] misc: sram: simplify probe error path

2015-05-18 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because not provided clock is not considered as an error. No functional change. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v3: - immediately

[PATCH v3 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-18 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v2: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024' to SZ_1K requires explicit

[PATCH v3 0/9] misc: sram: minor fixes and clean up

2015-05-18 Thread Vladimir Zapolskiy
be uninitialized warning Changes since v1: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024' to SZ_1K requires explicit include of linux/sizes.h on some platforms, keep it as a number Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error

[PATCH v3 8/9] misc: sram: move reserved block logic out of probe function

2015-05-18 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy --- Changes from v1/v2 to v3: - fixes a variable may be uninitialized warning drivers/misc/sram.c | 84

[PATCH] char: misc: restore MISC_DYNAMIC_MINOR on device_create() failure

2015-05-18 Thread Vladimir Zapolskiy
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 --- drivers/char/misc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a

[PATCH] char: misc: restore MISC_DYNAMIC_MINOR on device_create() failure

2015-05-18 Thread Vladimir Zapolskiy
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 vladimir_zapols...@mentor.com --- drivers/char/misc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions

[PATCH v3 8/9] misc: sram: move reserved block logic out of probe function

2015-05-18 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v1/v2 to v3: - fixes a variable may be uninitialized warning

[PATCH v3 0/9] misc: sram: minor fixes and clean up

2015-05-18 Thread Vladimir Zapolskiy
be uninitialized warning Changes since v1: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024' to SZ_1K requires explicit include of linux/sizes.h on some platforms, keep it as a number Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error

[PATCH v3 9/9] misc: sram: sort and clean up included headers

2015-05-18 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 582a893

[PATCH v3 1/9] misc: sram: fix enabled clock leak on error path

2015-05-18 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram-clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers

[PATCH v3 6/9] misc: sram: add private struct device and virt_base members

2015-05-18 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v1 to v2: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32

[PATCH v3 5/9] misc: sram: report correct SRAM pool size

2015-05-18 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v1 to v2: - rebased on top of v2 3/9 misc: sram: use phys_addr_t

[PATCH v3 7/9] misc: sram: simplify probe error path

2015-05-18 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because not provided clock is not considered as an error. No functional change. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from

[PATCH v3 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-18 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes from v1 to v2: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024

[PATCH v3 2/9] misc: sram: fix device node reference leak on error

2015-05-18 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc

[PATCH v3 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-18 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-06 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b7a3a24

[PATCH v2 5/9] misc: sram: report correct SRAM pool size

2015-05-06 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy --- Changes since v1: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32 for physical

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-06 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b7a3a24

[PATCH v2 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-06 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy --- Changes since v1: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024' to SZ_1K requires explicit include

[PATCH v2 0/9] misc: sram: minor fixes and clean up

2015-05-06 Thread Vladimir Zapolskiy
include of linux/sizes.h on some platforms, keep it as a number Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error path misc: sram: fix device node reference leak on error misc: sram: use phys_addr_t instead of u32 for physical address misc: sram: bump error message

[PATCH 9/9] misc: sram: sort and clean up included headers

2015-05-06 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index e107fb6..7d81c9e 100644

[PATCH 1/9] misc: sram: fix enabled clock leak on error path

2015-05-06 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram->clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index eeaa

[PATCH 2/9] misc: sram: fix device node reference leak on error

2015-05-06 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b44a423..999684a

[PATCH 7/9] misc: sram: simplify probe error path

2015-05-06 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because unprovided clock is not considered as an error. No functional change, but minus one label. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c

[PATCH v2 6/9] misc: sram: add private struct device and virt_base members

2015-05-06 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy --- Changes since v1: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32 for physical address --- drivers

[PATCH 8/9] misc: sram: move reserved block logic out of probe function

2015-05-06 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 82 +-- 1 file changed, 46

[PATCH 8/9] misc: sram: move reserved block logic out of probe function

2015-05-06 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 82

[PATCH v2 6/9] misc: sram: add private struct device and virt_base members

2015-05-06 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes since v1: - rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32

[PATCH 7/9] misc: sram: simplify probe error path

2015-05-06 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because unprovided clock is not considered as an error. No functional change, but minus one label. Signed-off-by: Vladimir Zapolskiy vladimir_zapols

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-06 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b

[PATCH v2 5/9] misc: sram: report correct SRAM pool size

2015-05-06 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes since v1: - rebased on top of v2 3/9 misc: sram: use phys_addr_t

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-06 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b

[PATCH v2 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-06 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- Changes since v1: - report size of SRAM in decimal format '%zu' instead of '%zx' - replacement of denominator '1024' to SZ_1K

[PATCH 9/9] misc: sram: sort and clean up included headers

2015-05-06 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index e107fb6

[PATCH 1/9] misc: sram: fix enabled clock leak on error path

2015-05-06 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram-clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers

[PATCH v2 0/9] misc: sram: minor fixes and clean up

2015-05-06 Thread Vladimir Zapolskiy
include of linux/sizes.h on some platforms, keep it as a number Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error path misc: sram: fix device node reference leak on error misc: sram: use phys_addr_t instead of u32 for physical address misc: sram: bump error message

[PATCH 2/9] misc: sram: fix device node reference leak on error

2015-05-06 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc

[PATCH 9/9] misc: sram: sort and clean up included headers

2015-05-02 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 2036f6d..ed26ce0 100644

[PATCH 7/9] misc: sram: simplify probe error path

2015-05-02 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because not provided clock is not considered as an error. No functional change. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 20

[PATCH 8/9] misc: sram: move reserved block logic out of probe function

2015-05-02 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 82 +-- 1 file changed, 46

[PATCH 6/9] misc: sram: add private struct device and virt_base members

2015-05-02 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions

[PATCH 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-02 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc

[PATCH 1/9] misc: sram: fix enabled clock leak on error path

2015-05-02 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram->clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index eeaa

[PATCH 2/9] misc: sram: fix device node reference leak on error

2015-05-02 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b44a423..999684a

[PATCH 5/9] misc: sram: report correct SRAM pool size

2015-05-02 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-02 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index a703e37

[PATCH 0/9] misc: sram: minor fixes and clean up

2015-05-02 Thread Vladimir Zapolskiy
The series contains a number of minor fixes (move to phys_addr_t from u32, fix ups on error path etc.) and overall driver clean up, no functional change. Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error path misc: sram: fix device node reference leak on error misc: sram

[PATCH 9/9] misc: sram: sort and clean up included headers

2015-05-02 Thread Vladimir Zapolskiy
Most of the included header files are already included as dependencies. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 2036f6d

[PATCH 7/9] misc: sram: simplify probe error path

2015-05-02 Thread Vladimir Zapolskiy
Reserved block logic relies only on information from device tree, there is no need to get and enable device clock in advance, especially because not provided clock is not considered as an error. No functional change. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers

[PATCH 8/9] misc: sram: move reserved block logic out of probe function

2015-05-02 Thread Vladimir Zapolskiy
No functional change, but now previously overloaded sram_probe() is greatly simplified and perceptible, reserved regions logic also has its own space. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 82

[PATCH 6/9] misc: sram: add private struct device and virt_base members

2015-05-02 Thread Vladimir Zapolskiy
No functional change, this is a preceding change to simplify separation of reserved partition handling logic from probe() function. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 48 ++-- 1 file changed, 26

[PATCH 3/9] misc: sram: use phys_addr_t instead of u32 for physical address

2015-05-02 Thread Vladimir Zapolskiy
To avoid any problems on non 32-bit platforms get and store memory addresses under phys_addr_t type. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH 0/9] misc: sram: minor fixes and clean up

2015-05-02 Thread Vladimir Zapolskiy
The series contains a number of minor fixes (move to phys_addr_t from u32, fix ups on error path etc.) and overall driver clean up, no functional change. Vladimir Zapolskiy (9): misc: sram: fix enabled clock leak on error path misc: sram: fix device node reference leak on error misc: sram

[PATCH 1/9] misc: sram: fix enabled clock leak on error path

2015-05-02 Thread Vladimir Zapolskiy
If devm_gen_pool_create() fails, the previously enabled sram-clk is not disabled on probe() exit. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers

[PATCH 2/9] misc: sram: fix device node reference leak on error

2015-05-02 Thread Vladimir Zapolskiy
A pointer device node reference should be decremented on manual exit from for_each_available_child_of_node() loop. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/sram.c b/drivers/misc

[PATCH 5/9] misc: sram: report correct SRAM pool size

2015-05-02 Thread Vladimir Zapolskiy
Since some space in SRAM may be reserved, report the left free space in the allocated memory pool instead of total physical size of the SRAM device. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 4/9] misc: sram: bump error message level on unclean driver unbinding

2015-05-02 Thread Vladimir Zapolskiy
Report an error level message to a user, if the driver is unbound while there are still some pool allocations. Signed-off-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com --- drivers/misc/sram.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sram.c b

Re: [PATCH] gpio: max732x: Add IRQF_SHARED to irq flags

2015-04-22 Thread Vladimir Zapolskiy
Hi Semen, On 21.04.2015 16:19, Semen Protsenko wrote: > It's possible that multiple MAX732X can be hooked up to the same > interrupt line with the processor. So add IRQF_SHARED in requesting irq. > > Signed-off-by: Semen Protsenko > --- > drivers/gpio/gpio-max732x.c | 10 -- > 1 file

Re: [PATCH] gpio: max732x: Add IRQF_SHARED to irq flags

2015-04-22 Thread Vladimir Zapolskiy
Hi Semen, On 21.04.2015 16:19, Semen Protsenko wrote: It's possible that multiple MAX732X can be hooked up to the same interrupt line with the processor. So add IRQF_SHARED in requesting irq. Signed-off-by: Semen Protsenko semen.protse...@globallogic.com --- drivers/gpio/gpio-max732x.c |

Re: [PATCH v6 10/15] serial: stm32-usart: Add STM32 USART Driver

2015-04-09 Thread Vladimir Zapolskiy
n_progress) { > + locked = spin_trylock_irqsave(>lock, flags); > + } else { > + locked = 1; locked = 1 is done from the declaration. Also do you want to add "if (port->sysrq) locked = 0;" check? > + spin_lock_irqsave(>lock, flag

Re: [PATCH v6 10/15] serial: stm32-usart: Add STM32 USART Driver

2015-04-09 Thread Vladimir Zapolskiy
from point of view. Reviewed-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com -- With best wishes, Vladimir -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v8 1/2] pwm: Imagination Technologies PWM DAC driver

2015-01-21 Thread Vladimir Zapolskiy
le | 1 + > drivers/pwm/pwm-img.c | 250 > ++ > 3 files changed, 264 insertions(+) > create mode 100644 drivers/pwm/pwm-img.c > Reviewed-by: Vladimir Zapolskiy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH v8 1/2] pwm: Imagination Technologies PWM DAC driver

2015-01-21 Thread Vladimir Zapolskiy
/pwm/Kconfig | 13 +++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-img.c | 250 ++ 3 files changed, 264 insertions(+) create mode 100644 drivers/pwm/pwm-img.c Reviewed-by: Vladimir Zapolskiy vladimir_zapols...@mentor.com

Re: [PATCH v7 1/4] pwm: Imagination Technologies PWM DAC driver

2015-01-08 Thread Vladimir Zapolskiy
Hi Ezequiel, On 07.01.2015 19:20, Ezequiel Garcia wrote: > From: Naidu Tellapati > > The Pistachio SOC from Imagination Technologies includes a Pulse Width > Modulation DAC which produces 1 to 4 digital bit-outputs which represent > digital waveforms. These PWM outputs are primarily in charge

Re: [PATCH v7 1/4] pwm: Imagination Technologies PWM DAC driver

2015-01-08 Thread Vladimir Zapolskiy
Hi Ezequiel, On 07.01.2015 19:20, Ezequiel Garcia wrote: From: Naidu Tellapati naidu.tellap...@imgtec.com The Pistachio SOC from Imagination Technologies includes a Pulse Width Modulation DAC which produces 1 to 4 digital bit-outputs which represent digital waveforms. These PWM outputs are

Re: Question about fixed regulator DT properties

2014-11-26 Thread Vladimir Zapolskiy
On 26.11.2014 21:20, Mark Brown wrote: > On Wed, Nov 26, 2014 at 09:13:50PM +0200, Vladimir Zapolskiy wrote: > >> If I want to enable a fixed regulator (not controlled by >> bootloader/firmware) by Linux on boot or when fixed.ko module is bound, >> shall I specify

Re: Question about fixed regulator DT properties

2014-11-26 Thread Vladimir Zapolskiy
Hi, MarkOn 26.11.2014 19:53, Mark Brown wrote: > On Wed, Nov 26, 2014 at 07:27:06PM +0200, Vladimir Zapolskiy wrote: >> On 25.11.2014 14:17, Mark Brown wrote: > >> b) "regulator-boot-on" does not mean that the regulator is controlled by >> bootloader or firmwar

<    3   4   5   6   7   8   9   >