beancounter: removed faulty warning from 'get_beancounter_held_real'

Submitted by Valeriy Vdovin on April 21, 2020, 10 a.m.

Details

Message ID 1587463216-76738-1-git-send-email-valeriy.vdovin@virtuozzo.com
State New
Series "beancounter: removed faulty warning from 'get_beancounter_held_real'"
Headers show

Commit Message

Valeriy Vdovin April 21, 2020, 10 a.m.
https://jira.sw.ru/browse/PSBM-103215
Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
---
 include/bc/beancounter.h | 7 -------
 1 file changed, 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/bc/beancounter.h b/include/bc/beancounter.h
index 6db175e..7e6acf6 100644
--- a/include/bc/beancounter.h
+++ b/include/bc/beancounter.h
@@ -491,13 +491,6 @@  static inline unsigned long get_beancounter_held_real(struct ubparm *ubparm,
                int precharge)
 {
        unsigned long val = ubparm->held;
-
-       /*
-        * We want to catch cases where precharge might be greater
-        * than held.
-        */
-       WARN_ON_ONCE(val < precharge);
-
        return (val > precharge) ? (val - precharge) : 0;
 }
 

Comments

Konstantin Khorenko April 21, 2020, 10:33 a.m.
Valera,

please write a normal commit message:
why the warning is faulty?

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 04/21/2020 01:00 PM, Valeriy Vdovin wrote:
> https://jira.sw.ru/browse/PSBM-103215
> Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
> ---
>  include/bc/beancounter.h | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/include/bc/beancounter.h b/include/bc/beancounter.h
> index 6db175e..7e6acf6 100644
> --- a/include/bc/beancounter.h
> +++ b/include/bc/beancounter.h
> @@ -491,13 +491,6 @@ static inline unsigned long get_beancounter_held_real(struct ubparm *ubparm,
>                 int precharge)
>  {
>         unsigned long val = ubparm->held;
> -
> -       /*
> -        * We want to catch cases where precharge might be greater
> -        * than held.
> -        */
> -       WARN_ON_ONCE(val < precharge);
> -
>         return (val > precharge) ? (val - precharge) : 0;
>  }
>
>