lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Oct 2020 10:47:22 +0200
From:   Arnaud POULIQUEN <arnaud.pouliquen@...com>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>,
        "ohad@...ery.com" <ohad@...ery.com>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>
CC:     "guennadi.liakhovetski@...ux.intel.com" 
        <guennadi.liakhovetski@...ux.intel.com>,
        "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 8/9] rpmsg: Make rpmsg_{register|unregister}_device()
 public



On 10/14/20 1:25 AM, Mathieu Poirier wrote:
> Make function rpmsg_register_device() and rpmsg_unregister_device()
> functions public so that they can be used by other clients.  While
> doing so get rid of two obsolete function, i.e register_rpmsg_device()
> and unregister_rpmsg_device(), to prevent confusion.
> 
> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> ---
>  drivers/rpmsg/rpmsg_internal.h |  4 ----
>  include/linux/rpmsg.h          | 12 ++++++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h
> index b9b34b416b7b..70de053581bd 100644
> --- a/drivers/rpmsg/rpmsg_internal.h
> +++ b/drivers/rpmsg/rpmsg_internal.h
> @@ -49,10 +49,6 @@ struct rpmsg_endpoint_ops {
>  			     poll_table *wait);
>  };
>  
> -int rpmsg_register_device(struct rpmsg_device *rpdev);
> -int rpmsg_unregister_device(struct device *parent,
> -			    struct rpmsg_channel_info *chinfo);
> -
>  struct device *rpmsg_find_device(struct device *parent,
>  				 struct rpmsg_channel_info *chinfo);
>  
> diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h
> index eb70463a9f2e..0b3ec18ddbaa 100644
> --- a/include/linux/rpmsg.h
> +++ b/include/linux/rpmsg.h
> @@ -188,8 +188,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val)
>  
>  #if IS_ENABLED(CONFIG_RPMSG)
>  
> -int register_rpmsg_device(struct rpmsg_device *dev);
> -void unregister_rpmsg_device(struct rpmsg_device *dev);
> +int rpmsg_register_device(struct rpmsg_device *rpdev);
> +int rpmsg_unregister_device(struct device *parent,
> +			    struct rpmsg_channel_info *chinfo);
>  int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner);
>  void unregister_rpmsg_driver(struct rpmsg_driver *drv);
>  void rpmsg_destroy_ept(struct rpmsg_endpoint *);
> @@ -212,15 +213,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
>  
>  #else
>  
> -static inline int register_rpmsg_device(struct rpmsg_device *dev)
> +static inline int rpmsg_register_device(struct rpmsg_device *rpdev)
>  {
>  	return -ENXIO;
>  }
>  
> -static inline void unregister_rpmsg_device(struct rpmsg_device *dev)
> +static inline int rpmsg_unregister_device(struct device *parent,
> +					  struct rpmsg_channel_info *chinfo)
>  {
>  	/* This shouldn't be possible */
>  	WARN_ON(1);
> +
> +	return -ENXIO;
>  }
>  
>  static inline int __register_rpmsg_driver(struct rpmsg_driver *drv,
> 


Reviewed-by:  Arnaud Pouliquen <arnaud.pouliquen@...com>

Thanks,
Arnaud

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ