Skip to content

Commit ed08d40

Browse files
Chuansheng-Liuhtejun
authored andcommitted
ahci: Changing two module params with static and __read_mostly
Here module parameters ahci_em_messages and devslp_idle_timeout can be set as static and __read_mostly. Signed-off-by: Liu, Chuansheng <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 272b98c commit ed08d40

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/ata/libahci.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,15 @@ struct ata_port_operations ahci_pmp_retry_srst_ops = {
189189
};
190190
EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
191191

192-
int ahci_em_messages = 1;
192+
static bool ahci_em_messages __read_mostly = true;
193193
EXPORT_SYMBOL_GPL(ahci_em_messages);
194-
module_param(ahci_em_messages, int, 0444);
194+
module_param(ahci_em_messages, bool, 0444);
195195
/* add other LED protocol types when they become supported */
196196
MODULE_PARM_DESC(ahci_em_messages,
197197
"AHCI Enclosure Management Message control (0 = off, 1 = on)");
198198

199-
int devslp_idle_timeout = 1000; /* device sleep idle timeout in ms */
199+
/* device sleep idle timeout in ms */
200+
static int devslp_idle_timeout __read_mostly = 1000;
200201
module_param(devslp_idle_timeout, int, 0644);
201202
MODULE_PARM_DESC(devslp_idle_timeout, "device sleep idle timeout");
202203

0 commit comments

Comments
 (0)