Skip to content

Commit

Permalink
agp: remove unused variable mcapndx
Browse files Browse the repository at this point in the history
This patch fix the following warning:
drivers/char/agp/isoch.c: In function ‘agp_3_5_isochronous_node_enable’:
drivers/char/agp/isoch.c:87:5: warning: variable ‘mcapndx’ set but not
used [-Wunused-but-set-variable]
  u8 mcapndx;
     ^~~~~~~

Signed-off-by: Yunfeng Ye <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
yeyunfeng-dev authored and airlied committed Jan 3, 2020
1 parent 866bd5e commit 2fec966
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/char/agp/isoch.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
unsigned int cdev = 0;
u32 mnistat, tnistat, tstatus, mcmd;
u16 tnicmd, mnicmd;
u8 mcapndx;
u32 tot_bw = 0, tot_n = 0, tot_rq = 0, y_max, rq_isoch, rq_async;
u32 step, rem, rem_isoch, rem_async;
int ret = 0;
Expand Down Expand Up @@ -138,8 +137,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
cur = list_entry(pos, struct agp_3_5_dev, list);
dev = cur->dev;

mcapndx = cur->capndx;

pci_read_config_dword(dev, cur->capndx+AGPNISTAT, &mnistat);

master[cdev].maxbw = (mnistat >> 16) & 0xff;
Expand Down Expand Up @@ -251,8 +248,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
cur = master[cdev].dev;
dev = cur->dev;

mcapndx = cur->capndx;

master[cdev].rq += (cdev == ndevs - 1)
? (rem_async + rem_isoch) : step;

Expand Down

0 comments on commit 2fec966

Please sign in to comment.