[PATCH] dio: Improve readability: rename dio_scodetophysaddr

From: winterver
Date: Sun Sep 29 2024 - 23:20:55 EST


Rename dio_scodetophysaddr to dio_scode_to_physaddr.
Also dio_scodetoipl -> dio_scode_to_ipl and dio_scode_to_name
-> dio_scode_to_name, though they're not implemented yet.
I've searched these names in the repo. There are only a few of references.
I think it's OK and worth renaming them for readability.

Signed-off-by: winterver <295107659@xxxxxx>
---
drivers/dio/dio.c | 12 ++++++------
drivers/tty/serial/8250/8250_hp300.c | 2 +-
include/linux/dio.h | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/dio/dio.c b/drivers/dio/dio.c
index 0a051d656..143e58c9f 100644
--- a/drivers/dio/dio.c
+++ b/drivers/dio/dio.c
@@ -11,12 +11,12 @@
* This means that framebuffers should pass it as
* DIO_ENCODE_ID(DIO_ID_FBUFFER,DIO_ID2_TOPCAT)
* (or whatever); everybody else just uses DIO_ID_FOOBAR.
- * unsigned long dio_scodetophysaddr(int scode)
+ * unsigned long dio_scode_to_physaddr(int scode)
* Return the physical address corresponding to the given select code.
- * int dio_scodetoipl(int scode)
+ * int dio_scode_to_ipl(int scode)
* Every DIO card has a fixed interrupt priority level. This function
* returns it, whatever it is.
- * const char *dio_scodetoname(int scode)
+ * const char *dio_scode_to_name(int scode)
* Return a character string describing this board [might be "" if
* not CONFIG_DIO_CONSTANTS]
* void dio_config_board(int scode) mark board as configured in the list
@@ -130,7 +130,7 @@ int __init dio_find(int deviceid)
if (DIO_SCINHOLE(scode))
continue;

- pa = dio_scodetophysaddr(scode);
+ pa = dio_scode_to_physaddr(scode);

if (!pa)
continue;
@@ -203,7 +203,7 @@ static int __init dio_init(void)
if (DIO_SCINHOLE(scode))
continue;

- pa = dio_scodetophysaddr(scode);
+ pa = dio_scode_to_physaddr(scode);

if (!pa)
continue;
@@ -274,7 +274,7 @@ subsys_initcall(dio_init);
/* Bear in mind that this is called in the very early stages of initialisation
* in order to get the address of the serial port for the console...
*/
-unsigned long dio_scodetophysaddr(int scode)
+unsigned long dio_scode_to_physaddr(int scode)
{
if (scode >= DIOII_SCBASE)
return (DIOII_BASE + (scode - 132) * DIOII_DEVSIZE);
diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c
index 3012ea03d..1bef48842 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -124,7 +124,7 @@ int __init hp300_setup_serial_console(void)
#endif
} else {
#ifdef CONFIG_HPDCA
- unsigned long pa = dio_scodetophysaddr(scode);
+ unsigned long pa = dio_scode_to_physaddr(scode);
if (!pa)
return 0;

diff --git a/include/linux/dio.h b/include/linux/dio.h
index 464331c4c..1677cdf6d 100644
--- a/include/linux/dio.h
+++ b/include/linux/dio.h
@@ -241,7 +241,7 @@ struct dio_driver {
*/

extern int dio_find(int deviceid);
-extern unsigned long dio_scodetophysaddr(int scode);
+extern unsigned long dio_scode_to_physaddr(int scode);
extern int dio_create_sysfs_dev_files(struct dio_dev *);

/* New-style probing */
--
2.25.1