mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Levente Kurusa <levex@linux.com>
To: Doron Tsur <doront@mellanox.com>, linux-kernel@vger.kernel.org
Cc: itaib@mellanox.com
Subject: Re: [PATCH] include/uapi/linux/netlink.h -Wall -Wextra -Werror support fix
Date: Sun, 15 Dec 2013 15:52:47 +0100	[thread overview]
Message-ID: <52ADC23F.3040302@linux.com> (raw)
In-Reply-To: <1387118409-30636-1-git-send-email-doront@mellanox.com>

On 12/15/2013 03:40 PM, Doron Tsur wrote:
> For code using:
>     #include <linux/netlink.h>
>     NLMSG_OK
>     -I<INSTALL_HDR_PATH>/include
> 
> Tested-by: Doron Tsur <doront@mellanox.com>
This should go where your Signed-off-by line is.

[insert newlines here]
> Test log:
> Compilation environments:
> Ubuntu 13.10, x86_64, gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
> Ubuntu 13.04, x86_64, gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
> [ -ftrack-macro-expansion=2 issue submitted:
>   gcc.gnu.org/bugzilla/show_bug.cgi?id=59495 ]


[insert newlines here]
> Kernel headers installed at:
> make -C .../linux-stable headers_install \
>     INSTALL_HDR_PATH=/builds/kernel_tests_user_headers/


[insert newlines here]
> Pre-patch compilation:
> gcc -Wall -Wextra -Werror
> -I/builds/kernel_tests_pre_patch_user_headers/include
> include-uapi-linux-netlink.h.test.c
> In file included from include-uapi-linux-netlink.h.test.c:2:0:
> include-uapi-linux-netlink.h.test.c: In function ‘main’:
> /builds/kernel_tests_pre_patch_user_headers/include/linux/netlink.h:89:24:
> error: comparison between signed and unsigned integer expressions
> [-Werror=sign-compare]
>        (nlh)->nlmsg_len <= (len))
>                         ^
> include-uapi-linux-netlink.h.test.c:26:5: note: in expansion of macro ‘NLMSG_OK’
>      NLMSG_OK(&auxiliary_netlink_header, active_len));
>      ^
> cc1: all warnings being treated as errors


[insert newlines here]
> Post-patch:
> $ gcc  -Wall -Wextra -Werror
> -I/builds/kernel_tests_user_headers/include/
> include-uapi-linux-netlink.h.test.c


[insert newlines here]
> $ ./a.out
> nlmsg_len= 1, len = 1 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 1, len = 3000 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 3000, len = 1 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 3000, len = 3000 NLMSG_OK(nlh,len) test result: 1
> 
> Signed-off-by: Doron Tsur <doront@mellanox.com>

Please make your commit message understandable by adding newlines and such.
Also it doesn't say what did you change and why. All it says, that there
was a warning and post-patch there is no warning.

-- 
Regards,
Levente Kurusa

  reply	other threads:[~2013-12-15 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 14:40 Doron Tsur
2013-12-15 14:52 ` Levente Kurusa [this message]
2013-12-15 17:29 Doron Tsur
2013-12-15 17:31 Doron Tsur

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=52ADC23F.3040302@linux.com \
    --to=levex@linux.com \
    --cc=doront@mellanox.com \
    --cc=itaib@mellanox.com \
    --cc=linux-kernel@vger.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®