[PATCH v2 06/10] s390/uv: make uv_convert_from_secure() a static function

David Hildenbrand posted 10 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH v2 06/10] s390/uv: make uv_convert_from_secure() a static function
Posted by David Hildenbrand 1 year, 10 months ago
It's not used outside of uv.c, so let's make it a static function.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 arch/s390/include/asm/uv.h | 6 ------
 arch/s390/kernel/uv.c      | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
index 0e7bd3873907..d2205ff97007 100644
--- a/arch/s390/include/asm/uv.h
+++ b/arch/s390/include/asm/uv.h
@@ -484,7 +484,6 @@ int uv_pin_shared(unsigned long paddr);
 int gmap_make_secure(struct gmap *gmap, unsigned long gaddr, void *uvcb);
 int gmap_destroy_page(struct gmap *gmap, unsigned long gaddr);
 int uv_destroy_owned_page(unsigned long paddr);
-int uv_convert_from_secure(unsigned long paddr);
 int uv_convert_owned_from_secure(unsigned long paddr);
 int gmap_convert_to_secure(struct gmap *gmap, unsigned long gaddr);
 
@@ -503,11 +502,6 @@ static inline int uv_destroy_owned_page(unsigned long paddr)
 	return 0;
 }
 
-static inline int uv_convert_from_secure(unsigned long paddr)
-{
-	return 0;
-}
-
 static inline int uv_convert_owned_from_secure(unsigned long paddr)
 {
 	return 0;
diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
index ecfc08902215..3d3250b406a6 100644
--- a/arch/s390/kernel/uv.c
+++ b/arch/s390/kernel/uv.c
@@ -156,7 +156,7 @@ int uv_destroy_owned_page(unsigned long paddr)
  *
  * @paddr: Absolute host address of page to be exported
  */
-int uv_convert_from_secure(unsigned long paddr)
+static int uv_convert_from_secure(unsigned long paddr)
 {
 	struct uv_cb_cfs uvcb = {
 		.header.cmd = UVC_CMD_CONV_FROM_SEC_STOR,
-- 
2.44.0
Re: [PATCH v2 06/10] s390/uv: make uv_convert_from_secure() a static function
Posted by Claudio Imbrenda 1 year, 9 months ago
On Fri, 12 Apr 2024 16:21:16 +0200
David Hildenbrand <david@redhat.com> wrote:

> It's not used outside of uv.c, so let's make it a static function.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> ---
>  arch/s390/include/asm/uv.h | 6 ------
>  arch/s390/kernel/uv.c      | 2 +-
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
> index 0e7bd3873907..d2205ff97007 100644
> --- a/arch/s390/include/asm/uv.h
> +++ b/arch/s390/include/asm/uv.h
> @@ -484,7 +484,6 @@ int uv_pin_shared(unsigned long paddr);
>  int gmap_make_secure(struct gmap *gmap, unsigned long gaddr, void *uvcb);
>  int gmap_destroy_page(struct gmap *gmap, unsigned long gaddr);
>  int uv_destroy_owned_page(unsigned long paddr);
> -int uv_convert_from_secure(unsigned long paddr);
>  int uv_convert_owned_from_secure(unsigned long paddr);
>  int gmap_convert_to_secure(struct gmap *gmap, unsigned long gaddr);
>  
> @@ -503,11 +502,6 @@ static inline int uv_destroy_owned_page(unsigned long paddr)
>  	return 0;
>  }
>  
> -static inline int uv_convert_from_secure(unsigned long paddr)
> -{
> -	return 0;
> -}
> -
>  static inline int uv_convert_owned_from_secure(unsigned long paddr)
>  {
>  	return 0;
> diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
> index ecfc08902215..3d3250b406a6 100644
> --- a/arch/s390/kernel/uv.c
> +++ b/arch/s390/kernel/uv.c
> @@ -156,7 +156,7 @@ int uv_destroy_owned_page(unsigned long paddr)
>   *
>   * @paddr: Absolute host address of page to be exported
>   */
> -int uv_convert_from_secure(unsigned long paddr)
> +static int uv_convert_from_secure(unsigned long paddr)
>  {
>  	struct uv_cb_cfs uvcb = {
>  		.header.cmd = UVC_CMD_CONV_FROM_SEC_STOR,