* [PATCH] dio: Improve readability: rename dio_scodetophysaddr
@ 2024-09-30 3:18 winterver
2024-09-30 13:20 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: winterver @ 2024-09-30 3:18 UTC (permalink / raw)
To: gregkh, jirislaby; +Cc: linux-kernel, linux-serial, winterver
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@qq.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dio: Improve readability: rename dio_scodetophysaddr
2024-09-30 3:18 [PATCH] dio: Improve readability: rename dio_scodetophysaddr winterver
@ 2024-09-30 13:20 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-09-30 13:20 UTC (permalink / raw)
To: winterver; +Cc: jirislaby, linux-kernel, linux-serial
On Mon, Sep 30, 2024 at 11:18:37AM +0800, winterver wrote:
> 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@qq.com>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.
- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what is needed in
order to properly describe the change.
- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what a proper
Subject: line should look like.
- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file,
Documentation/process/submitting-patches.rst for how to do this
correctly.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-30 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 3:18 [PATCH] dio: Improve readability: rename dio_scodetophysaddr winterver
2024-09-30 13:20 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox