[PATCH] Re: [openib-general] cache.c
Arkady Kanevsky
arkady at netapp.com
Wed Feb 15 07:34:18 PST 2006
Agreed. Pointer is a pointer.
Here is a patch.
svn diff --diff-cmd "/usr/bin/diff" -x -up cache.c
Index: cache.c
===================================================================
--- cache.c (revision 5407)
+++ cache.c (working copy)
@@ -3,6 +3,7 @@
* Copyright (c) 2005 Intel Corporation. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2006 Network Appliance, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
@@ -302,7 +303,7 @@ static void ib_cache_setup_one(struct ib
kmalloc(sizeof *device->cache.pkey_cache *
(end_port(device) - start_port(device) + 1),
GFP_KERNEL);
device->cache.gid_cache =
- kmalloc(sizeof *device->cache.pkey_cache *
+ kmalloc(sizeof *device->cache.gid_cache *
(end_port(device) - start_port(device) + 1),
GFP_KERNEL);
if (!device->cache.pkey_cache || !device->cache.gid_cache) {
*******************************************
Arkady
On Tuesday 14 February 2006 09:44 am, Roland Dreier wrote:
> Arkady> Roland, in core/cache.c
>
> Arkady> should
> device-> cache.gid_cache =
> Arkady> kmalloc(sizeof *device->cache.pkey_cache *
> Arkady> (end_port(device) - start_port(device) + 1), GFP_KERNEL);
>
> Arkady> be
>
> device-> cache.gid_cache =
> Arkady> kmalloc(sizeof *device->cache.gid_cache *
> Arkady> (end_port(device) - start_port(device) + 1), GFP_KERNEL);
>
> Yes, I guess so. It makes no practical difference since all pointers
> are always going to be the same size, but we might as well get it
> right. Care to send a patch?
>
> Thanks,
> Roland
More information about the general
mailing list