Skip to content

Commit 6629542

Browse files
committed
md/raid6: kill a gcc-4.0.1 'uninitialized variable' warning
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent b2141e6 commit 6629542

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/md/raid5.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,16 @@ static inline int raid6_next_disk(int disk, int raid_disks)
156156
static int raid6_idx_to_slot(int idx, struct stripe_head *sh,
157157
int *count, int syndrome_disks)
158158
{
159-
int slot;
159+
int slot = *count;
160160

161161
if (sh->ddf_layout)
162-
slot = (*count)++;
162+
(*count)++;
163163
if (idx == sh->pd_idx)
164164
return syndrome_disks;
165165
if (idx == sh->qd_idx)
166166
return syndrome_disks + 1;
167167
if (!sh->ddf_layout)
168-
slot = (*count)++;
168+
(*count)++;
169169
return slot;
170170
}
171171

0 commit comments

Comments
 (0)