<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd/maps, branch v4.20</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.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-11-06T09:38:17Z</updated>
<entry>
<title>mtd: sa1100: avoid VLA in sa1100_setup_mtd</title>
<updated>2018-11-06T09:38:17Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-11-05T07:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba26cd7d58dcc50e25c8f02b5376c05046b181dc'/>
<id>urn:sha1:ba26cd7d58dcc50e25c8f02b5376c05046b181dc</id>
<content type='text'>
Enabling -Wvla found another variable-length array with randconfig
testing:

drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_setup_mtd':
drivers/mtd/maps/sa1100-flash.c:224:10: error: ISO C90 forbids variable length array 'cdev' [-Werror=vla]

Dynamically allocate the cdev array passed to mtd_concat_create()
instead of using a VLA.

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Convert to gpiod</title>
<updated>2018-10-08T19:32:58Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=299b43535d3895bcde93cc7310b95b92b4fd8129'/>
<id>urn:sha1:299b43535d3895bcde93cc7310b95b92b4fd8129</id>
<content type='text'>
Convert from legacy gpio API to gpiod.
Board files will have to use gpiod_lookup_tables.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Suggested-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Replace array with an integer</title>
<updated>2018-10-08T19:32:57Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0304f8eaa3aebc0480787139a26c7a19ac9936bd'/>
<id>urn:sha1:0304f8eaa3aebc0480787139a26c7a19ac9936bd</id>
<content type='text'>
By replacing the array with an integer we can avoid completely
the bit comparison loop if the value has not changed (by far
the most common case).

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Use order instead of size</title>
<updated>2018-10-08T19:32:49Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=460cdeca546fc75f2450914c96e701f990396285'/>
<id>urn:sha1:460cdeca546fc75f2450914c96e701f990396285</id>
<content type='text'>
By using the order of the window instead of the size, we can replace a
lot of expensive division and modulus on the code with simple bit
operations.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Use devm_* functions</title>
<updated>2018-10-05T08:20:34Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4edc00adfd58768b065204968948c52f5e5b07b1'/>
<id>urn:sha1:4edc00adfd58768b065204968948c52f5e5b07b1</id>
<content type='text'>
By using devm functions we can make the code cleaner.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Fix ioremapped size</title>
<updated>2018-10-05T08:20:32Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c925b333368cda4e1b0513b07f72316c0e7edd7'/>
<id>urn:sha1:6c925b333368cda4e1b0513b07f72316c0e7edd7</id>
<content type='text'>
We should only iomap the area of the chip that is memory mapped.
Otherwise we could be mapping devices beyond the memory space or that
belong to other devices.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: maps: gpio-addr-flash: Replace custom printk</title>
<updated>2018-10-05T08:20:31Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34cb1e31890c97d0ee89755d5f2833737fa30a03'/>
<id>urn:sha1:34cb1e31890c97d0ee89755d5f2833737fa30a03</id>
<content type='text'>
Use preferred print methods dev_*

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: physmap_of: Release resources on error</title>
<updated>2018-10-05T08:19:33Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T13:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef0de747f7ad179c7698a5b0e28db05f18ecbf57'/>
<id>urn:sha1:ef0de747f7ad179c7698a5b0e28db05f18ecbf57</id>
<content type='text'>
During probe, if there was an error the memory region and the memory
map were not properly released.This can lead a system unusable if
deferred probe is in use.

Replace mem_request and map with devm_ioremap_resource

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: physmap_of: Remove unused struct of_device_id</title>
<updated>2018-10-04T11:44:26Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2018-10-04T10:08:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e42e175ae319fd67b3969da7537e0ef7eab4fe6b'/>
<id>urn:sha1:e42e175ae319fd67b3969da7537e0ef7eab4fe6b</id>
<content type='text'>
This struct does not seem to be used anywhere on the code

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd/maps: fix solutionengine.c printk format warnings</title>
<updated>2018-07-24T20:43:10Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-07-24T18:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d25e3eeed1d987404e2d2e451eebac8c15cecc1'/>
<id>urn:sha1:1d25e3eeed1d987404e2d2e451eebac8c15cecc1</id>
<content type='text'>
Fix 2 printk format warnings (this driver is currently only used by
arch/sh/) by using "%pap" instead of "%lx".

Fixes these build warnings:

../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps':
../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here
  printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
                                                  ~~~~^
                                                  %08x
../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here
  printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
                                                                    ~~~~^
                                                                    %08x

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Cc: Marek Vasut &lt;marek.vasut@gmail.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: linux-mtd@lists.infradead.org
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: linux-sh@vger.kernel.org
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
</feed>
