<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/mtd/chips/gen_probe.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/mtd/chips/gen_probe.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/mtd/chips/gen_probe.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-08-27T11:38:18Z</updated>
<entry>
<title>mtd: chips: gen_probe: kill useless initializer in mtd_do_chip_probe()</title>
<updated>2019-08-27T11:38:18Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2019-07-03T20:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f454b43a564fab4aae77c0bbc32072201993c349'/>
<id>urn:sha1:f454b43a564fab4aae77c0bbc32072201993c349</id>
<content type='text'>
The 'mtd' local variable is initialized but this value is never used,
thus kill that initializer.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
</entry>
<entry>
<title>mtd: gen_probe: Use struct_size() in kmalloc()</title>
<updated>2019-01-15T19:49:29Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-01-08T15:36:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9cb76a6aa1a9524866ec1558f08d044506b707fa'/>
<id>urn:sha1:9cb76a6aa1a9524866ec1558f08d044506b707fa</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = kmalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: Use kasprintf() instead of fixed buffer formatting</title>
<updated>2018-07-07T08:53:45Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-06-28T08:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=48360246162b50e84a6e63ed572fdda5e038518b'/>
<id>urn:sha1:48360246162b50e84a6e63ed572fdda5e038518b</id>
<content type='text'>
Using "%4.4X" in the calculation of the buffer size is misleading, as
the format string literal has no relation to the actual size needed.
Hence this is fragile w.r.t. future modification.

As this is not a hot path, fix this by replacing the formatting in a
fixed buffer by kasprintf().

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: replace VMLINUX_SYMBOL_STR() with string literal</title>
<updated>2018-06-24T20:13:34Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-06-23T15:35:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=7a1f1b594a3d102f3766b9866aa081f5480c0be0'/>
<id>urn:sha1:7a1f1b594a3d102f3766b9866aa081f5480c0be0</id>
<content type='text'>
With the special case handling for Blackfin and Metag was removed by
commit 94e58e0ac312 ("export.h: remove code for prefixing symbols with
underscore"), VMLINUX_SYMBOL_STR() can be replaced with string literal.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: gen_probe: Remove unnecessary OOM messages</title>
<updated>2014-03-11T05:42:25Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2014-02-06T06:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c039bef73b80911d938d2f8fce0fccfb9dda7346'/>
<id>urn:sha1:c039bef73b80911d938d2f8fce0fccfb9dda7346</id>
<content type='text'>
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: refactor call to request_module</title>
<updated>2013-08-05T20:01:42Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-07-08T13:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f9827dde2f6a1b64f8241de18ccf5027a636d8f4'/>
<id>urn:sha1:f9827dde2f6a1b64f8241de18ccf5027a636d8f4</id>
<content type='text'>
This reduces the size of the stack frame when calling request_module().
Performing the sprintf before the call is not needed.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reviewed-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>CONFIG_SYMBOL_PREFIX: cleanup.</title>
<updated>2013-03-15T04:39:43Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2013-03-15T04:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b92021b09df70c1609e3547f3d6128dd560be97f'/>
<id>urn:sha1:b92021b09df70c1609e3547f3d6128dd560be97f</id>
<content type='text'>
We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
"_".  But Al Viro broke this in "consolidate cond_syscall and
SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
do so.

Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
prefix it so something.  So various places define helpers which are
defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
   CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
   for pasting.

(arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

Let's solve this properly:
1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
2) Make linux/export.h usable from asm.
3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
4) Make everyone use them.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reviewed-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Tested-by: James Hogan &lt;james.hogan@imgtec.com&gt; (metag)
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips</title>
<updated>2010-05-20T15:57:00Z</updated>
<author>
<name>Guillaume LECERF</name>
<email>glecerf@gmail.com</email>
</author>
<published>2010-05-20T14:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8046112818b70329e930b1d4557ef0876c1ad2bb'/>
<id>urn:sha1:8046112818b70329e930b1d4557ef0876c1ad2bb</id>
<content type='text'>
Tested with W19L320SBT9C [1].

[1] http://www.datasheetarchive.com/pdf-datasheets/Datasheets-40/DSA-795343.pdf

[dwmw2: Fix MODULE_ALIAS and linkage]
Signed-off-by: Obinou &lt;obconseil@gmail.com&gt;
Signed-off-by: Guillaume LECERF &lt;glecerf@gmail.com&gt;
Acked-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: add CFI detection for SST 39VF{16, 32}xx chips</title>
<updated>2010-05-14T00:39:23Z</updated>
<author>
<name>Guillaume LECERF</name>
<email>glecerf@gmail.com</email>
</author>
<published>2010-04-24T15:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=83dcd3bb1139060fedb15235f8614d2bac82e18d'/>
<id>urn:sha1:83dcd3bb1139060fedb15235f8614d2bac82e18d</id>
<content type='text'>
SST 39VF{16,32}xx chips use the 0x0701 command set, fully compatible
with the AMD one. This patch adds support for detecting them in CFI
mode.

Signed-off-by: Guillaume LECERF &lt;glecerf@gmail.com&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: cfi_probe: use P_ID_* definitions instead of hardcoded values</title>
<updated>2010-05-14T00:08:19Z</updated>
<author>
<name>Guillaume LECERF</name>
<email>glecerf@gmail.com</email>
</author>
<published>2010-04-24T15:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=58598861227877bb481b9035d2a07283577a2274'/>
<id>urn:sha1:58598861227877bb481b9035d2a07283577a2274</id>
<content type='text'>
Use P_ID_* definitions already in include/linux/mtd/cfi.h instead of the
hardcoded values. Make the code more readable.

Signed-off-by: Guillaume LECERF &lt;glecerf@gmail.com&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
</feed>
