lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMhs-H-fJcmxo3UurRXJWbEpyZ3YOGHtNfs9FCVZW80LDB_d8A@mail.gmail.com>
Date:   Thu, 24 Nov 2016 21:35:09 +0100
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     Markus Böhme <markus.boehme@...lbox.org>
Cc:     Greg KH <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Lior Dotan <liodot@...il.com>
Subject: Re: [PATCH v2 2/2] staging: slicoss: remove UPDATE_STATS_GB macro and
 inline code

On Thu, Nov 24, 2016 at 8:41 PM, Markus Böhme <markus.boehme@...lbox.org> wrote:
> On 11/24/2016 08:21 PM, Sergio Paracuellos wrote:
>> This patch removes UPDATE_STATS_GB macro in slic.h header file
>> and just inline code. This improve readability.
>>
>> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
>> ---
>>  drivers/staging/slicoss/slic.h    |  5 ----
>>  drivers/staging/slicoss/slicoss.c | 52 +++++++++++++++++++--------------------
>>  2 files changed, 25 insertions(+), 32 deletions(-)
>>
>> diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
>> index 2c05868..2893bdf 100644
>> --- a/drivers/staging/slicoss/slic.h
>> +++ b/drivers/staging/slicoss/slic.h
>> @@ -548,11 +548,6 @@ static inline void slic_flush_write(struct adapter *adapter)
>>       ioread32(adapter->regs + SLIC_REG_HOSTID);
>>  }
>>
>> -#define UPDATE_STATS_GB(largestat, newstat, oldstat)                     \
>> -{                                                                        \
>> -     (largestat) += ((newstat) - (oldstat));                          \
>> -}
>> -
>>  #if BITS_PER_LONG == 64
>>  #define   SLIC_GET_ADDR_LOW(_addr)  (u32)((u64)(_addr) & \
>>       0x00000000FFFFFFFF)
>> diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
>> index b6ec0a1..ffc7c45 100644
>> --- a/drivers/staging/slicoss/slicoss.c
>> +++ b/drivers/staging/slicoss/slicoss.c
>> @@ -1014,45 +1014,43 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
>>                       break;
>>               }
>>
>> -             UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs, stats->xmit_tcp_segs,
>> -                             old->xmit_tcp_segs);
>> +             stst->tcp.xmit_tcp_segs =
>> +                     stats->xmit_tcp_segs - old->xmit_tcp_segs;
>
> Missed this the first time, but the difference should be added to the
> value in stst:
>
>                 stst->tcp.xmit_tcp_segs +=
>                         stats->xmit_tcp_segs - old->xmit_tcp_segs;
>
> The same applies to the changes below.

True. I have just sent v3 with these fixed.

Thanks for let me know.

Cheers,
    Sergio Paracuellos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ