From: Julia Lawall <julia.lawall@lip6.fr>
To: D A <runezcape@gmail.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3 v2] drivers/net/ethernet/ti: Move call to PTR_ERR after reassignment
Date: Thu, 02 Feb 2012 16:05:02 +0000 [thread overview]
Message-ID: <alpine.DEB.2.02.1202021702500.1928@localhost6.localdomain6> (raw)
In-Reply-To: <CABPrwzf0hH+2OOFQ2Q6ZVHwn=Ws3SvxbwVn0LwKjfkYVdP8zgg@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3332 bytes --]
On Thu, 2 Feb 2012, D A wrote:
> hello all,
>
> im in the janitors for a while now and i keep looking at the emails you keep
> sending to eachother, but i m lost, i have a back ground in C how can i be
> part of this, any body can give some help to start, a small task that i can
> begin with ?
There are hundreds of places where the various devm_ functions, eg
devm_kzalloc, could be used. Proceed slowly and carefully...
Documentation/driver-model/devres.txt
julia
>
> there must be a way or a strategy to absorb new members, i m 3 months now or
> more.
>
>
> On Thu, Feb 2, 2012 at 4:53 PM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> PTR_ERR should be called before its argument is cleared.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression e,e1;
> constant c;
> @@
>
> *e = c
> ... when != e = e1
> when != &e
> when != true IS_ERR(e)
> *PTR_ERR(e)
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> Reported-by: Josh Triplett <josh@joshtriplett.org>
>
> ---
> v2: correct commit message.
>
> drivers/net/ethernet/ti/davinci_emac.c | 3 ++-
> drivers/net/ethernet/ti/davinci_mdio.c | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_emac.c
> b/drivers/net/ethernet/ti/davinci_emac.c
> index efd4f3e..922a937 100644
> --- a/drivers/net/ethernet/ti/davinci_emac.c
> +++ b/drivers/net/ethernet/ti/davinci_emac.c
> @@ -1600,8 +1600,9 @@ static int emac_dev_open(struct net_device
> *ndev)
> if (IS_ERR(priv->phydev)) {
> dev_err(emac_dev, "could not connect to
> phy %s\n",
> priv->phy_id);
> + ret = PTR_ERR(priv->phydev);
> priv->phydev = NULL;
> - return PTR_ERR(priv->phydev);
> + return ret;
> }
>
> priv->link = 0;
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c
> b/drivers/net/ethernet/ti/davinci_mdio.c
> index ef7c9c1..af8b8fc 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -318,9 +318,9 @@ static int __devinit
> davinci_mdio_probe(struct platform_device *pdev)
>
> data->clk = clk_get(dev, NULL);
> if (IS_ERR(data->clk)) {
> - data->clk = NULL;
> dev_err(dev, "failed to get device clock\n");
> ret = PTR_ERR(data->clk);
> + data->clk = NULL;
> goto bail_out;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
>
>
>
next prev parent reply other threads:[~2012-02-02 16:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 14:00 [PATCH 0/3] Move call to PTR_ERR after reassignment Julia Lawall
2012-02-02 14:00 ` [PATCH 1/3] drivers/power/pda_power.c: " Julia Lawall
2012-02-02 14:00 ` [PATCH 2/3] drivers/net/ethernet/ti/davinci_xxx.c: " Julia Lawall
2012-02-02 14:00 ` [PATCH 3/3] kernel/rcutorture.c: " Julia Lawall
2012-02-02 14:52 ` [PATCH 0/3] " Julia Lawall
2012-02-02 14:53 ` [PATCH 1/3 v2] drivers/power/pda_power.c: " Julia Lawall
2012-02-02 14:53 ` [PATCH 2/3 v2] drivers/net/ethernet/ti: " Julia Lawall
[not found] ` <CABPrwzf0hH+2OOFQ2Q6ZVHwn=Ws3SvxbwVn0LwKjfkYVdP8zgg@mail.gmail.com>
2012-02-02 16:05 ` Julia Lawall [this message]
2012-02-02 19:37 ` David Miller
2012-02-02 14:53 ` [PATCH 3/3 v2] kernel/rcutorture.c: " Julia Lawall
2012-02-02 15:53 ` Paul E. McKenney
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=alpine.DEB.2.02.1202021702500.1928@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=runezcape@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