mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roy Marples <roy@marples.name>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, trivial@kernel.org
Subject: [PATCH] netlink: Align NLA_ALIGNTO with the other ALIGNTO macros
Date: Tue, 17 Dec 2019 14:50:50 +0000	[thread overview]
Message-ID: <cf7912dd-3352-84d9-653a-86dcc1696a62@marples.name> (raw)

This avoids sign conversion errors.

Signed-off-by: Roy Marples <roy@marples.name>

diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 0a4d73317759..c9ed05f14005 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -227,7 +227,7 @@ struct nlattr {
  #define NLA_F_NET_BYTEORDER    (1 << 14)
  #define NLA_TYPE_MASK          ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)

-#define NLA_ALIGNTO            4
+#define NLA_ALIGNTO            4U
  #define NLA_ALIGN(len)         (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
  #define NLA_HDRLEN             ((int) NLA_ALIGN(sizeof(struct nlattr)))


                 reply	other threads:[~2019-12-17 14:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf7912dd-3352-84d9-653a-86dcc1696a62@marples.name \
    --to=roy@marples.name \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®