Re: assert macro to check null

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

 



On Sat, 10 Aug 2013 11:16:07 +0530, Saket Sinha said:

> Actually  WARN_ON macro has been defined slightly differently for each
> Acrhitecture in kernel.

And that matters for the *caller*, why, exactly?  (Hint - the vast majority
of calls to WARN_ON() are in non-arch code, so it pretty much has to have
the same semantics on all architectures, even if the actual macro is
different)

> Can you specifically point out the definition of macro you have suggested
>  and where it is defined in kernel.

cd /usr/src/linux &&  find include arch -type f -name '*.h' | xargs egrep 'define.*WARN_ON'

If you're on parisc, avr32, s390, powerpc, sh, or blackfin, you'll
get the appropriate version in arch/.  If you're on anything else, you'll
get the version from include/asm-generic/bug.h

Not that it matters - you end up using it exactly the same no matter what arch.

Attachment: pgpQh2mDyVKTY.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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