[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa097960-f975-075a-be49-8460f38c0d0a@gmail.com>
Date: Tue, 31 Jan 2017 10:07:07 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Rafał Miłecki <zajec5@...il.com>,
"David S . Miller" <davem@...emloft.net>
Cc: Jon Mason <jon.mason@...adcom.com>,
Felix Fietkau <nbd@...nwrt.org>, netdev@...r.kernel.org,
Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH V2 1/3] net: bgmac: allocate struct bgmac just once &
don't copy it
On 01/28/2017 01:08 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@...ecki.pl>
>
> So far were were allocating struct bgmac in 3 places: platform code,
> bcma code and shared bgmac_enet_probe function. The reason for this was
> bgmac_enet_probe:
> 1) Requiring early-filled struct bgmac
> 2) Calling alloc_etherdev on its own in order to use netdev_priv later
>
> This solution got few drawbacks:
> 1) Was duplicating allocating code
> 2) Required copying early-filled struct
> 3) Resulted in platform/bcma code having access only to unused struct
>
> Solve this situation by simply extracting some probe code into the new
> bgmac_alloc function.
>
> Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists