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.

ASoC: SDCA: Clean up error messages

All the error messages in the SDCA code manually print the function
in the output, update these to use dev_fmt instead. Whilst making
the changes tweak a couple of the error messages to make them a
little shorter.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20241220173516.907406-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Charles Keepax and committed by
Mark Brown
935cd06b deb01520

+10 -12
+10 -12
sound/soc/sdca/sdca_functions.c
··· 6 6 * https://www.mipi.org/mipi-sdca-v1-0-download 7 7 */ 8 8 9 + #define dev_fmt(fmt) "%s: " fmt, __func__ 10 + 9 11 #include <linux/acpi.h> 10 12 #include <linux/device.h> 11 13 #include <linux/module.h> ··· 51 49 function_type_patch = SDCA_FUNCTION_TYPE_HID; 52 50 break; 53 51 default: 54 - dev_warn(dev, "%s: SDCA version %#x unsupported function type %d, skipped\n", 55 - __func__, interface_revision, *function_type); 52 + dev_warn(dev, "SDCA version %#x invalid function type %d\n", 53 + interface_revision, *function_type); 56 54 return -EINVAL; 57 55 } 58 56 ··· 79 77 case SDCA_FUNCTION_TYPE_SPEAKER_MIC: 80 78 case SDCA_FUNCTION_TYPE_RJ: 81 79 case SDCA_FUNCTION_TYPE_IMP_DEF: 82 - dev_warn(dev, "%s: found unsupported SDCA function type %d, skipped\n", 83 - __func__, *function_type); 80 + dev_warn(dev, "unsupported SDCA function type %d\n", *function_type); 84 81 return -EINVAL; 85 82 default: 86 - dev_err(dev, "%s: found invalid SDCA function type %d, skipped\n", 87 - __func__, *function_type); 83 + dev_err(dev, "invalid SDCA function type %d\n", *function_type); 88 84 return -EINVAL; 89 85 } 90 86 91 - dev_info(dev, "%s: found SDCA function %s (type %d)\n", 92 - __func__, *function_name, *function_type); 87 + dev_info(dev, "SDCA function %s (type %d)\n", *function_name, *function_type); 93 88 94 89 return 0; 95 90 } ··· 104 105 int ret; 105 106 106 107 if (sdca_data->num_functions >= SDCA_MAX_FUNCTION_COUNT) { 107 - dev_err(dev, "%s: maximum number of functions exceeded\n", __func__); 108 + dev_err(dev, "maximum number of functions exceeded\n"); 108 109 return -EINVAL; 109 110 } 110 111 ··· 118 119 return ret; 119 120 120 121 if (!addr) { 121 - dev_err(dev, "%s: no addr\n", __func__); 122 + dev_err(dev, "no addr\n"); 122 123 return -ENODEV; 123 124 } 124 125 ··· 143 144 fwnode_handle_put(control5); 144 145 145 146 if (ret < 0) { 146 - dev_err(dev, "%s: the function type can only be determined from ACPI information\n", 147 - __func__); 147 + dev_err(dev, "function type only supported as DisCo constant\n"); 148 148 return ret; 149 149 } 150 150