From: Leon Romanovsky <leon@leon.nu>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-rdma@vger.kernel.org,
Devesh Sharma <devesh.sharma@avagotech.com>,
Doug Ledford <dledford@redhat.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Mitesh Ahuja <mitesh.ahuja@avagotech.com>,
Sean Hefty <sean.hefty@intel.com>,
Selvin Xavier <selvin.xavier@avagotech.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions
Date: Fri, 15 Jan 2016 19:41:50 +0200 [thread overview]
Message-ID: <20160115174150.GD32346@leon.nu> (raw)
In-Reply-To: <56992A2A.4020104@sandisk.com>
On Fri, Jan 15, 2016 at 09:19:38AM -0800, Bart Van Assche wrote:
> On 01/15/2016 09:00 AM, Leon Romanovsky wrote:
> >On Fri, Jan 15, 2016 at 05:24:50PM +0100, SF Markus Elfring wrote:
> >
> >Since, you didn't answer to my original question, I will repeat it again.
> >[Q.] What did you try to achieve by this patch?
>
> Hello Leon,
>
> Have you noticed Dan's reply: "Doing bogus initializations turns off GCC's
> checking for uninitialized variables so it's a bad habit."
Yes and his second part of that message too, that uninitialized
checks in GCC work as not as expected [1, 2].
Stackoverflow site has a lot examples of these types of bugs [3].
These examples together with Dan's suggestion requires from all
reviewers to be extra cautions when removing variable initialization.
[1] https://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
[2] https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=may%20be%20uninitialized
[3] http://stackoverflow.com/questions/27063678/compiler-not-detecting-obviously-uninitialized-variable
>
> Thanks,
>
> Bart.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-15 17:41 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <566ABCD9.1060404@users.sourceforge.net>
2015-12-26 18:39 ` [PATCH 0/6] InfiniBand-ocrdma: Fine-tuning for some function implementations SF Markus Elfring
2015-12-26 18:43 ` [PATCH 1/6] InfiniBand-ocrdma: One variable and jump label less in ocrdma_alloc_ucontext_pd() SF Markus Elfring
2015-12-26 19:41 ` kbuild test robot
2015-12-26 21:28 ` [PATCH v2 1/6] InfiniBand-ocrdma: One " SF Markus Elfring
2016-01-11 13:11 ` Selvin Xavier
[not found] ` <567EDED5.4040201-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2015-12-26 18:45 ` [PATCH 2/6] InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions SF Markus Elfring
2015-12-26 18:47 ` [PATCH 3/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_qp_state_change() SF Markus Elfring
2015-12-26 18:49 ` [PATCH 4/6] InfiniBand-ocrdma: Return a value from a function call in _ocrdma_modify_qp() directly SF Markus Elfring
2016-01-14 17:18 ` [PATCH v3 0/6] InfiniBand-ocrdma: Fine-tuning for some function implementations SF Markus Elfring
2016-01-14 17:43 ` [PATCH v3 2/6] InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions SF Markus Elfring
2016-01-15 13:20 ` Leon Romanovsky
[not found] ` <20160115132014.GC30615-2ukJVAZIZ/Y@public.gmane.org>
2016-01-15 14:50 ` SF Markus Elfring
[not found] ` <56990733.7000506-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-01-15 15:09 ` Leon Romanovsky
[not found] ` <20160115150935.GA32346-2ukJVAZIZ/Y@public.gmane.org>
2016-01-15 15:26 ` SF Markus Elfring
[not found] ` <56990FAC.6000506-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-01-15 15:59 ` Leon Romanovsky
[not found] ` <20160115155938.GB32346-2ukJVAZIZ/Y@public.gmane.org>
2016-01-15 16:10 ` Dan Carpenter
2016-01-15 16:24 ` SF Markus Elfring
[not found] ` <56991D52.8030808-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-01-15 17:00 ` Leon Romanovsky
[not found] ` <20160115170048.GC32346-2ukJVAZIZ/Y@public.gmane.org>
2016-01-15 17:19 ` Bart Van Assche
2016-01-15 17:41 ` Leon Romanovsky [this message]
2016-01-15 18:19 ` SF Markus Elfring
2016-01-16 6:18 ` Leon Romanovsky
[not found] ` <20160116061843.GE32346-2ukJVAZIZ/Y@public.gmane.org>
2016-01-16 8:30 ` SF Markus Elfring
2016-01-14 17:45 ` [PATCH v3 3/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_qp_state_change() SF Markus Elfring
2016-01-14 17:48 ` [PATCH v3 4/6] InfiniBand-ocrdma: Return a value from a function call in _ocrdma_modify_qp() directly SF Markus Elfring
[not found] ` <5697D865.5010507-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-01-14 17:38 ` [PATCH v3 1/6] InfiniBand-ocrdma: One jump label less in ocrdma_alloc_ucontext_pd() SF Markus Elfring
2016-01-14 17:50 ` [PATCH v3 5/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_resize_cq() SF Markus Elfring
2016-01-14 17:51 ` [PATCH v3 6/6] InfiniBand-ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd() SF Markus Elfring
2015-12-26 18:50 ` [PATCH 5/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_resize_cq() SF Markus Elfring
2015-12-26 18:51 ` [PATCH 6/6] InfiniBand-ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd() SF Markus Elfring
2015-12-27 12:36 ` [PATCH 0/2] InfiniBand-iSER: Refactoring for two function implementations SF Markus Elfring
2015-12-27 12:40 ` [PATCH 1/2] InfiniBand-iSER: One jump label less in iser_reg_sig_mr() SF Markus Elfring
2015-12-27 12:41 ` [PATCH 2/2] InfiniBand-iSER-target: One jump label less in isert_reg_sig_mr() SF Markus Elfring
[not found] ` <567FDB4E.2040000-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2015-12-27 12:43 ` [PATCH 0/2] InfiniBand-iSER: Refactoring for two function implementations Leon Romanovsky
2015-12-27 12:52 ` Leon Romanovsky
2016-01-06 18:47 ` Nicholas A. Bellinger
2015-12-27 15:26 ` Sagi Grimberg
2016-08-20 6:01 ` [PATCH] mlx5/core: Use memdup_user() rather than duplicating its implementation SF Markus Elfring
[not found] ` <ceb39933-438d-920d-f294-ea0ce32fd171-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-08-20 9:32 ` walter harms
2016-08-23 0:05 ` David Miller
2016-08-21 17:39 ` [PATCH 0/2] IB/core: Fine-tuning for ib_is_udata_cleared() SF Markus Elfring
2016-08-21 17:42 ` [PATCH 1/2] IB/core: Use memdup_user() rather than duplicating its implementation SF Markus Elfring
[not found] ` <f7bb3caf-81cd-fba9-afc8-5fac72b8a4b3-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-08-21 17:45 ` [PATCH 2/2] IB/core: Delete an unnecessary initialisation in ib_is_udata_cleared() SF Markus Elfring
2016-08-21 18:03 ` [PATCH 0/2] IB/core: Fine-tuning for ib_is_udata_cleared() Joe Perches
[not found] ` <1471802623.3746.1.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2016-08-21 19:51 ` SF Markus Elfring
[not found] ` <683187e0-2e6a-88c0-f87a-9c5f0489370a-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2016-08-21 19:53 ` Joe Perches
[not found] ` <1471809188.3746.18.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2016-08-21 20:15 ` SF Markus Elfring
2016-08-22 9:46 ` Yann Droneaud
[not found] ` <1471859215.2764.24.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2016-08-22 16:30 ` [PATCH v2] IB/core: Use memdup_user() rather than duplicating its implementation SF Markus Elfring
2016-08-23 16:43 ` Doug Ledford
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=20160115174150.GD32346@leon.nu \
--to=leon@leon.nu \
--cc=bart.vanassche@sandisk.com \
--cc=devesh.sharma@avagotech.com \
--cc=dledford@redhat.com \
--cc=elfring@users.sourceforge.net \
--cc=hal.rosenstock@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mitesh.ahuja@avagotech.com \
--cc=sean.hefty@intel.com \
--cc=selvin.xavier@avagotech.com \
/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;
as well as URLs for NNTP newsgroup(s).