Re: [PATCH 4/7] staging: et131x: reduce split lines in nic_return_rfd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 06, 2013 at 08:40:17PM +0000, Mark Einon wrote:
> On Fri, Dec 06, 2013 at 09:35:03PM +0800, ZHAO Gang wrote:
> > Signed-off-by: ZHAO Gang <gamerh2o@xxxxxxxxx>
> > ---
> >  drivers/staging/et131x/et131x.c | 20 +++++++++++---------
> >  1 file changed, 11 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
> > index b6ce68e..3e34c2e 100644
> > --- a/drivers/staging/et131x/et131x.c
> > +++ b/drivers/staging/et131x/et131x.c
> > @@ -2505,8 +2505,12 @@ static void nic_return_rfd(struct et131x_adapter *adapter, struct rfd *rfd)
> >  	 * need to clean up OOB data
> >  	 */
> >  	if (buff_index < rx_local->fbr[ring_index]->num_entries) {
> > +		u32 free_buff_ring;
> >  		u32 __iomem *offset;
> >  		struct fbr_desc *next;
> > +		struct fbr_lookup *fbr;
> > +
> > +		fbr = rx_local->fbr[ring_index];
> 
> This can be written as one line instead of three. The rest of the patch
> is good.

Actually, you can also define *fbr at the top of the function and use it to change:

  	if (buff_index < rx_local->fbr[ring_index]->num_entries) {
to
  	if (buff_index < fbr->num_entries) {

Cheers,

Mark


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux