lkml.org 
[lkml]   [2012]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V2 1/3] staging/rtl8192u: fix coding style problems
    Date
    fixed some of the coding style problems reported by checkpatch

    Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
    ---
    drivers/staging/rtl8192u/r8180_93cx6.c | 36 +++++++++++++++++---------------
    1 file changed, 19 insertions(+), 17 deletions(-)

    diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c
    index 3c515b7..19f5270 100644
    --- a/drivers/staging/rtl8192u/r8180_93cx6.c
    +++ b/drivers/staging/rtl8192u/r8180_93cx6.c
    @@ -22,13 +22,16 @@

    void eprom_cs(struct net_device *dev, short bit)
    {
    - if(bit)
    + if (bit) {
    + /* enable EPROM */
    write_nic_byte_E(dev, EPROM_CMD,
    - (1<<EPROM_CS_SHIFT) | \
    - read_nic_byte_E(dev, EPROM_CMD)); //enable EPROM
    - else
    - write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev, EPROM_CMD)\
    - &~(1<<EPROM_CS_SHIFT)); //disable EPROM
    + (1<<EPROM_CS_SHIFT) |
    + read_nic_byte_E(dev, EPROM_CMD));
    + } else {
    + /* disable EPROM */
    + write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev, EPROM_CMD)
    + & ~(1<<EPROM_CS_SHIFT));
    + }

    force_pci_posting(dev);
    udelay(EPROM_DELAY);
    @@ -38,24 +41,24 @@ void eprom_cs(struct net_device *dev, short bit)
    void eprom_ck_cycle(struct net_device *dev)
    {
    write_nic_byte_E(dev, EPROM_CMD,
    - (1<<EPROM_CK_SHIFT) | read_nic_byte_E(dev,EPROM_CMD));
    + (1<<EPROM_CK_SHIFT) | read_nic_byte_E(dev, EPROM_CMD));
    force_pci_posting(dev);
    udelay(EPROM_DELAY);
    write_nic_byte_E(dev, EPROM_CMD,
    - read_nic_byte_E(dev, EPROM_CMD) &~ (1<<EPROM_CK_SHIFT));
    + read_nic_byte_E(dev, EPROM_CMD) & ~(1<<EPROM_CK_SHIFT));
    force_pci_posting(dev);
    udelay(EPROM_DELAY);
    }


    -void eprom_w(struct net_device *dev,short bit)
    +void eprom_w(struct net_device *dev, short bit)
    {
    - if(bit)
    - write_nic_byte_E(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \
    - read_nic_byte_E(dev,EPROM_CMD));
    + if (bit)
    + write_nic_byte_E(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) |
    + read_nic_byte_E(dev, EPROM_CMD));
    else
    - write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev,EPROM_CMD)\
    - &~(1<<EPROM_W_SHIFT));
    + write_nic_byte_E(dev, EPROM_CMD, read_nic_byte_E(dev, EPROM_CMD)
    + & ~(1<<EPROM_W_SHIFT));

    force_pci_posting(dev);
    udelay(EPROM_DELAY);
    @@ -66,11 +69,10 @@ short eprom_r(struct net_device *dev)
    {
    short bit;

    - bit=(read_nic_byte_E(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT) );
    + bit = (read_nic_byte_E(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT));
    udelay(EPROM_DELAY);

    - if(bit) return 1;
    - return 0;
    + return !!bit;
    }


    --
    1.7.9.5


    \
     
     \ /
      Last update: 2012-06-19 21:41    [W:0.033 / U:29.584 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site