mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linux-hwmon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] hwmon: drop unnecessary OF name NULL checks
Date: Wed, 29 Aug 2018 13:27:18 -0700	[thread overview]
Message-ID: <20180829202718.GB29801@roeck-us.net> (raw)
In-Reply-To: <20180829200221.13492-1-robh@kernel.org>

On Wed, Aug 29, 2018 at 03:02:21PM -0500, Rob Herring wrote:
> Checking the child node names is pointless as the DT node name can
> never be NULL, so remove it.
> 
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linux-hwmon@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/ibmpowernv.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
> index 4935897f1527..0ccca87f5271 100644
> --- a/drivers/hwmon/ibmpowernv.c
> +++ b/drivers/hwmon/ibmpowernv.c
> @@ -458,9 +458,6 @@ static int populate_attr_groups(struct platform_device *pdev)
>  	for_each_child_of_node(opal, np) {
>  		const char *label;
>  
> -		if (np->name == NULL)
> -			continue;
> -
>  		type = get_sensor_type(np);
>  		if (type == MAX_SENSOR_TYPE)
>  			continue;
> @@ -589,9 +586,6 @@ static int create_device_attrs(struct platform_device *pdev)
>  		const char *label;
>  		enum sensors type;
>  
> -		if (np->name == NULL)
> -			continue;
> -
>  		type = get_sensor_type(np);
>  		if (type == MAX_SENSOR_TYPE)
>  			continue;
> -- 
> 2.17.1
> 

      reply	other threads:[~2018-08-29 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 20:02 Rob Herring
2018-08-29 20:27 ` Guenter Roeck [this message]

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=20180829202718.GB29801@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=benh@kernel.crashing.org \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=robh@kernel.org \
    /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®