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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 May 2019 08:28:53 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     "Angus Ainslie (Purism)" <angus@...ea.ca>
Cc:     angus.ainslie@...i.sm,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] usb: typec: tcpm: Export the logging function so it
 can be used by tcpci

On Mon, May 06, 2019 at 08:08:28AM -0600, Angus Ainslie (Purism) wrote:
> Give the rest of the tcpm stack access to the logging function.
> 

Those functions are not intended to be exported. I would be open to extracting
the loging code into its own file and make it generic/usable for all tcpm
drivers, but the tcpm log itself should be limited to tcpm, and remain so.

Guenter

> Signed-off-by: Angus Ainslie (Purism) <angus@...ea.ca>
> ---
>  drivers/usb/typec/tcpm/tcpm.c | 3 ++-
>  include/linux/usb/tcpm.h      | 2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index fba32d84e578..7c35cc1accae 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -465,7 +465,7 @@ static void _tcpm_log(struct tcpm_port *port, const char *fmt, va_list args)
>  }
>  
>  __printf(2, 3)
> -static void tcpm_log(struct tcpm_port *port, const char *fmt, ...)
> +void tcpm_log(struct tcpm_port *port, const char *fmt, ...)
>  {
>  	va_list args;
>  
> @@ -479,6 +479,7 @@ static void tcpm_log(struct tcpm_port *port, const char *fmt, ...)
>  	_tcpm_log(port, fmt, args);
>  	va_end(args);
>  }
> +EXPORT_SYMBOL_GPL(tcpm_log);
>  
>  __printf(2, 3)
>  static void tcpm_log_force(struct tcpm_port *port, const char *fmt, ...)
> diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h
> index 36a15dcadc53..70bfffdf5760 100644
> --- a/include/linux/usb/tcpm.h
> +++ b/include/linux/usb/tcpm.h
> @@ -169,4 +169,6 @@ void tcpm_pd_transmit_complete(struct tcpm_port *port,
>  void tcpm_pd_hard_reset(struct tcpm_port *port);
>  void tcpm_tcpc_reset(struct tcpm_port *port);
>  
> +void tcpm_log(struct tcpm_port *port, const char *fmt, ...);
> +
>  #endif /* __LINUX_USB_TCPM_H */
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ