Commit c219750b authored by Mitchell Blank Jr's avatar Mitchell Blank Jr Committed by David S. Miller

[ATM]: atm_pcr_goal() doesn't modify its argument's contents -- mark it as const

Signed-off-by: default avatarMitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c9933d08
...@@ -468,7 +468,7 @@ static inline void atm_dev_put(struct atm_dev *dev) ...@@ -468,7 +468,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
int atm_charge(struct atm_vcc *vcc,int truesize); int atm_charge(struct atm_vcc *vcc,int truesize);
struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
gfp_t gfp_flags); 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); void vcc_release_async(struct atm_vcc *vcc, int reply);
......
...@@ -74,11 +74,14 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, ...@@ -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->pcr && tp->pcr != ATM_MAX_PCR)
if (tp->min_pcr && !tp->pcr) return tp->min_pcr; return -tp->pcr;
if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr; if (tp->min_pcr && !tp->pcr)
return tp->min_pcr;
if (tp->max_pcr != ATM_MAX_PCR)
return -tp->max_pcr;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment