mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ard Biesheuvel <ardb@kernel.org>, Will Deacon <will@kernel.org>,
	Ali Saidi <alisaidi@amazon.com>
Subject: Re: [PATCH] hwrng: Add Arm SMCCC TRNG based driver
Date: Fri, 4 Jun 2021 18:14:39 +0100	[thread overview]
Message-ID: <20210604171439.GA39696@sirena.org.uk> (raw)
In-Reply-To: <20210604170216.4705-1-andre.przywara@arm.com>

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

On Fri, Jun 04, 2021 at 06:02:16PM +0100, Andre Przywara wrote:

> +static int __init smccc_trng_dev_init(void)
> +{
> +	platform_device_register_simple("smccc_trng", -1, NULL, 0);
> +
> +	return 0;
> +}
> +
> +device_initcall(smccc_trng_dev_init);

This will leave the device registered if the driver is removed and cause
the attempt to register the device again to fail if the module is
reloaded.  We don't check the error here but I'm not sure the driver
core won't complain about that and it's generally icky, better to clean
up the device on module removal.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-06-04 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 17:02 Andre Przywara
2021-06-04 17:14 ` Mark Brown [this message]
2021-06-04 20:41 ` kernel test robot

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=20210604171439.GA39696@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alisaidi@amazon.com \
    --cc=andre.przywara@arm.com \
    --cc=ardb@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=will@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

all inboxes | Powered by JetHome®