Changeset a35b458 in mainline for uspace/drv/nic/rtl8139/driver.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    r3061bc1 ra35b458  
    156156            | rtl8139->rcr_data.defect_mask |
    157157            (RXBUF_SIZE_FLAGS << RCR_RBLEN_SHIFT);
    158        
     158
    159159        ddf_msg(LVL_DEBUG, "Rewriting rcr: %x -> %x", pio_read_32(rtl8139->io_port + RCR),
    160160            rcr);
     
    419419        pio_write_32(tsd, tsd_value);
    420420        return;
    421        
     421
    422422err_busy_no_inc:
    423423err_size:
     
    550550        bytes_received %= RxBUF_SIZE;
    551551        rx_offset %= RxBUF_SIZE;
    552        
     552
    553553        /* count how many bytes to read maximaly */
    554554        if (bytes_received < rx_offset)
     
    775775{
    776776        assert(nic_data);
    777        
     777
    778778        nic_poll_mode_t poll_mode = nic_query_poll_mode(nic_data, 0);
    779779
     
    11041104
    11051105        ddf_msg(LVL_DEBUG, "Creating buffers");
    1106        
     1106
    11071107        rtl8139->tx_buff_virt = AS_AREA_ANY;
    11081108        rc = dmamem_map_anonymous(TX_PAGES * PAGE_SIZE, DMAMEM_4GiB,
     
    11251125        ddf_msg(LVL_DEBUG, "Allocating receiver buffer of the size %d bytes",
    11261126            RxBUF_TOT_LENGTH);
    1127        
     1127
    11281128        rtl8139->rx_buff_virt = AS_AREA_ANY;
    11291129        rc = dmamem_map_anonymous(RxBUF_TOT_LENGTH, DMAMEM_4GiB,
     
    11951195        ddf_msg(LVL_DEBUG, "The device is initialized");
    11961196        return ret;
    1197        
     1197
    11981198failed:
    11991199        ddf_msg(LVL_ERROR, "The device initialization failed");
     
    13181318
    13191319        return EOK;
    1320        
     1320
    13211321err_fun_bind:
    13221322        ddf_fun_unbind(fun);
     
    15471547        if (rtl8139_pause_is_valid(rtl8139) != VALUE_RW)
    15481548                return EINVAL;
    1549        
     1549
    15501550        uint8_t msr = pio_read_8(rtl8139->io_port + MSR);
    15511551        msr &= ~(uint8_t)(MSR_TXFCE | MSR_RXFCE);
     
    15551555        if (allow_send)
    15561556                msr |= MSR_TXFCE;
    1557        
     1557
    15581558        pio_write_8(rtl8139->io_port + MSR, msr);
    15591559
     
    16241624        if ((advertisement | RTL8139_AUTONEG_CAPS) != RTL8139_AUTONEG_CAPS)
    16251625                return EINVAL; /* some unsuported mode is requested */
    1626        
     1626
    16271627        assert(advertisement != 0);
    16281628
Note: See TracChangeset for help on using the changeset viewer.