gfs2_glops_list duplicate initialiser

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dr. David Alan Gilbert
Date: Tuesday, October 5, 2010 - 5:59 pm

Hi Steven,
  I was running sparse on the current main kernel git tree and
it spotted:

fs/gfs2/glops.c:456:10: warning: Initializer entry defined twice
fs/gfs2/glops.c:459:10:   also defined here

That's:
const struct gfs2_glock_operations *gfs2_glops_list[] = {
        [LM_TYPE_META] = &gfs2_meta_glops,
        [LM_TYPE_INODE] = &gfs2_inode_glops,
        [LM_TYPE_RGRP] = &gfs2_rgrp_glops,
        [LM_TYPE_NONDISK] = &gfs2_trans_glops,
        [LM_TYPE_IOPEN] = &gfs2_iopen_glops,
        [LM_TYPE_FLOCK] = &gfs2_flock_glops,
        [LM_TYPE_NONDISK] = &gfs2_nondisk_glops,
        [LM_TYPE_QUOTA] = &gfs2_quota_glops,
        [LM_TYPE_JOURNAL] = &gfs2_journal_glops,
};

The two separate assignments with the index of LM_TYPE_NONDISK are
as it says a bit odd; it's not obvious to me what the right
index is for the thing that is assigned &gfs2_trans_glops.

Dave
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
gfs2_glops_list duplicate initialiser, Dr. David Alan Gilbert, (Tue Oct 5, 5:59 pm)
Re: gfs2_glops_list duplicate initialiser, Steven Whitehouse, (Wed Oct 6, 2:32 am)