mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] efi: payload: iomem: add commented out #define DEBUG 1
Date: Wed, 31 May 2023 09:27:13 +0200	[thread overview]
Message-ID: <20230531072713.GE17518@pengutronix.de> (raw)
In-Reply-To: <CAK7LNAQ1jB-r+gKtL-=+dKZ=7jz3yB0BD4vuS4YWOcya=NDw7g@mail.gmail.com>

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@pengutronix.de> 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 |



      reply	other threads:[~2023-05-31  7:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  9:40 Ahmad Fatoum
2023-05-23  9:40 ` [PATCH 2/2] block: efi: " Ahmad Fatoum
2023-05-30 12:31 ` [PATCH 1/2] efi: payload: iomem: " Sascha Hauer
2023-05-30 12:38 ` Sascha Hauer
2023-05-30 15:38   ` Masahiro Yamada
2023-05-31  7:27     ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230531072713.GE17518@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=masahiroy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox