lkml.org 
[lkml]   [2022]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/3] hwrng: starfive - Add TRNG driver for StarFive SoC
Date


> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Thursday, December 22, 2022 5:44 PM
> To: JiaJie Ho <jiajie.ho@starfivetech.com>; Olivia Mackall
> <olivia@selenic.com>; Herbert Xu <herbert@gondor.apana.org.au>; Rob
> Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>
> Cc: Emil Renner Berthing <kernel@esmil.dk>; Conor Dooley
> <conor.dooley@microchip.com>; linux-crypto@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> riscv@lists.infradead.org
> Subject: Re: [PATCH 2/3] hwrng: starfive - Add TRNG driver for StarFive SoC
>
> > How do I properly handle __maybe_unused functions in this scenario?
>
> The same as in other files. Use `git grep`
>
> > Will it help if I add #define as follows:
> >
> > #ifdef CONFIG_PM
> > #define STARFIVE_RNG_PM_OPS (&starfive_rng_pm_ops) #else #define
> > STARFIVE_RNG_PM_OPS NULL #endif
>
> I talked only about of_match_ptr(). This is not of_match_ptr and should have
> its own syntax (pm_sleep_ptr + static DEFINE_SIMPLE_DEV_PM_OPS)
>
> >
> > static struct platform_driver starfive_trng_driver = {
> > .probe = starfive_trng_probe,
> > .driver = {
> > .name = "starfive-trng",
> > .pm = STARFIVE_RNG_PM_OPS,
> > .of_match_table = of_match_ptr(trng_dt_ids),
> > },
> > };
> >
> > I did build the patches with the tools mentioned but did not get warnings.
> > Do I need a specific version, or have I done something wrong?
>
> You just need proper COMPILE_TEST config with OF disabled.
>

I'll update the patch accordingly.
Thanks again for the comments and suggestions.

Regards,
Jia Jie
\
 
 \ /
  Last update: 2023-03-26 23:17    [W:0.045 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site