Re: [PATCH 1/2] efi: payload: iomem: add commented out #define DEBUG 1

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

 



On Wed, May 31, 2023 at 12:38:20AM +0900, Masahiro Yamada wrote:
> On Tue, May 30, 2023 at 9:38 PM Sascha Hauer <sha@xxxxxxxxxxxxxx> wrote:
> >
> > Picked some outdated address from Masahiro, so once again:
> 
> 
> The macro name is misleading - perhaps, it should have
> been named as __is_defined_as_1().
> 
> I do not know if __is_defined() is future-proof.
> IS_BUILTIN, IS_MODULE, etc. are official,
> but __is_defined() is internal.

Yes, it looks like __is_defined() is meant to be used internally by
Kconfig, nevertheless it's getting more users in the kernel:

arch/arm64/include/asm/cpufeature.h:408:        return __is_defined(__KVM_VHE_HYPERVISOR__);
arch/arm64/include/asm/cpufeature.h:414:        return __is_defined(__KVM_NVHE_HYPERVISOR__);
arch/arm64/include/asm/kvm_nested.h:9:  return (!__is_defined(__KVM_NVHE_HYPERVISOR__) &&
arch/powerpc/include/asm/vdso/timebase.h:54:    if (__is_defined(__powerpc64__))
arch/s390/include/asm/nospec-branch.h:17:       return __is_defined(CC_USING_EXPOLINE) && !nospec_disable;
arch/s390/kernel/nospec-branch.c:67:            if (__is_defined(CC_USING_EXPOLINE))
arch/s390/kernel/nospec-branch.c:70:    } else if (__is_defined(CC_USING_EXPOLINE)) {
drivers/crypto/sahara.c:356:    if (!__is_defined(DEBUG))
drivers/crypto/sahara.c:408:    if (!__is_defined(DEBUG))
drivers/crypto/sahara.c:429:    if (!__is_defined(DEBUG))
drivers/usb/host/sl811-hcd.c:1290:              if (__is_defined(VERBOSE) ||
include/linux/pgtable.h:1605:#define mm_p4d_folded(mm)  __is_defined(__PAGETABLE_P4D_FOLDED)
include/linux/pgtable.h:1609:#define mm_pud_folded(mm)  __is_defined(__PAGETABLE_PUD_FOLDED)
include/linux/pgtable.h:1613:#define mm_pmd_folded(mm)  __is_defined(__PAGETABLE_PMD_FOLDED)
security/smack/smack_lsm.c:2911:                if (__is_defined(SMACK_IPV6_SECMARK_LABELING))

Maybe we should move __is_defined() somewhere else so that it can
officially be used.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux