From: Doug Ledford <dledford@redhat.com>
To: Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Faisal Latif
<faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Shiraz Saleem
<shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Hal Rosenstock
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] i40iw: silence an uninitialized variable warning
Date: Tue, 24 Jan 2017 21:24:49 +0000 [thread overview]
Message-ID: <1485293089.43764.76.camel@redhat.com> (raw)
In-Reply-To: <20170118103452.GA12778@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Wed, 2017-01-18 at 13:34 +0300, Dan Carpenter wrote:
> These can be used without being uninitialized but it's only a
> printk()
> so it's not the end of the world.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c
> b/drivers/infiniband/hw/i40iw/i40iw_main.c
> index 2728af3..7b78a17 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_main.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
> @@ -561,7 +561,7 @@ static enum i40iw_status_code
> i40iw_create_cqp(struct i40iw_device *iwdev)
> struct i40iw_sc_dev *dev = &iwdev->sc_dev;
> struct i40iw_cqp_init_info cqp_init_info;
> struct i40iw_cqp *cqp = &iwdev->cqp;
> - u16 maj_err, min_err;
> + u16 maj_err = 0, min_err = 0;
> int i;
>
> cqp->cqp_requests = kcalloc(sqsize, sizeof(*cqp-
> >cqp_requests), GFP_KERNEL);
Thanks for the patch, but I dropped this in in lieu of the patch to
make cqp_create always set both error codes.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Faisal Latif
<faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Shiraz Saleem
<shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Hal Rosenstock
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] i40iw: silence an uninitialized variable warning
Date: Tue, 24 Jan 2017 16:24:49 -0500 [thread overview]
Message-ID: <1485293089.43764.76.camel@redhat.com> (raw)
In-Reply-To: <20170118103452.GA12778@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
On Wed, 2017-01-18 at 13:34 +0300, Dan Carpenter wrote:
> These can be used without being uninitialized but it's only a
> printk()
> so it's not the end of the world.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c
> b/drivers/infiniband/hw/i40iw/i40iw_main.c
> index 2728af3..7b78a17 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_main.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
> @@ -561,7 +561,7 @@ static enum i40iw_status_code
> i40iw_create_cqp(struct i40iw_device *iwdev)
> struct i40iw_sc_dev *dev = &iwdev->sc_dev;
> struct i40iw_cqp_init_info cqp_init_info;
> struct i40iw_cqp *cqp = &iwdev->cqp;
> - u16 maj_err, min_err;
> + u16 maj_err = 0, min_err = 0;
> int i;
>
> cqp->cqp_requests = kcalloc(sqsize, sizeof(*cqp-
> >cqp_requests), GFP_KERNEL);
Thanks for the patch, but I dropped this in in lieu of the patch to
make cqp_create always set both error codes.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-01-24 21:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 10:34 [patch] i40iw: silence an uninitialized variable warning Dan Carpenter
2017-01-18 10:34 ` Dan Carpenter
2017-01-18 11:19 ` Yuval Shaia
2017-01-18 11:19 ` Yuval Shaia
2017-01-24 21:24 ` Doug Ledford [this message]
2017-01-24 21:24 ` 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=1485293089.43764.76.camel@redhat.com \
--to=dledford@redhat.com \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.