[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o9tg1lso.fsf@miraculix.mork.no>
Date:   Thu, 22 Jun 2017 10:14:31 +0200
From:   Bjørn Mork <bjorn@...k.no>
To:     Jay Vosburgh <jay.vosburgh@...onical.com>
Cc:     Michael J Dilmore <michael.j.dilmore@...il.com>,
        David Miller <davem@...emloft.net>, vfalico@...il.com,
        andy@...yhouse.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c
Jay Vosburgh <jay.vosburgh@...onical.com> writes:
> Michael J Dilmore <michael.j.dilmore@...il.com> wrote:
>
>>if (WARN_ON(!new_active_slave) {
>>    netdev_dbg("Can't add new active slave - pointer null");
>>    return ERROR_CODE
>>}
>
> 	In general, yes, but in this case, the condition should be
> impossible to hit, so BUG_ON seems appropriate.
If it really is impossible then you should simply remove the test. No
need to test for the impossible, is there?
Bjørn
Powered by blists - more mailing lists
 
