Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

can: dev: can_get_ctrlmode_str: use capitalized ctrlmode strings

Unify the ctrlmode related strings to the command line options of the
'ip' tool from the iproute2 package. The capitalized strings are also
shown when the detailed interface configuration is printed by 'ip'.

Suggested-by: Stephane Grosjean <stephane.grosjean@hms-networks.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20251126-canxl-v8-1-e7e3eb74f889@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Oliver Hartkopp and committed by
Marc Kleine-Budde
66e75b27 ab084f0b

+12 -12
+12 -12
drivers/net/can/dev/dev.c
··· 92 92 { 93 93 switch (ctrlmode & ~(ctrlmode - 1)) { 94 94 case 0: 95 - return "none"; 95 + return "(none)"; 96 96 case CAN_CTRLMODE_LOOPBACK: 97 - return "loopback"; 97 + return "LOOPBACK"; 98 98 case CAN_CTRLMODE_LISTENONLY: 99 - return "listen-only"; 99 + return "LISTEN-ONLY"; 100 100 case CAN_CTRLMODE_3_SAMPLES: 101 - return "triple-sampling"; 101 + return "TRIPLE-SAMPLING"; 102 102 case CAN_CTRLMODE_ONE_SHOT: 103 - return "one-shot"; 103 + return "ONE-SHOT"; 104 104 case CAN_CTRLMODE_BERR_REPORTING: 105 - return "berr-reporting"; 105 + return "BERR-REPORTING"; 106 106 case CAN_CTRLMODE_FD: 107 - return "fd"; 107 + return "FD"; 108 108 case CAN_CTRLMODE_PRESUME_ACK: 109 - return "presume-ack"; 109 + return "PRESUME-ACK"; 110 110 case CAN_CTRLMODE_FD_NON_ISO: 111 - return "fd-non-iso"; 111 + return "FD-NON-ISO"; 112 112 case CAN_CTRLMODE_CC_LEN8_DLC: 113 - return "cc-len8-dlc"; 113 + return "CC-LEN8-DLC"; 114 114 case CAN_CTRLMODE_TDC_AUTO: 115 - return "fd-tdc-auto"; 115 + return "TDC-AUTO"; 116 116 case CAN_CTRLMODE_TDC_MANUAL: 117 - return "fd-tdc-manual"; 117 + return "TDC-MANUAL"; 118 118 default: 119 119 return "<unknown>"; 120 120 }