From patchwork Mon Dec 13 17:05:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A. Shutemov" X-Patchwork-Id: 75381 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DD2C1B6EE8 for ; Tue, 14 Dec 2010 04:06:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200Ab0LMRFe (ORCPT ); Mon, 13 Dec 2010 12:05:34 -0500 Received: from shutemov.name ([188.40.19.243]:54682 "EHLO shutemov.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932138Ab0LMRFd (ORCPT ); Mon, 13 Dec 2010 12:05:33 -0500 Received: by shutemov.name (Postfix, from userid 500) id F0F66D417C; Mon, 13 Dec 2010 19:05:32 +0200 (EET) From: "Kirill A. Shutsemov" To: "David S. Miller" Cc: netdev@vger.kernel.org, Pablo Neira Ayuso , "Eric W. Biederman" , "Dmitry V. Levin" , linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH] netlink: fix gcc -Wconversion compilation warning Date: Mon, 13 Dec 2010 19:05:13 +0200 Message-Id: <1292259913-9911-1-git-send-email-kirill@shutemov.name> X-Mailer: git-send-email 1.7.2.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dmitry V. Levin $ cat << EOF | gcc -Wconversion -xc -S -o/dev/null - unsigned f(void) {return NLMSG_HDRLEN;} EOF : In function 'f': :3:26: warning: negative integer implicitly converted to unsigned type Signed-off-by: Dmitry V. Levin Signed-off-by: Kirill A. Shutemov --- include/linux/netlink.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 1235669..e2b9e63 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -70,7 +70,7 @@ struct nlmsghdr { Check NLM_F_EXCL */ -#define NLMSG_ALIGNTO 4 +#define NLMSG_ALIGNTO 4U #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))