Skip to content

Commit

Permalink
[SCSI] tgt: use KMEM_CACHE macro
Browse files Browse the repository at this point in the history
This uses new KMEM_CACHE() macro instead of kmem_cache_create directly
to simplify slab cache creation.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 16, 2008
1 parent 423eef6 commit b312bab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/scsi_tgt_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,7 @@ static int __init scsi_tgt_init(void)
{
int err;

scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
sizeof(struct scsi_tgt_cmd),
0, 0, NULL);
scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
if (!scsi_tgt_cmd_cache)
return -ENOMEM;

Expand Down

0 comments on commit b312bab

Please sign in to comment.