aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-09 12:28:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-09 12:28:46 +0000
commit548879cdc1da0a74d4ca998e8eaf89f37ec7b31b (patch)
treed619f0c488fbb55569d3b44804b32bf95ea71b8d /target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
parentce28e880c9bdb5725d6dedf7efdb7bd4970361d1 (diff)
downloadmaster-187ad058-548879cdc1da0a74d4ca998e8eaf89f37ec7b31b.tar.gz
master-187ad058-548879cdc1da0a74d4ca998e8eaf89f37ec7b31b.tar.bz2
master-187ad058-548879cdc1da0a74d4ca998e8eaf89f37ec7b31b.zip
ar71xx: improve ethernet driver cache footprint by removing an unnecessary pointer
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43588 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
index 757a572b00..c480121040 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_debugfs.c
@@ -183,6 +183,7 @@ static ssize_t read_file_ring(struct file *file, char __user *user_buf,
desc_hw = ag71xx_rr(ag, desc_reg);
for (i = 0; i < ring->size; i++) {
struct ag71xx_buf *ab = &ring->buf[i];
+ struct ag71xx_desc *desc = ag71xx_ring_desc(ring, i);
u32 desc_dma = ((u32) ring->descs_dma) + i * ring->desc_size;
len += snprintf(buf + len, buflen - len,
@@ -192,10 +193,10 @@ static ssize_t read_file_ring(struct file *file, char __user *user_buf,
(i == dirty) ? 'D' : ' ',
(desc_hw == desc_dma) ? 'H' : ' ',
desc_dma,
- ab->desc->next,
- ab->desc->data,
- ab->desc->ctrl,
- (ab->desc->ctrl & DESC_EMPTY) ? 'E' : '*',
+ desc->next,
+ desc->data,
+ desc->ctrl,
+ (desc->ctrl & DESC_EMPTY) ? 'E' : '*',
ab->timestamp);
}