Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36207
b: refs/heads/master
c: 5718178
h: refs/heads/master
i:
  36205: 7b7c2c3
  36203: 9a88fae
  36199: 107ee6e
  36191: 916781a
v: v3
  • Loading branch information
Pekka J Enberg authored and Linus Torvalds committed Sep 27, 2006
1 parent 1b5f1a1 commit 4bd0908
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7583ddfd3aae1007bc4fc67ea4c07d573d376e9e
refs/heads/master: 571817849c76aabf34d534c905b5e604f2e824c5
13 changes: 3 additions & 10 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,10 @@ msi_register(struct msi_ops *ops)
return 0;
}

static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
{
memset(p, 0, sizeof(struct msi_desc));
}

static int msi_cache_init(void)
{
msi_cachep = kmem_cache_create("msi_cache",
sizeof(struct msi_desc),
0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL);
msi_cachep = kmem_cache_create("msi_cache", sizeof(struct msi_desc),
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
if (!msi_cachep)
return -ENOMEM;

Expand Down Expand Up @@ -402,11 +396,10 @@ static struct msi_desc* alloc_msi_entry(void)
{
struct msi_desc *entry;

entry = kmem_cache_alloc(msi_cachep, SLAB_KERNEL);
entry = kmem_cache_zalloc(msi_cachep, GFP_KERNEL);
if (!entry)
return NULL;

memset(entry, 0, sizeof(struct msi_desc));
entry->link.tail = entry->link.head = 0; /* single message */
entry->dev = NULL;

Expand Down

0 comments on commit 4bd0908

Please sign in to comment.