Stephen Hemminger writes:
 > Use const where possible and get rid of EXTRACT() macro
 > that was never used.

 Thanks. 

 Cheers. 
                                                --ro

 Signed-off-by: Robert Olsson <[EMAIL PROTECTED]>

 > Signed-off-by: Stephen Hemmigner <[EMAIL PROTECTED]>
 > 
 > Index: fib/net/ipv4/fib_trie.c
 > ===================================================================
 > --- fib.orig/net/ipv4/fib_trie.c
 > +++ fib/net/ipv4/fib_trie.c
 > @@ -77,7 +77,6 @@
 >  #undef CONFIG_IP_FIB_TRIE_STATS
 >  #define MAX_CHILDS 16384
 >  
 > -#define EXTRACT(p, n, str) ((str)<<(p)>>(32-(n)))
 >  #define KEYLENGTH (8*sizeof(t_key))
 >  #define MASK_PFX(k, l) (((l)==0)?0:(k >> (KEYLENGTH-l)) << (KEYLENGTH-l))
 >  #define TKEY_GET_MASK(offset, bits) (((bits)==0)?0:((t_key)(-1) << 
 > (KEYLENGTH - bits) >> offset))
 > @@ -158,10 +157,8 @@ struct trie {
 >      unsigned int revision;
 >  };
 >  
 > -static int tnode_full(struct tnode *tn, struct node *n);
 >  static void put_child(struct trie *t, struct tnode *tn, int i, struct node 
 > *n);
 >  static void tnode_put_child_reorg(struct tnode *tn, int i, struct node *n, 
 > int wasfull);
 > -static int tnode_child_length(struct tnode *tn);
 >  static struct node *resize(struct trie *t, struct tnode *tn);
 >  static struct tnode *inflate(struct trie *t, struct tnode *tn);
 >  static struct tnode *halve(struct trie *t, struct tnode *tn);
 > @@ -184,7 +181,7 @@ static inline struct node *tnode_get_chi
 >          return tn->child[i];
 >  }
 >  
 > -static inline int tnode_child_length(struct tnode *tn)
 > +static inline int tnode_child_length(const struct tnode *tn)
 >  {
 >          return 1<<tn->bits;
 >  }
 > @@ -409,7 +406,7 @@ static void tnode_free(struct tnode *tn)
 >   * and no bits are skipped. See discussion in dyntree paper p. 6
 >   */
 >  
 > -static inline int tnode_full(struct tnode *tn, struct node *n)
 > +static inline int tnode_full(const struct tnode *tn, const struct node *n)
 >  {
 >      if (n == NULL || IS_LEAF(n))
 >              return 0;
 > 
 > --
 > 
 > -
 > To unsubscribe from this list: send the line "unsubscribe netdev" in
 > the body of a message to [EMAIL PROTECTED]
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to