The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/scsi/qla2xxx/: cleanups
Date: Mon, 28 Feb 2005 13:56:45 -0800	[thread overview]
Message-ID: <20050228215645.GB9215@plap.qlogic.org> (raw)
In-Reply-To: <20050228210024.GM4021@stusta.de>

On Mon, 28 Feb 2005, Adrian Bunk wrote:

> This patch contains the following cleanups:
> - make needlessly global code static

As Christoph mentioned, the firmware images are auto-generated, so I'd
rather hold off on those deltas.  Besides, I'm hoping in the near
future to drop the firmware from the distribution and begin to use the
request_firmware() interface exclusively.

> - kill the unused global *_version and *_version_str variables
>   in the firmware files
> 

The driver is also going through some significant overhauling with the
fc_remote_port stuffs -- where most internal queueing is stripped from
the driver.  

> -static __inline__ void qla2x00_add_timer_to_cmd(srb_t *, int);
> -static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *);
> -
> -/**************************************************************************
> -*   qla2x00_add_timer_to_cmd
> -*
> -* Description:
> -*       Creates a timer for the specified command. The timeout is usually
> -*       the command time from kernel minus 2 secs.
> -*
> -* Input:
> -*     sp - pointer to validate
> -*
> -* Returns:
> -*     None.
> -**************************************************************************/
> -static inline void
> -qla2x00_add_timer_to_cmd(srb_t *sp, int timeout)
> -{
> -	init_timer(&sp->timer);
> -	sp->timer.expires = jiffies + timeout * HZ;
> -	sp->timer.data = (unsigned long) sp;
> -	sp->timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout;
> -	add_timer(&sp->timer);
> -}
> -
> -/**************************************************************************
> -*   qla2x00_delete_timer_from_cmd
> -*
> -* Description:
> -*       Delete the timer for the specified command.
> -*
> -* Input:
> -*     sp - pointer to validate
> -*
> -* Returns:
> -*     None.
> -**************************************************************************/
> -static inline void 
> -qla2x00_delete_timer_from_cmd(srb_t *sp)
> -{
> -	if (sp->timer.function != NULL) {
> -		del_timer(&sp->timer);
> -		sp->timer.function =  NULL;
> -		sp->timer.data = (unsigned long) NULL;
> -	}
> -}
> -

these codes will be dropped from the driver.

>  /*
>   * SRB allocation cache
>   */
> -char srb_cachep_name[16];
> -kmem_cache_t *srb_cachep;
> +static char srb_cachep_name[16];
> +static kmem_cache_t *srb_cachep;
>  
>  /*
>   * Stats for all adpaters.
> @@ -47,13 +47,12 @@
>  /*
>   * Ioctl related information.
>   */
> -int num_hosts;
> -int apiHBAInstance;
> +static int num_hosts;
>  
>  /*
>   * Module parameter information and variables
>   */
> -int ql2xmaxqdepth;
> +static int ql2xmaxqdepth;
>  module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xmaxqdepth,
>  		"Maximum queue depth to report for target devices.");
> @@ -69,13 +68,13 @@
>  		"Maximum number of command retries to a port that returns"
>  		"a PORT-DOWN status.");
>  
> -int ql2xretrycount = 20;
> +static int ql2xretrycount = 20;
>  module_param(ql2xretrycount, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xretrycount,
>  		"Maximum number of mid-layer retries allowed for a command.  "
>  		"Default value is 20, ");
>  
> -int displayConfig;
> +static int displayConfig;
>  module_param(displayConfig, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(displayConfig,
>  		"If 1 then display the configuration used in /etc/modprobe.conf.");
> @@ -100,7 +99,7 @@
>  		"ZIO: Waiting time for Firmware before it generates an "
>  		"interrupt to the host to notify completion of request.");
>  
> -int ConfigRequired;
> +static int ConfigRequired;
>  module_param(ConfigRequired, int, S_IRUGO|S_IRUSR);
>  MODULE_PARM_DESC(ConfigRequired,
>  		"If 1, then only configured devices passed in through the"
> @@ -119,7 +118,7 @@
>  		"target returns a <NOT READY> status.  Default is 10 "
>  		"iterations.");
>  
> -int ql2xdoinitscan = 1;
> +static int ql2xdoinitscan = 1;
>  module_param(ql2xdoinitscan, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(ql2xdoinitscan,
>  		"Signal mid-layer to perform scan after driver load: 0 -- no "
> @@ -163,6 +162,8 @@

I'll queue-up these for the next set of patches.

Thanks,
Andrew Vasquez

      parent reply	other threads:[~2005-02-28 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-28 21:00 [2.6 patch] drivers/scsi/qla2xxx/: cleanups Adrian Bunk
2005-02-28 21:29 ` Christoph Hellwig
2005-02-28 21:53   ` Adrian Bunk
2005-02-28 21:56 ` Andrew Vasquez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050228215645.GB9215@plap.qlogic.org \
    --to=andrew.vasquez@qlogic.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox