staging: qlge: Deduplicate rx buffer queue management
authorBenjamin Poirier <bpoirier@suse.com>
Fri, 27 Sep 2019 10:12:02 +0000 (19:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 15:17:45 +0000 (17:17 +0200)
commit03a0e14bd8bc8df2ea478b336ee65f429375acbb
tree2d7cded40590eb81407ff934047d5466f3506ea6
parentcf1c2987bfd890a9c4ef3f174ed6148ec9b2b622
staging: qlge: Deduplicate rx buffer queue management

The qlge driver (and device) uses two kinds of buffers for reception,
so-called "small buffers" and "large buffers". The two are arranged in
rings, the sbq and lbq. These two share similar data structures and code.

Factor out data structures into a common struct qlge_bq, make required
adjustments to code and dedup the most obvious cases of copy/paste.

This patch should not introduce any functional change other than to some of
the printk format strings.

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Link: https://lore.kernel.org/r/20190927101210.23856-9-bpoirier@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge.h
drivers/staging/qlge/qlge_dbg.c
drivers/staging/qlge/qlge_main.c