[SCSI] libsas: Fix various sparse complaints
Annotate sas_queuecommand with locking details, and clean up a few more sparse warnings about static/non-static declarations. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Родитель
5929faf333
Коммит
8ee24023ef
|
@ -200,6 +200,10 @@ int sas_queue_up(struct sas_task *task)
|
||||||
*/
|
*/
|
||||||
int sas_queuecommand(struct scsi_cmnd *cmd,
|
int sas_queuecommand(struct scsi_cmnd *cmd,
|
||||||
void (*scsi_done)(struct scsi_cmnd *))
|
void (*scsi_done)(struct scsi_cmnd *))
|
||||||
|
__releases(host->host_lock)
|
||||||
|
__acquires(dev->sata_dev.ap->lock)
|
||||||
|
__releases(dev->sata_dev.ap->lock)
|
||||||
|
__acquires(host->host_lock)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct domain_device *dev = cmd_to_domain_dev(cmd);
|
struct domain_device *dev = cmd_to_domain_dev(cmd);
|
||||||
|
@ -410,7 +414,7 @@ static int sas_recover_I_T(struct domain_device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the sas_phy that's attached to this device */
|
/* Find the sas_phy that's attached to this device */
|
||||||
struct sas_phy *find_local_sas_phy(struct domain_device *dev)
|
static struct sas_phy *find_local_sas_phy(struct domain_device *dev)
|
||||||
{
|
{
|
||||||
struct domain_device *pdev = dev->parent;
|
struct domain_device *pdev = dev->parent;
|
||||||
struct ex_phy *exphy = NULL;
|
struct ex_phy *exphy = NULL;
|
||||||
|
|
|
@ -563,7 +563,7 @@ struct sas_task {
|
||||||
struct work_struct abort_work;
|
struct work_struct abort_work;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct kmem_cache *sas_task_cache;
|
||||||
|
|
||||||
#define SAS_TASK_STATE_PENDING 1
|
#define SAS_TASK_STATE_PENDING 1
|
||||||
#define SAS_TASK_STATE_DONE 2
|
#define SAS_TASK_STATE_DONE 2
|
||||||
|
@ -573,7 +573,6 @@ struct sas_task {
|
||||||
|
|
||||||
static inline struct sas_task *sas_alloc_task(gfp_t flags)
|
static inline struct sas_task *sas_alloc_task(gfp_t flags)
|
||||||
{
|
{
|
||||||
extern struct kmem_cache *sas_task_cache;
|
|
||||||
struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
|
struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
|
||||||
|
|
||||||
if (task) {
|
if (task) {
|
||||||
|
@ -590,7 +589,6 @@ static inline struct sas_task *sas_alloc_task(gfp_t flags)
|
||||||
static inline void sas_free_task(struct sas_task *task)
|
static inline void sas_free_task(struct sas_task *task)
|
||||||
{
|
{
|
||||||
if (task) {
|
if (task) {
|
||||||
extern struct kmem_cache *sas_task_cache;
|
|
||||||
BUG_ON(!list_empty(&task->list));
|
BUG_ON(!list_empty(&task->list));
|
||||||
kmem_cache_free(sas_task_cache, task);
|
kmem_cache_free(sas_task_cache, task);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче