All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	sudanl@amazon.com,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: tytso@mit.edu, olivia@selenic.com, herbert@gondor.apana.org.au,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, graf@amazon.de,
	xmarcalx@amazon.co.uk, dwmw@amazon.co.uk,
	Alexander Graf <graf@amazon.com>,
	Babis Chalios <bchalios@amazon.es>
Subject: Re: [PATCH v6 5/5] virt: vmgenid: add support for devicetree bindings
Date: Wed, 17 Apr 2024 18:02:22 +0200	[thread overview]
Message-ID: <1fe62eb1-8ad5-4ced-9349-258cee9de663@kernel.org> (raw)
In-Reply-To: <CAHmME9qHY_1JGDMyvEGB7XDu2DKaYQcPE3UfSfb4aVZkgC8Q=g@mail.gmail.com>

On 17/04/2024 17:16, Jason A. Donenfeld wrote:

>> +static irqreturn_t
>> +vmgenid_of_irq_handler(int __always_unused irq, void *dev)
>> +{
>> +       vmgenid_notify(dev);
>> +
>> +       return IRQ_HANDLED;
>> +}
> 
> Is there a reason the of code isn't conditional on CONFIG_OF? I'm not
> super familiar with these drivers, but this seems like it would be a
> thing to do, and then we could do `depends on OF || ACPI` in the
> Kconfig.
> 

Usually we do not recommend hiding code behind !CONFIG_OF because this
limits possible usage on ACPI systems via PRP0001. Not sure if it is
applicable here, because there is already ACPI matching.

I would suggest choose whatever makes code simpler... Or just mark some
pieces with __maybe_unused if they are really not used? That would avoid
ifdeffery.


Best regards,
Krzysztof


  reply	other threads:[~2024-04-17 16:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 10:40 [PATCH v6 0/5] virt: vmgenid: Add devicetree bindings support Babis Chalios
2024-04-17 10:40 ` [PATCH v6 1/5] virt: vmgenid: re-arrange code to make review easier Babis Chalios
2024-04-17 10:40 ` [PATCH v6 2/5] virt: vmgenid: change implementation to use a platform driver Babis Chalios
2024-04-17 10:40 ` [PATCH v6 3/5] virt: vmgenid: enable driver regardless of ACPI config Babis Chalios
2024-04-17 10:40 ` [PATCH v6 4/5] dt-bindings: rng: Add vmgenid support Babis Chalios
2024-04-17 14:09   ` Krzysztof Kozlowski
2024-04-17 15:18     ` Babis Chalios
2024-04-17 15:20       ` Jason A. Donenfeld
2024-04-17 15:23         ` Babis Chalios
2024-04-17 10:40 ` [PATCH v6 5/5] virt: vmgenid: add support for devicetree bindings Babis Chalios
2024-04-17 15:16   ` Jason A. Donenfeld
2024-04-17 16:02     ` Krzysztof Kozlowski [this message]
2024-04-17 16:11       ` Jason A. Donenfeld

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=1fe62eb1-8ad5-4ced-9349-258cee9de663@kernel.org \
    --to=krzk@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=bchalios@amazon.es \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw@amazon.co.uk \
    --cc=graf@amazon.com \
    --cc=graf@amazon.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivia@selenic.com \
    --cc=robh@kernel.org \
    --cc=sudanl@amazon.com \
    --cc=tytso@mit.edu \
    --cc=xmarcalx@amazon.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.