Skip to contentSkip to conversation

platform/x86: amd-pmc: Make amd_pmc_stb_debugfs_fops static

PATCH In review Hans de Goede 1 participant 3 messages Jan 17, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 platform/x86: amd-pmc: Make amd_pmc_stb_debugfs_fops static

amd_pmc_stb_debugfs_fops is not used outside of amd-pmc.c, make it static.

---
 drivers/platform/x86/amd-pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/amd-pmc.c +1 -1
index f794343d6aaa..85b680297934 100644
@@ -226,7 +226,7 @@ static int amd_pmc_stb_debugfs_release(struct inode *inode, struct file *filp)
 	return 0;
 }
 
-const struct file_operations amd_pmc_stb_debugfs_fops = {
+static const struct file_operations amd_pmc_stb_debugfs_fops = {
 	.owner = THIS_MODULE,
 	.open = amd_pmc_stb_debugfs_open,
 	.read = amd_pmc_stb_debugfs_read,
Signature · 1 line
2.33.1
#1 lore raw

PATCH 2/2 platform/x86: asus-tf103c-dock: Make 2 global structs static

tf103c_dock_hid_ll_driver and tf103c_dock_pm_ops are not used outside of the driver, make them both static.

---
 drivers/platform/x86/asus-tf103c-dock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-tf103c-dock.c +2 -2
index d4ef8f362ee6..6fd0c9fea82d 100644
@@ -250,7 +250,7 @@ static int tf103c_dock_hid_raw_request(struct hid_device *hid, u8 reportnum,
 	return 0;
 }
 
-struct hid_ll_driver tf103c_dock_hid_ll_driver = {
+static struct hid_ll_driver tf103c_dock_hid_ll_driver = {
 	.parse = tf103c_dock_hid_parse,
 	.start = tf103c_dock_hid_start,
 	.stop = tf103c_dock_hid_stop,
@@ -921,7 +921,7 @@ static int __maybe_unused tf103c_dock_resume(struct device *dev)
 	return 0;
 }
 
-SIMPLE_DEV_PM_OPS(tf103c_dock_pm_ops, tf103c_dock_suspend, tf103c_dock_resume);
+static SIMPLE_DEV_PM_OPS(tf103c_dock_pm_ops, tf103c_dock_suspend, tf103c_dock_resume);
 
 static const struct acpi_device_id tf103c_dock_acpi_match[] = {
 	{"NPCE69A"},
Signature · 1 line
2.33.1
#2 lore raw
In reply to Hans de Goede

Hi,

Quoted 6 lines · Hans de Goede

amd_pmc_stb_debugfs_fops is not used outside of amd-pmc.c, make it static.

I've added both patches to my review-hans (soon to be for-next) branch now.

Regards,

Hans

Quoted 18 lines
---
 drivers/platform/x86/amd-pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/amd-pmc.c +1 -1
index f794343d6aaa..85b680297934 100644
@@ -226,7 +226,7 @@ static int amd_pmc_stb_debugfs_release(struct inode *inode, struct file *filp)
 	return 0;
 }
 
-const struct file_operations amd_pmc_stb_debugfs_fops = {
+static const struct file_operations amd_pmc_stb_debugfs_fops = {
 	.owner = THIS_MODULE,
 	.open = amd_pmc_stb_debugfs_open,
 	.read = amd_pmc_stb_debugfs_read,