* [PATCH 1/1 linux-next] gfs2: fix shadow warning in gfs2_rbm_find()
@ 2015-05-15 21:17 Fabian Frederick
2015-05-18 12:46 ` Bob Peterson
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-05-15 21:17 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, Steven Whitehouse, Bob Peterson, cluster-devel
bi was already declared globally in gfs2_rbm_find()
Use bi_full for this variable in
"Mark bitmap as full and fall through" context.
Also add blank line after declaration.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/gfs2/rgrp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 900e515..fa47af9 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1712,8 +1712,9 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
bitmap_full: /* Mark bitmap as full and fall through */
if ((state == GFS2_BLKST_FREE) && initial_offset == 0) {
- struct gfs2_bitmap *bi = rbm_bi(rbm);
- set_bit(GBF_FULL, &bi->bi_flags);
+ struct gfs2_bitmap *bi_full = rbm_bi(rbm);
+
+ set_bit(GBF_FULL, &bi_full->bi_flags);
}
next_bitmap: /* Find next bitmap in the rgrp */
--
2.4.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 linux-next] gfs2: fix shadow warning in gfs2_rbm_find()
2015-05-15 21:17 [PATCH 1/1 linux-next] gfs2: fix shadow warning in gfs2_rbm_find() Fabian Frederick
@ 2015-05-18 12:46 ` Bob Peterson
0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2015-05-18 12:46 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Steven Whitehouse, cluster-devel
----- Original Message -----
> bi was already declared globally in gfs2_rbm_find()
> Use bi_full for this variable in
> "Mark bitmap as full and fall through" context.
> Also add blank line after declaration.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/gfs2/rgrp.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index 900e515..fa47af9 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -1712,8 +1712,9 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8
> state, u32 *minext,
>
> bitmap_full: /* Mark bitmap as full and fall through */
> if ((state == GFS2_BLKST_FREE) && initial_offset == 0) {
> - struct gfs2_bitmap *bi = rbm_bi(rbm);
> - set_bit(GBF_FULL, &bi->bi_flags);
> + struct gfs2_bitmap *bi_full = rbm_bi(rbm);
> +
> + set_bit(GBF_FULL, &bi_full->bi_flags);
> }
>
> next_bitmap: /* Find next bitmap in the rgrp */
> --
> 2.4.0
Hi,
In this case, I think it makes more sense to just eliminate the extra
declare of bi and just use the function-global bi to set GBF_FULL.
Regards,
Bob Peterson
Red Hat File Systems
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-18 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 21:17 [PATCH 1/1 linux-next] gfs2: fix shadow warning in gfs2_rbm_find() Fabian Frederick
2015-05-18 12:46 ` Bob Peterson
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).