linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ahci: Changing two module params with static and __read_mostly
  2013-09-17 16:48 [PATCH] ahci: Changing two module params with static and __read_mostly Chuansheng Liu
@ 2013-09-17 16:24 ` Joe Perches
  2013-09-18  2:52   ` Liu, Chuansheng
  2013-09-18 12:21 ` [PATCH V2] " Chuansheng Liu
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2013-09-17 16:24 UTC (permalink / raw)
  To: Chuansheng Liu; +Cc: tj, linux-ide, linux-kernel

On Wed, 2013-09-18 at 00:48 +0800, Chuansheng Liu wrote:
> Here module parameters ahci_em_messages and devslp_idle_timeout can
> be set as static and __read_mostly.
> 
> Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>
> ---
>  drivers/ata/libahci.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
[]
> @@ -189,14 +189,15 @@ struct ata_port_operations ahci_pmp_retry_srst_ops = {
>  };
>  EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
>  
> -int ahci_em_messages = 1;
> +static int ahci_em_messages __read_mostly = 1;

This one could also be converted to
static bool ahci_em_messages __read_mostly = true;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ahci: Changing two module params with static and __read_mostly
@ 2013-09-17 16:48 Chuansheng Liu
  2013-09-17 16:24 ` Joe Perches
  2013-09-18 12:21 ` [PATCH V2] " Chuansheng Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Chuansheng Liu @ 2013-09-17 16:48 UTC (permalink / raw)
  To: tj; +Cc: linux-ide, linux-kernel, chuansheng.liu


Here module parameters ahci_em_messages and devslp_idle_timeout can
be set as static and __read_mostly.

Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>
---
 drivers/ata/libahci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index acfd0f7..1757631 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -189,14 +189,15 @@ struct ata_port_operations ahci_pmp_retry_srst_ops = {
 };
 EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
 
-int ahci_em_messages = 1;
+static int ahci_em_messages __read_mostly = 1;
 EXPORT_SYMBOL_GPL(ahci_em_messages);
 module_param(ahci_em_messages, int, 0444);
 /* add other LED protocol types when they become supported */
 MODULE_PARM_DESC(ahci_em_messages,
 	"AHCI Enclosure Management Message control (0 = off, 1 = on)");
 
-int devslp_idle_timeout = 1000;	/* device sleep idle timeout in ms */
+/* device sleep idle timeout in ms */
+static int devslp_idle_timeout __read_mostly = 1000;
 module_param(devslp_idle_timeout, int, 0644);
 MODULE_PARM_DESC(devslp_idle_timeout, "device sleep idle timeout");
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] ahci: Changing two module params with static and __read_mostly
  2013-09-17 16:24 ` Joe Perches
@ 2013-09-18  2:52   ` Liu, Chuansheng
  0 siblings, 0 replies; 5+ messages in thread
From: Liu, Chuansheng @ 2013-09-18  2:52 UTC (permalink / raw)
  To: Joe Perches
  Cc: tj@kernel.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org



> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Wednesday, September 18, 2013 12:24 AM
> To: Liu, Chuansheng
> Cc: tj@kernel.org; linux-ide@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] ahci: Changing two module params with static and
> __read_mostly
> 
> On Wed, 2013-09-18 at 00:48 +0800, Chuansheng Liu wrote:
> > Here module parameters ahci_em_messages and devslp_idle_timeout can
> > be set as static and __read_mostly.
> >
> > Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>
> > ---
> >  drivers/ata/libahci.c |    5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> []
> > @@ -189,14 +189,15 @@ struct ata_port_operations
> ahci_pmp_retry_srst_ops = {
> >  };
> >  EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
> >
> > -int ahci_em_messages = 1;
> > +static int ahci_em_messages __read_mostly = 1;
> 
> This one could also be converted to
> static bool ahci_em_messages __read_mostly = true;
> 
Thanks, will update one new patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2] ahci: Changing two module params with static and __read_mostly
  2013-09-17 16:48 [PATCH] ahci: Changing two module params with static and __read_mostly Chuansheng Liu
  2013-09-17 16:24 ` Joe Perches
@ 2013-09-18 12:21 ` Chuansheng Liu
  2013-09-22 16:54   ` Tejun Heo
  1 sibling, 1 reply; 5+ messages in thread
From: Chuansheng Liu @ 2013-09-18 12:21 UTC (permalink / raw)
  To: tj, joe; +Cc: linux-ide, linux-kernel, chuansheng.liu


Here module parameters ahci_em_messages and devslp_idle_timeout can
be set as static and __read_mostly.

Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>
---
 drivers/ata/libahci.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index acfd0f7..b67086f 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -189,14 +189,15 @@ struct ata_port_operations ahci_pmp_retry_srst_ops = {
 };
 EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
 
-int ahci_em_messages = 1;
+static bool ahci_em_messages __read_mostly = true;
 EXPORT_SYMBOL_GPL(ahci_em_messages);
-module_param(ahci_em_messages, int, 0444);
+module_param(ahci_em_messages, bool, 0444);
 /* add other LED protocol types when they become supported */
 MODULE_PARM_DESC(ahci_em_messages,
 	"AHCI Enclosure Management Message control (0 = off, 1 = on)");
 
-int devslp_idle_timeout = 1000;	/* device sleep idle timeout in ms */
+/* device sleep idle timeout in ms */
+static int devslp_idle_timeout __read_mostly = 1000;
 module_param(devslp_idle_timeout, int, 0644);
 MODULE_PARM_DESC(devslp_idle_timeout, "device sleep idle timeout");
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] ahci: Changing two module params with static and __read_mostly
  2013-09-18 12:21 ` [PATCH V2] " Chuansheng Liu
@ 2013-09-22 16:54   ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2013-09-22 16:54 UTC (permalink / raw)
  To: Chuansheng Liu; +Cc: joe, linux-ide, linux-kernel

On Wed, Sep 18, 2013 at 08:21:49PM +0800, Chuansheng Liu wrote:
> 
> Here module parameters ahci_em_messages and devslp_idle_timeout can
> be set as static and __read_mostly.
> 
> Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>

Applied to libata/for-3.13.  Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-22 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 16:48 [PATCH] ahci: Changing two module params with static and __read_mostly Chuansheng Liu
2013-09-17 16:24 ` Joe Perches
2013-09-18  2:52   ` Liu, Chuansheng
2013-09-18 12:21 ` [PATCH V2] " Chuansheng Liu
2013-09-22 16:54   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).