lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52204FA4.3060700@atmel.com>
Date:	Fri, 30 Aug 2013 09:54:12 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Jingoo Han <jg1.han@...sung.com>
CC:	"'David S. Miller'" <davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 06/31] net: macb: use dev_get_platdata()

On 30/08/2013 07:12, Jingoo Han :
> Use the wrapper function for retrieving the platform data instead of
> accessing dev->platform_data directly. This is a cosmetic change
> to make the code simpler and enhance the readability.
>
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>

Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>

> ---
>   drivers/net/ethernet/cadence/macb.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index fe06ab0..20f94d1 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -125,7 +125,7 @@ void macb_get_hwaddr(struct macb *bp)
>   	u8 addr[6];
>   	int i;
>
> -	pdata = bp->pdev->dev.platform_data;
> +	pdata = dev_get_platdata(&bp->pdev->dev);
>
>   	/* Check all 4 address register for vaild address */
>   	for (i = 0; i < 4; i++) {
> @@ -335,7 +335,7 @@ int macb_mii_init(struct macb *bp)
>   		bp->pdev->name, bp->pdev->id);
>   	bp->mii_bus->priv = bp;
>   	bp->mii_bus->parent = &bp->dev->dev;
> -	pdata = bp->pdev->dev.platform_data;
> +	pdata = dev_get_platdata(&bp->pdev->dev);
>
>   	bp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
>   	if (!bp->mii_bus->irq) {
> @@ -1851,7 +1851,7 @@ static int __init macb_probe(struct platform_device *pdev)
>
>   	err = of_get_phy_mode(pdev->dev.of_node);
>   	if (err < 0) {
> -		pdata = pdev->dev.platform_data;
> +		pdata = dev_get_platdata(&pdev->dev);
>   		if (pdata && pdata->is_rmii)
>   			bp->phy_interface = PHY_INTERFACE_MODE_RMII;
>   		else
>


-- 
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ