* [PATCH] fs/bio.c: initialize variable, remove warning
@ 2006-05-01 20:55 Petri T. Koistinen
2006-05-01 21:05 ` Alexey Dobriyan
2006-05-02 0:22 ` Al Viro
0 siblings, 2 replies; 5+ messages in thread
From: Petri T. Koistinen @ 2006-05-01 20:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: trivial, linux-kernel
From: Petri T. Koistinen <petri.koistinen@iki.fi>
Remove compiler warning by initializing uninitialized variable.
Signed-off-by: Petri T. Koistinen <petri.koistinen@iki.fi>
---
fs/bio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/fs/bio.c b/fs/bio.c
index eb8fbc5..c4deed9 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
bio_init(bio);
if (likely(nr_iovecs)) {
- unsigned long idx;
+ unsigned long idx = 0;
bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
if (unlikely(!bvl)) {
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] fs/bio.c: initialize variable, remove warning
2006-05-01 20:55 [PATCH] fs/bio.c: initialize variable, remove warning Petri T. Koistinen
@ 2006-05-01 21:05 ` Alexey Dobriyan
2006-05-01 21:19 ` Bob Copeland
2006-05-02 0:22 ` Al Viro
1 sibling, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2006-05-01 21:05 UTC (permalink / raw)
To: Petri T. Koistinen; +Cc: Andrew Morton, trivial, linux-kernel
On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> Remove compiler warning by initializing uninitialized variable.
> --- a/fs/bio.c
> +++ b/fs/bio.c
> @@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
>
> bio_init(bio);
> if (likely(nr_iovecs)) {
> - unsigned long idx;
> + unsigned long idx = 0;
oh no not again!
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] fs/bio.c: initialize variable, remove warning
2006-05-01 21:05 ` Alexey Dobriyan
@ 2006-05-01 21:19 ` Bob Copeland
2006-05-02 5:27 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Bob Copeland @ 2006-05-01 21:19 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Petri T. Koistinen, Andrew Morton, trivial, linux-kernel
On 5/1/06, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> > Remove compiler warning by initializing uninitialized variable.
>
> oh no not again!
What about:
> > - unsigned long idx;
+ unsigned long idx; /* please don't patch bogus
warning */
:)
-Bob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fs/bio.c: initialize variable, remove warning
2006-05-01 21:19 ` Bob Copeland
@ 2006-05-02 5:27 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2006-05-02 5:27 UTC (permalink / raw)
To: Bob Copeland
Cc: Alexey Dobriyan, Petri T. Koistinen, Andrew Morton, trivial,
linux-kernel
On Mon, May 01 2006, Bob Copeland wrote:
> On 5/1/06, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> >> Remove compiler warning by initializing uninitialized variable.
> >
> >oh no not again!
>
> What about:
>
> >> - unsigned long idx;
> + unsigned long idx; /* please don't patch bogus
> warning */
I'll take that patch if you send it :-)
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fs/bio.c: initialize variable, remove warning
2006-05-01 20:55 [PATCH] fs/bio.c: initialize variable, remove warning Petri T. Koistinen
2006-05-01 21:05 ` Alexey Dobriyan
@ 2006-05-02 0:22 ` Al Viro
1 sibling, 0 replies; 5+ messages in thread
From: Al Viro @ 2006-05-02 0:22 UTC (permalink / raw)
To: Petri T. Koistinen; +Cc: Andrew Morton, trivial, linux-kernel
On Mon, May 01, 2006 at 11:55:27PM +0300, Petri T. Koistinen wrote:
> From: Petri T. Koistinen <petri.koistinen@iki.fi>
>
> Remove compiler warning by initializing uninitialized variable.
NAK. Unless you can show the path where it is used uninitialized,
such patches should not go in.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-02 5:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 20:55 [PATCH] fs/bio.c: initialize variable, remove warning Petri T. Koistinen
2006-05-01 21:05 ` Alexey Dobriyan
2006-05-01 21:19 ` Bob Copeland
2006-05-02 5:27 ` Jens Axboe
2006-05-02 0:22 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox