lkml.org 
[lkml]   [2007]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] drivers/net/ibmveth.c: memset fix
    Mariusz Kozlowski wrote:
    >>>> Looks like memset() is zeroing wrong nr of bytes.
    >>> Good catch, however, I think we can just remove this memset altogether
    >>> since the memory gets allocated via kzalloc.
    >> Correct, that memset() is superfluous.
    >
    > Ok. Then this should do it.

    Acked-by: Brian King <brking@linux.vnet.ibm.com>

    >
    > Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
    >
    > drivers/net/ibmveth.c | 3 +--
    > 1 file changed, 1 insertion(+), 2 deletions(-)
    >
    > --- linux-2.6.23-rc1-mm2-a/drivers/net/ibmveth.c 2007-08-01 08:43:46.000000000 +0200
    > +++ linux-2.6.23-rc1-mm2-b/drivers/net/ibmveth.c 2007-08-06 23:32:13.000000000 +0200
    > @@ -963,7 +963,7 @@ static int __devinit ibmveth_probe(struc
    > {
    > int rc, i;
    > struct net_device *netdev;
    > - struct ibmveth_adapter *adapter = NULL;
    > + struct ibmveth_adapter *adapter;
    >
    > unsigned char *mac_addr_p;
    > unsigned int *mcastFilterSize_p;
    > @@ -997,7 +997,6 @@ static int __devinit ibmveth_probe(struc
    > SET_MODULE_OWNER(netdev);
    >
    > adapter = netdev->priv;
    > - memset(adapter, 0, sizeof(adapter));
    > dev->dev.driver_data = netdev;
    >
    > adapter->vdev = dev;
    > -
    > To unsubscribe from this list: send the line "unsubscribe netdev" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html


    --
    Brian King
    Linux on Power Virtualization
    IBM Linux Technology Center
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-07 17:43    [W:0.027 / U:0.464 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site