linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] of: Add missing function declarations
@ 2022-06-12  7:15 sunliming
  2022-06-13  9:03 ` Jonathan McDowell
  0 siblings, 1 reply; 3+ messages in thread
From: sunliming @ 2022-06-12  7:15 UTC (permalink / raw)
  To: noodles, dave.hansen, bhe, robh+dt, frowand.list
  Cc: linux-kernel, sunliming, kelulanainsley, kernel test robot

Fixes the following w1 warning:

drivers/of/kexec.c:126:5: warning: no previous prototype for 'ima_get_kexec_buffer' [-Wmissing-prototypes]
drivers/of/kexec.c:153:5: warning: no previous prototype for 'ima_free_kexec_buffer' [-Wmissing-prototypes

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
---
 include/linux/of.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index f0a5d6b10c5a..3a166a1c4ef6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -844,6 +844,16 @@ static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
 	return PHYS_ADDR_MAX;
 }
 
+static inline int ima_get_kexec_buffer(void **addr, size_t *size)
+{
+        return -ENOSYS;
+}
+
+static inline int ima_free_kexec_buffer(void **addr, size_t *size)
+{
+        return -ENOSYS;
+}
+
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
 #endif /* CONFIG_OF */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] of: Add missing function declarations
  2022-06-12  7:15 [PATCH RESEND] of: Add missing function declarations sunliming
@ 2022-06-13  9:03 ` Jonathan McDowell
  2022-06-14  0:52   ` sunliming
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan McDowell @ 2022-06-13  9:03 UTC (permalink / raw)
  To: sunliming
  Cc: dave.hansen, bhe, robh+dt, frowand.list, linux-kernel,
	kelulanainsley, kernel test robot

NAK. This is for a patch of mine that I don't believe has hit mainline
yet - I've only seen it in daveh's test tree. The prototypes for these
functions are now guarded by CONFIG_HAVE_IMA_KEXEC but all OF platforms
build them even when the platform doesn't actually support IMA over
kexec. I'll update my patch to avoid that.

On Sun, Jun 12, 2022 at 03:15:35PM +0800, sunliming wrote:
> Fixes the following w1 warning:
> 
> drivers/of/kexec.c:126:5: warning: no previous prototype for 'ima_get_kexec_buffer' [-Wmissing-prototypes]
> drivers/of/kexec.c:153:5: warning: no previous prototype for 'ima_free_kexec_buffer' [-Wmissing-prototypes
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: sunliming <sunliming@kylinos.cn>
> ---
>  include/linux/of.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index f0a5d6b10c5a..3a166a1c4ef6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -844,6 +844,16 @@ static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
>  	return PHYS_ADDR_MAX;
>  }
>  
> +static inline int ima_get_kexec_buffer(void **addr, size_t *size)
> +{
> +        return -ENOSYS;
> +}
> +
> +static inline int ima_free_kexec_buffer(void **addr, size_t *size)
> +{
> +        return -ENOSYS;
> +}
> +
>  #define of_match_ptr(_ptr)	NULL
>  #define of_match_node(_matches, _node)	NULL
>  #endif /* CONFIG_OF */
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] of: Add missing function declarations
  2022-06-13  9:03 ` Jonathan McDowell
@ 2022-06-14  0:52   ` sunliming
  0 siblings, 0 replies; 3+ messages in thread
From: sunliming @ 2022-06-14  0:52 UTC (permalink / raw)
  To: Jonathan McDowell
  Cc: dave.hansen, bhe, robh+dt, frowand.list, linux-kernel, kernel test robot

OK,thanks

Jonathan McDowell <noodles@fb.com> 于2022年6月13日周一 17:03写道:
>
> NAK. This is for a patch of mine that I don't believe has hit mainline
> yet - I've only seen it in daveh's test tree. The prototypes for these
> functions are now guarded by CONFIG_HAVE_IMA_KEXEC but all OF platforms
> build them even when the platform doesn't actually support IMA over
> kexec. I'll update my patch to avoid that.
>
> On Sun, Jun 12, 2022 at 03:15:35PM +0800, sunliming wrote:
> > Fixes the following w1 warning:
> >
> > drivers/of/kexec.c:126:5: warning: no previous prototype for 'ima_get_kexec_buffer' [-Wmissing-prototypes]
> > drivers/of/kexec.c:153:5: warning: no previous prototype for 'ima_free_kexec_buffer' [-Wmissing-prototypes
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: sunliming <sunliming@kylinos.cn>
> > ---
> >  include/linux/of.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/include/linux/of.h b/include/linux/of.h
> > index f0a5d6b10c5a..3a166a1c4ef6 100644
> > --- a/include/linux/of.h
> > +++ b/include/linux/of.h
> > @@ -844,6 +844,16 @@ static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
> >       return PHYS_ADDR_MAX;
> >  }
> >
> > +static inline int ima_get_kexec_buffer(void **addr, size_t *size)
> > +{
> > +        return -ENOSYS;
> > +}
> > +
> > +static inline int ima_free_kexec_buffer(void **addr, size_t *size)
> > +{
> > +        return -ENOSYS;
> > +}
> > +
> >  #define of_match_ptr(_ptr)   NULL
> >  #define of_match_node(_matches, _node)       NULL
> >  #endif /* CONFIG_OF */
> > --
> > 2.25.1
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-14  0:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12  7:15 [PATCH RESEND] of: Add missing function declarations sunliming
2022-06-13  9:03 ` Jonathan McDowell
2022-06-14  0:52   ` sunliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).