All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Kamel Bouhara <kamel.bouhara@bootlin.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] counter: microchip-tcb-capture: check the correct variable
Date: Sat, 19 Sep 2020 15:36:13 +0000	[thread overview]
Message-ID: <20200919163613.7984587c@archlinux> (raw)
In-Reply-To: <20200727122825.GA5614@shinobu>

On Mon, 27 Jul 2020 08:28:25 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Mon, Jul 27, 2020 at 02:23:16PM +0300, Dan Carpenter wrote:
> > This should be testing "regmap" instead of "priv->regmap".  The
> > "priv->regmap" variable is always zero so it's not an error pointer.
> > 
> > Fixes: 106b104137fd ("counter: Add microchip TCB capture counter")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>  
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Seems I applied this one a while back but never replied to this thread.
Sorry about that!

Jonathan

> 
> > ---
> > The commit 106b104137fd ("counter: Add microchip TCB capture counter")
> > doesn't use the correct patch prefix.  This is a common mistake for the
> > the first commit which adds the driver.  There is no kernel wide
> > standard for patch prefixes so it's difficult for people sending fixes
> > to know the correct prefix should be.
> > 
> >  drivers/counter/microchip-tcb-capture.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
> > index f7b7743ddb94..b7b252c5addf 100644
> > --- a/drivers/counter/microchip-tcb-capture.c
> > +++ b/drivers/counter/microchip-tcb-capture.c
> > @@ -320,8 +320,8 @@ static int mchp_tc_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	regmap = syscon_node_to_regmap(np->parent);
> > -	if (IS_ERR(priv->regmap))
> > -		return PTR_ERR(priv->regmap);
> > +	if (IS_ERR(regmap))
> > +		return PTR_ERR(regmap);
> >  
> >  	/* max. channels number is 2 when in QDEC mode */
> >  	priv->num_channels = of_property_count_u32_elems(np, "reg");
> > -- 
> > 2.27.0
> >   

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Kamel Bouhara <kamel.bouhara@bootlin.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] counter: microchip-tcb-capture: check the correct variable
Date: Sat, 19 Sep 2020 16:36:13 +0100	[thread overview]
Message-ID: <20200919163613.7984587c@archlinux> (raw)
In-Reply-To: <20200727122825.GA5614@shinobu>

On Mon, 27 Jul 2020 08:28:25 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Mon, Jul 27, 2020 at 02:23:16PM +0300, Dan Carpenter wrote:
> > This should be testing "regmap" instead of "priv->regmap".  The
> > "priv->regmap" variable is always zero so it's not an error pointer.
> > 
> > Fixes: 106b104137fd ("counter: Add microchip TCB capture counter")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>  
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Seems I applied this one a while back but never replied to this thread.
Sorry about that!

Jonathan

> 
> > ---
> > The commit 106b104137fd ("counter: Add microchip TCB capture counter")
> > doesn't use the correct patch prefix.  This is a common mistake for the
> > the first commit which adds the driver.  There is no kernel wide
> > standard for patch prefixes so it's difficult for people sending fixes
> > to know the correct prefix should be.
> > 
> >  drivers/counter/microchip-tcb-capture.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
> > index f7b7743ddb94..b7b252c5addf 100644
> > --- a/drivers/counter/microchip-tcb-capture.c
> > +++ b/drivers/counter/microchip-tcb-capture.c
> > @@ -320,8 +320,8 @@ static int mchp_tc_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	regmap = syscon_node_to_regmap(np->parent);
> > -	if (IS_ERR(priv->regmap))
> > -		return PTR_ERR(priv->regmap);
> > +	if (IS_ERR(regmap))
> > +		return PTR_ERR(regmap);
> >  
> >  	/* max. channels number is 2 when in QDEC mode */
> >  	priv->num_channels = of_property_count_u32_elems(np, "reg");
> > -- 
> > 2.27.0
> >   


  reply	other threads:[~2020-09-19 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 11:23 [PATCH] counter: microchip-tcb-capture: check the correct variable Dan Carpenter
2020-07-27 11:23 ` Dan Carpenter
2020-07-27 12:28 ` William Breathitt Gray
2020-07-27 12:28   ` William Breathitt Gray
2020-09-19 15:36   ` Jonathan Cameron [this message]
2020-09-19 15:36     ` Jonathan Cameron

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=20200919163613.7984587c@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kamel.bouhara@bootlin.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vilhelm.gray@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.