[ATM]: atm_pcr_goal() doesn't modify its argument's contents -- mark it as const
authorMitchell Blank Jr <mitch@sfgoth.com>
Wed, 30 Nov 2005 00:13:55 +0000 (16:13 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2005 00:13:55 +0000 (16:13 -0800)
Signed-off-by: Mitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/atmdev.h
net/atm/atm_misc.c

index e7d0593bb5766c908c906aa9528541512187b266..37e5ee4853999deba41802990843be521b60e848 100644 (file)
@@ -468,7 +468,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
 int atm_charge(struct atm_vcc *vcc,int truesize);
 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
     gfp_t gfp_flags);
-int atm_pcr_goal(struct atm_trafprm *tp);
+int atm_pcr_goal(const struct atm_trafprm *tp);
 
 void vcc_release_async(struct atm_vcc *vcc, int reply);
 
index 223c7ad5bd0f7a3d524e73667c11aa35edae6733..02cc7e71efea24e36fbe78a5e43ee6e7122f3b64 100644 (file)
@@ -74,11 +74,14 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
  */
 
 
-int atm_pcr_goal(struct atm_trafprm *tp)
+int atm_pcr_goal(const struct atm_trafprm *tp)
 {
-       if (tp->pcr && tp->pcr != ATM_MAX_PCR) return -tp->pcr;
-       if (tp->min_pcr && !tp->pcr) return tp->min_pcr;
-       if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr;
+       if (tp->pcr && tp->pcr != ATM_MAX_PCR)
+               return -tp->pcr;
+       if (tp->min_pcr && !tp->pcr)
+               return tp->min_pcr;
+       if (tp->max_pcr != ATM_MAX_PCR)
+               return -tp->max_pcr;
        return 0;
 }