"WARN_ON_ONCE(1)"??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  what's the rationale behind the use of the odd-looking use of
calling WARN_ON_ONCE(1)?  as in arch/i386/kernel/io_apic.c:

        pin  = find_isa_irq_pin(8, mp_INT);
        if (pin == -1) {
                WARN_ON_ONCE(1);
                return;
        }

based on my reading of that macro, wouldn't it be equivalent to just
write:

        pin  = find_isa_irq_pin(8, mp_INT);
        if ((WARN_ON_ONCE(pin == -1)) {
                return;
        }

or am i misreading this?  thanks.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux