Skip to content

Commit

Permalink
[ATM]: atm_pcr_goal() doesn't modify its argument's contents -- mark …
Browse files Browse the repository at this point in the history
…it as const

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>
  • Loading branch information
Mitchell Blank Jr authored and David S. Miller committed Nov 30, 2005
1 parent c9933d0 commit c219750
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/linux/atmdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
11 changes: 7 additions & 4 deletions net/atm/atm_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c219750

Please sign in to comment.