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


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 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/rtl8169/driver.c

    r3061bc1 ra35b458  
    352352        ddf_msg(LVL_DEBUG, "The device is initialized");
    353353        return ret;
    354        
     354
    355355failed:
    356356        ddf_msg(LVL_ERROR, "The device initialization failed");
     
    460460                goto err_fun_bind;
    461461        }
    462        
     462
    463463        ddf_msg(LVL_NOTE, "The %s device has been successfully initialized.",
    464464            ddf_dev_get_name(dev));
     
    512512        if (rtl8169->pci_vid == PCI_VID_REALTEK)
    513513                str_cpy(info->vendor_name, NIC_VENDOR_MAX_LENGTH, "Realtek");
    514        
     514
    515515        if (rtl8169->pci_vid == PCI_VID_DLINK)
    516516                str_cpy(info->vendor_name, NIC_VENDOR_MAX_LENGTH, "D-Link");
    517        
     517
    518518        if (rtl8169->pci_pid == 0x8168)
    519519                str_cpy(info->model_name, NIC_MODEL_MAX_LENGTH, "RTL8168");
    520        
     520
    521521        if (rtl8169->pci_pid == 0x8169)
    522522                str_cpy(info->model_name, NIC_MODEL_MAX_LENGTH, "RTL8169");
     
    577577        bmcr = rtl8169_mii_read(rtl8169, MII_BMCR);
    578578        bmcr &= ~(BMCR_DUPLEX | BMCR_SPD_100 | BMCR_SPD_1000);
    579        
     579
    580580        /* Disable autonegotiation */
    581581        bmcr &= ~BMCR_AN_ENABLE;
     
    918918{
    919919        rtl8169_t *rtl8169 = nic_get_specific(nic_data);
    920        
     920
    921921        /* Configure Receive Control Register */
    922922        uint32_t rcr = pio_read_32(rtl8169->regs + RCR);
     
    961961                write_barrier();
    962962                ddf_msg(LVL_DEBUG, "TX status for descr %d: 0x%08x", tail, descr->control);
    963        
     963
    964964                tail = (tail + 1) % TX_BUFFERS_COUNT;
    965965                sent++;
     
    10051005                if (descr->control & CONTROL_FS)
    10061006                        fsidx = tail;
    1007                
     1007
    10081008                if (descr->control & CONTROL_LS) {
    10091009                        ddf_msg(LVL_DEBUG, "received message at slot %d, control 0x%08x", tail, descr->control);
Note: See TracChangeset for help on using the changeset viewer.