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]
Message-Id: <20190506140830.25376-2-angus@akkea.ca>
Date:   Mon,  6 May 2019 08:08:28 -0600
From:   "Angus Ainslie (Purism)" <angus@...ea.ca>
To:     angus.ainslie@...i.sm
Cc:     Guenter Roeck <linux@...ck-us.net>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Angus Ainslie (Purism)" <angus@...ea.ca>
Subject: [PATCH 1/3] usb: typec: tcpm: Export the logging function so it can be used by tcpci

Give the rest of the tcpm stack access to the logging function.

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