<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/genl_magic_struct.h, branch v4.9.173</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.173</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.173'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-02-12T18:44:56Z</updated>
<entry>
<title>drbd: Avoid Clang warning about pointless switch statment</title>
<updated>2019-02-12T18:44:56Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2018-12-20T16:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c9fd3741c4c70554ae2758a5f3f6d70b29c32270'/>
<id>urn:sha1:c9fd3741c4c70554ae2758a5f3f6d70b29c32270</id>
<content type='text'>
[ Upstream commit a52c5a16cf19d8a85831bb1b915a221dd4ffae3c ]

There are several warnings from Clang about no case statement matching
the constant 0:

In file included from drivers/block/drbd/drbd_receiver.c:48:
In file included from drivers/block/drbd/drbd_int.h:48:
In file included from ./include/linux/drbd_genl_api.h:54:
In file included from ./include/linux/genl_magic_struct.h:236:
./include/linux/drbd_genl.h:321:1: warning: no case matching constant
switch condition '0'
GENL_struct(DRBD_NLA_HELPER, 24, drbd_helper_info,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/genl_magic_struct.h:220:10: note: expanded from macro
'GENL_struct'
        switch (0) {
                ^

Silence this warning by adding a 'case 0:' statement. Additionally,
adjust the alignment of the statements in the ct_assert_unique macro to
avoid a checkpatch warning.

This solution was originally sent by Arnd Bergmann with a default case
statement: https://lore.kernel.org/patchwork/patch/756723/

Link: https://github.com/ClangBuiltLinux/linux/issues/43
Suggested-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>block/drbd: align properly u64 in nl messages</title>
<updated>2016-05-10T19:43:09Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2016-05-09T09:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1dee3f59a8d5e711797dc82628aaf94a64e99922'/>
<id>urn:sha1:1dee3f59a8d5e711797dc82628aaf94a64e99922</id>
<content type='text'>
The attribute 0 is never used in drbd, so let's use it as pad attribute
in netlink messages. This minimizes the patch.

Note that this patch is only compile-tested.

Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drbd: Stop using NLA_PUT*().</title>
<updated>2012-11-08T15:58:30Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-07-11T18:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1'/>
<id>urn:sha1:26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1</id>
<content type='text'>
These macros no longer exist in kernel version v3.5-rc1.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Make drbd's use of netlink attribute flags less confusing</title>
<updated>2012-11-08T15:55:55Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-19T15:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f9359201b5cf1d94fe0e0c47fcba38cfc921863'/>
<id>urn:sha1:5f9359201b5cf1d94fe0e0c47fcba38cfc921863</id>
<content type='text'>
Make it more clear in the flag names which flags are internal to drbd, and
which are not.

The check for mandatory attributes is the only extension visible at the netlink
layer.  Attributes with this flag set would look like unknown attributes to
some kernel versions.  The netlink layer would ignore them and also skip
consistency checks on the attribute type and legth.  To avoid this, we check
for mandatory attributes first, remove the mandatory flag, and then process the
attributes normally.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Remove unused GENLA_F_MAY_IGNORE flag</title>
<updated>2012-11-08T15:55:55Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-18T14:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bbbef2d5ad8203f67274196dac90754ae106a463'/>
<id>urn:sha1:bbbef2d5ad8203f67274196dac90754ae106a463</id>
<content type='text'>
Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Output signed / unsigned netlink fields correctly</title>
<updated>2012-11-08T15:55:55Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-17T11:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=509100e6012db92f4af3796436b450447c6c8268'/>
<id>urn:sha1:509100e6012db92f4af3796436b450447c6c8268</id>
<content type='text'>
Note: All input values are still treated as signed; unsigned long long values
are still broken.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Convert resync-after into a signed netlink field</title>
<updated>2012-11-08T15:55:51Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-12T10:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a45abd577727d2268e190d372600f8652883453'/>
<id>urn:sha1:3a45abd577727d2268e190d372600f8652883453</id>
<content type='text'>
Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Convert boolean flags on netlink from NLA_FLAG to NLA_U8</title>
<updated>2012-11-08T15:55:45Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-04T14:06:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5d8e1fb9d22851de89bbf52db6b11c56b895dd4'/>
<id>urn:sha1:a5d8e1fb9d22851de89bbf52db6b11c56b895dd4</id>
<content type='text'>
Flags of type NLA_FLAG are either present or absent, but do not have a
value by themselves.  Use type NLA_U8 for our boolean flags instead, and
use the value to determine if the flag should be on or off.

On the drbdsetup command line, all those flags have an optional yes/no
argument which defaults to yes.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Introduce __s32_field in the genetlink macro magic</title>
<updated>2012-11-08T15:55:43Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2011-05-04T08:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=563e4cf25ec804eb02cd30a41baa2fcc6c06679b'/>
<id>urn:sha1:563e4cf25ec804eb02cd30a41baa2fcc6c06679b</id>
<content type='text'>
...and drop explicit typecasts (int)meta_dev_idx &lt; 0.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Generate the drbd_set_*_defaults() functions from drbd_genl.h</title>
<updated>2012-11-08T15:55:38Z</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2011-05-03T12:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b966b5dd8e17e6c105ca55533fd412de5d5b429e'/>
<id>urn:sha1:b966b5dd8e17e6c105ca55533fd412de5d5b429e</id>
<content type='text'>
Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
</feed>
