All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>
Subject: Re: [PATCH] soc: amlogic: socinfo: Avoid soc_device_to_device()
Date: Tue, 12 Nov 2019 06:40:03 +0100	[thread overview]
Message-ID: <20191112054003.GD1210104@kroah.com> (raw)
In-Reply-To: <20191111221521.1587-1-afaerber@suse.de>

On Mon, Nov 11, 2019 at 11:15:21PM +0100, Andreas Färber wrote:
> The helper soc_device_to_device() is considered deprecated.
> For a driver __init function the predictable prefix text
> "soc soc0:" from dev_info() does not add real value, so use
> pr_info() to emit the info text without such prefix.
> 
> While at it, normalize the casing of "detected" for GX.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  drivers/soc/amlogic/meson-gx-socinfo.c | 4 +---
>  drivers/soc/amlogic/meson-mx-socinfo.c | 4 ++--
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
> index 01fc0d20a70d..105b819bbd5f 100644
> --- a/drivers/soc/amlogic/meson-gx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-gx-socinfo.c
> @@ -129,7 +129,6 @@ static int __init meson_gx_socinfo_init(void)
>  	struct device_node *np;
>  	struct regmap *regmap;
>  	unsigned int socinfo;
> -	struct device *dev;
>  	int ret;
>  
>  	/* look up for chipid node */
> @@ -192,9 +191,8 @@ static int __init meson_gx_socinfo_init(void)
>  		kfree(soc_dev_attr);
>  		return PTR_ERR(soc_dev);
>  	}
> -	dev = soc_device_to_device(soc_dev);
>  
> -	dev_info(dev, "Amlogic Meson %s Revision %x:%x (%x:%x) Detected\n",
> +	pr_info("Amlogic Meson %s Revision %x:%x (%x:%x) detected\n",

This should message should just be removed entirely.

>  			soc_dev_attr->soc_id,
>  			socinfo_to_major(socinfo),
>  			socinfo_to_minor(socinfo),
> diff --git a/drivers/soc/amlogic/meson-mx-socinfo.c b/drivers/soc/amlogic/meson-mx-socinfo.c
> index 78f0f1aeca57..7db2c94a7130 100644
> --- a/drivers/soc/amlogic/meson-mx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-mx-socinfo.c
> @@ -167,8 +167,8 @@ static int __init meson_mx_socinfo_init(void)
>  		return PTR_ERR(soc_dev);
>  	}
>  
> -	dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n",
> -		 soc_dev_attr->soc_id, soc_dev_attr->revision);
> +	pr_info("Amlogic %s %s detected\n",
> +		soc_dev_attr->soc_id, soc_dev_attr->revision);

Same here, no need to polute the kernel log for when all is going just
fine.

That's why we created "common" driver init helpers, to prevent the
ability for this type of noise from even being able to be created at
all.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: amlogic: socinfo: Avoid soc_device_to_device()
Date: Tue, 12 Nov 2019 06:40:03 +0100	[thread overview]
Message-ID: <20191112054003.GD1210104@kroah.com> (raw)
In-Reply-To: <20191111221521.1587-1-afaerber@suse.de>

On Mon, Nov 11, 2019 at 11:15:21PM +0100, Andreas Färber wrote:
> The helper soc_device_to_device() is considered deprecated.
> For a driver __init function the predictable prefix text
> "soc soc0:" from dev_info() does not add real value, so use
> pr_info() to emit the info text without such prefix.
> 
> While at it, normalize the casing of "detected" for GX.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  drivers/soc/amlogic/meson-gx-socinfo.c | 4 +---
>  drivers/soc/amlogic/meson-mx-socinfo.c | 4 ++--
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
> index 01fc0d20a70d..105b819bbd5f 100644
> --- a/drivers/soc/amlogic/meson-gx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-gx-socinfo.c
> @@ -129,7 +129,6 @@ static int __init meson_gx_socinfo_init(void)
>  	struct device_node *np;
>  	struct regmap *regmap;
>  	unsigned int socinfo;
> -	struct device *dev;
>  	int ret;
>  
>  	/* look up for chipid node */
> @@ -192,9 +191,8 @@ static int __init meson_gx_socinfo_init(void)
>  		kfree(soc_dev_attr);
>  		return PTR_ERR(soc_dev);
>  	}
> -	dev = soc_device_to_device(soc_dev);
>  
> -	dev_info(dev, "Amlogic Meson %s Revision %x:%x (%x:%x) Detected\n",
> +	pr_info("Amlogic Meson %s Revision %x:%x (%x:%x) detected\n",

This should message should just be removed entirely.

>  			soc_dev_attr->soc_id,
>  			socinfo_to_major(socinfo),
>  			socinfo_to_minor(socinfo),
> diff --git a/drivers/soc/amlogic/meson-mx-socinfo.c b/drivers/soc/amlogic/meson-mx-socinfo.c
> index 78f0f1aeca57..7db2c94a7130 100644
> --- a/drivers/soc/amlogic/meson-mx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-mx-socinfo.c
> @@ -167,8 +167,8 @@ static int __init meson_mx_socinfo_init(void)
>  		return PTR_ERR(soc_dev);
>  	}
>  
> -	dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n",
> -		 soc_dev_attr->soc_id, soc_dev_attr->revision);
> +	pr_info("Amlogic %s %s detected\n",
> +		soc_dev_attr->soc_id, soc_dev_attr->revision);

Same here, no need to polute the kernel log for when all is going just
fine.

That's why we created "common" driver init helpers, to prevent the
ability for this type of noise from even being able to be created at
all.

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: amlogic: socinfo: Avoid soc_device_to_device()
Date: Tue, 12 Nov 2019 06:40:03 +0100	[thread overview]
Message-ID: <20191112054003.GD1210104@kroah.com> (raw)
In-Reply-To: <20191111221521.1587-1-afaerber@suse.de>

On Mon, Nov 11, 2019 at 11:15:21PM +0100, Andreas Färber wrote:
> The helper soc_device_to_device() is considered deprecated.
> For a driver __init function the predictable prefix text
> "soc soc0:" from dev_info() does not add real value, so use
> pr_info() to emit the info text without such prefix.
> 
> While at it, normalize the casing of "detected" for GX.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  drivers/soc/amlogic/meson-gx-socinfo.c | 4 +---
>  drivers/soc/amlogic/meson-mx-socinfo.c | 4 ++--
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
> index 01fc0d20a70d..105b819bbd5f 100644
> --- a/drivers/soc/amlogic/meson-gx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-gx-socinfo.c
> @@ -129,7 +129,6 @@ static int __init meson_gx_socinfo_init(void)
>  	struct device_node *np;
>  	struct regmap *regmap;
>  	unsigned int socinfo;
> -	struct device *dev;
>  	int ret;
>  
>  	/* look up for chipid node */
> @@ -192,9 +191,8 @@ static int __init meson_gx_socinfo_init(void)
>  		kfree(soc_dev_attr);
>  		return PTR_ERR(soc_dev);
>  	}
> -	dev = soc_device_to_device(soc_dev);
>  
> -	dev_info(dev, "Amlogic Meson %s Revision %x:%x (%x:%x) Detected\n",
> +	pr_info("Amlogic Meson %s Revision %x:%x (%x:%x) detected\n",

This should message should just be removed entirely.

>  			soc_dev_attr->soc_id,
>  			socinfo_to_major(socinfo),
>  			socinfo_to_minor(socinfo),
> diff --git a/drivers/soc/amlogic/meson-mx-socinfo.c b/drivers/soc/amlogic/meson-mx-socinfo.c
> index 78f0f1aeca57..7db2c94a7130 100644
> --- a/drivers/soc/amlogic/meson-mx-socinfo.c
> +++ b/drivers/soc/amlogic/meson-mx-socinfo.c
> @@ -167,8 +167,8 @@ static int __init meson_mx_socinfo_init(void)
>  		return PTR_ERR(soc_dev);
>  	}
>  
> -	dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n",
> -		 soc_dev_attr->soc_id, soc_dev_attr->revision);
> +	pr_info("Amlogic %s %s detected\n",
> +		soc_dev_attr->soc_id, soc_dev_attr->revision);

Same here, no need to polute the kernel log for when all is going just
fine.

That's why we created "common" driver init helpers, to prevent the
ability for this type of noise from even being able to be created at
all.

thanks,

greg k-h

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2019-11-12  5:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 22:15 [PATCH] soc: amlogic: socinfo: Avoid soc_device_to_device() Andreas Färber
2019-11-11 22:15 ` Andreas Färber
2019-11-11 22:15 ` Andreas Färber
2019-11-12  5:40 ` Greg Kroah-Hartman [this message]
2019-11-12  5:40   ` Greg Kroah-Hartman
2019-11-12  5:40   ` Greg Kroah-Hartman
2019-11-12  8:11   ` Andreas Färber
2019-11-12  8:11     ` Andreas Färber
2019-11-12  8:11     ` Andreas Färber
2019-11-12  9:06     ` Neil Armstrong
2019-11-12  9:06       ` Neil Armstrong
2019-11-12  9:06       ` Neil Armstrong

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=20191112054003.GD1210104@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=afaerber@suse.de \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.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.