From: Felipe Balbi <balbi@ti.com>
To: George Cherian <george.cherian@ti.com>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<mugunthanvnm@ti.com>, <davem@davemloft.net>, <balbi@ti.com>,
<zonque@gmail.com>, <mpa@pengutronix.de>,
<bhutchings@solarflare.com>
Subject: Re: [PATCH 2/3] net: davinci_mdio: Convert pr_err() to dev_err() call
Date: Fri, 2 May 2014 09:18:04 -0500 [thread overview]
Message-ID: <20140502141804.GB4631@saruman.home> (raw)
In-Reply-To: <1399026017-734-3-git-send-email-george.cherian@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
On Fri, May 02, 2014 at 03:50:16PM +0530, George Cherian wrote:
> Convert the lone pr_err() to dev_err() call.
> Also, Convert kzalloc to devm_kzalloc.
>
> Signed-off-by: George Cherian <george.cherian@ti.com>
> ---
there's a kfree(data) on davinci_mdio_remove() which could be deleted
too. Other than that:
Reviewed-by: Felipe Balbi <balbi@ti.com>
> drivers/net/ethernet/ti/davinci_mdio.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
> index 0cca9de..1b2e30a 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -303,7 +303,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
> return -EINVAL;
>
> if (of_property_read_u32(node, "bus_freq", &prop)) {
> - pr_err("Missing bus_freq property in the DT.\n");
> + dev_err(&pdev->dev, "Missing bus_freq property in the DT.\n");
> return -EINVAL;
> }
> data->bus_freq = prop;
> @@ -321,7 +321,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
> struct phy_device *phy;
> int ret, addr;
>
> - data = kzalloc(sizeof(*data), GFP_KERNEL);
> + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> @@ -414,8 +414,6 @@ bail_out:
> pm_runtime_put_sync(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
>
> - kfree(data);
> -
> return ret;
> }
>
> --
> 1.8.3.1
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-05-02 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1399026017-734-1-git-send-email-george.cherian@ti.com>
[not found] ` <1399026017-734-2-git-send-email-george.cherian@ti.com>
2014-05-02 14:16 ` [PATCH 1/3] driver net: cpsw: Convert pr_*() to dev_*() calls Felipe Balbi
[not found] ` <1399026017-734-3-git-send-email-george.cherian@ti.com>
2014-05-02 14:18 ` Felipe Balbi [this message]
[not found] ` <1399026017-734-4-git-send-email-george.cherian@ti.com>
2014-05-02 14:21 ` [PATCH 3/3] drivers: net: davinci_cpdma: Convert kzalloc() to devm_kzalloc() Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140502141804.GB4631@saruman.home \
--to=balbi@ti.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=george.cherian@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpa@pengutronix.de \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=zonque@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®