Skip to contentSkip to conversation

ata: ahci: Move EXPORT_SYMBOL_GPL(ahci_do_softreset)

PATCH Applied Bart Van Assche 3 participants 3 messages May 5 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: ahci: Move EXPORT_SYMBOL_GPL(ahci_do_softreset)

From Documentation/process/coding-style.rst:

----------------------------------------------------------------------------
In source files, separate functions with one blank line. If the function is exported, the **EXPORT** macro for it should follow immediately after the closing function brace line.
----------------------------------------------------------------------------

Hence, move EXPORT_SYMBOL_GPL(ahci_do_softreset) to just below the definition of the ahci_do_softreset() function.

---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci.c +1 -1
index c79abdfcd7a9..99e85c767661 100644
@@ -1527,6 +1527,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
 	ata_link_err(link, "softreset failed (%s)\n", reason);
 	return rc;
 }
+EXPORT_SYMBOL_GPL(ahci_do_softreset);
 
 int ahci_check_ready(struct ata_link *link)
 {
@@ -1544,7 +1545,6 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
 
 	return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
 }
-EXPORT_SYMBOL_GPL(ahci_do_softreset);
 
 static int ahci_bad_pmp_check_ready(struct ata_link *link)
 {
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Bart Van Assche

From Documentation/process/coding-style.rst:

----------------------------------------------------------------------------
In source files, separate functions with one blank line. If the function is exported, the **EXPORT** macro for it should follow immediately after the closing function brace line.
----------------------------------------------------------------------------

Quoted 4 lines

Hence, move EXPORT_SYMBOL_GPL(ahci_do_softreset) to just below the definition of the ahci_do_softreset() function.

Signature · 2 lines
Damien Le Moal
Western Digital Research
maintainer Applied
#2 lore raw
In reply to Bart Van Assche
Quoted 9 lines · Bart Van Assche
Quoted 1 line

From Documentation/process/coding-style.rst:

----------------------------------------------------------------------------
In source files, separate functions with one blank line. If the function is exported, the **EXPORT** macro for it should follow immediately after the closing function brace line.
----------------------------------------------------------------------------

[...]

Modified the commit log to avoid the following checkpatch warnings while applying:

ERROR: Invalid commit separator - some tools may have problems applying this #8:
----------------------------------------------------------------------------

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #8:
----------------------------------------------------------------------------

ERROR: Invalid commit separator - some tools may have problems applying this #12:
----------------------------------------------------------------------------

Applied to libata/linux.git (for-7.2), thanks!

[1/1] ata: ahci: Move EXPORT_SYMBOL_GPL(ahci_do_softreset)

      https://git.kernel.org/libata/linux/c/a3f75e5e

Kind regards,
Niklas