Skip to content

Commit

Permalink
scsi: libsas: Make sas_{alloc, alloc_slow, free}_task() private
Browse files Browse the repository at this point in the history
We have no users outside libsas any longer, so make sas_alloc_task(),
sas_alloc_slow_task(), and sas_free_task() private.

Signed-off-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Damien Le Moal <[email protected]>
Tested-by: Niklas Cassel <[email protected]> # pm80xx
Reviewed-by: Jason Yan <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
John Garry authored and martinkpetersen committed Oct 18, 2022
1 parent 811be57 commit 8e8d436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions drivers/scsi/libsas/sas_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct sas_task *sas_alloc_task(gfp_t flags)

return task;
}
EXPORT_SYMBOL_GPL(sas_alloc_task);

struct sas_task *sas_alloc_slow_task(gfp_t flags)
{
Expand All @@ -56,7 +55,6 @@ struct sas_task *sas_alloc_slow_task(gfp_t flags)

return task;
}
EXPORT_SYMBOL_GPL(sas_alloc_slow_task);

void sas_free_task(struct sas_task *task)
{
Expand All @@ -65,7 +63,6 @@ void sas_free_task(struct sas_task *task)
kmem_cache_free(sas_task_cache, task);
}
}
EXPORT_SYMBOL_GPL(sas_free_task);

/*------------ SAS addr hash -----------*/
void sas_hash_addr(u8 *hashed, const u8 *sas_addr)
Expand Down
4 changes: 4 additions & 0 deletions drivers/scsi/libsas/sas_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ void sas_unregister_phys(struct sas_ha_struct *sas_ha);
struct asd_sas_event *sas_alloc_event(struct asd_sas_phy *phy, gfp_t gfp_flags);
void sas_free_event(struct asd_sas_event *event);

struct sas_task *sas_alloc_task(gfp_t flags);
struct sas_task *sas_alloc_slow_task(gfp_t flags);
void sas_free_task(struct sas_task *task);

int sas_register_ports(struct sas_ha_struct *sas_ha);
void sas_unregister_ports(struct sas_ha_struct *sas_ha);

Expand Down
4 changes: 0 additions & 4 deletions include/scsi/libsas.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,6 @@ struct sas_task_slow {
#define SAS_TASK_STATE_ABORTED 4
#define SAS_TASK_NEED_DEV_RESET 8

extern struct sas_task *sas_alloc_task(gfp_t flags);
extern struct sas_task *sas_alloc_slow_task(gfp_t flags);
extern void sas_free_task(struct sas_task *task);

static inline bool sas_is_internal_abort(struct sas_task *task)
{
return task->task_proto == SAS_PROTOCOL_INTERNAL_ABORT;
Expand Down

0 comments on commit 8e8d436

Please sign in to comment.