[SRU] [I/OEM-5.13] [PATCH 2/7] thunderbolt: Make tb_port_type() take const parameter

Kai-Heng Feng kai.heng.feng at canonical.com
Wed Aug 25 05:23:30 UTC 2021


From: Mika Westerberg <mika.westerberg at linux.intel.com>

BugLink: https://bugs.launchpad.net/bugs/1941036

The function does not modify the object in any way so make the parameter
const to reflect this.

No functional changes intended.

Signed-off-by: Mika Westerberg <mika.westerberg at linux.intel.com>
(cherry picked from commit 1c561e4e659d59f1f2825dec42f09338eac1c774)
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
 drivers/thunderbolt/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index a82032c081e83..95dcb2ae14163 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -459,7 +459,7 @@ static void tb_switch_nvm_remove(struct tb_switch *sw)
 
 /* port utility functions */
 
-static const char *tb_port_type(struct tb_regs_port_header *port)
+static const char *tb_port_type(const struct tb_regs_port_header *port)
 {
 	switch (port->type >> 16) {
 	case 0:
-- 
2.32.0




More information about the kernel-team mailing list