From: Jonathan Cameron <jic23@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org,
Hartmut Knaack <knaack.h@gmx.de>, Jiri Kosina <jikos@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio/orientation: Delete an error message for a failed memory allocation in two functions
Date: Sun, 04 Feb 2018 11:01:07 +0000 [thread overview]
Message-ID: <20180204110107.19861b13@archlinux> (raw)
In-Reply-To: <ebf6c923-d641-8bf8-5544-630a5ee39980@users.sourceforge.net>
On Mon, 29 Jan 2018 22:26:15 +0100
SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 29 Jan 2018 22:20:07 +0100
>
> Omit an extra message for a memory allocation failure in these functions.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Same response as previous patch - it might not be adding much information,
but it is adding some so we should keep it.
Jonathan
> ---
> drivers/iio/orientation/hid-sensor-incl-3d.c | 4 +---
> drivers/iio/orientation/hid-sensor-rotation.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c
> index 1e5451d1ff88..742c0e0eb4cf 100644
> --- a/drivers/iio/orientation/hid-sensor-incl-3d.c
> +++ b/drivers/iio/orientation/hid-sensor-incl-3d.c
> @@ -336,10 +336,8 @@ static int hid_incl_3d_probe(struct platform_device *pdev)
>
> indio_dev->channels = kmemdup(incl_3d_channels,
> sizeof(incl_3d_channels), GFP_KERNEL);
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
>
> ret = incl_3d_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
> diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c
> index a69db2002414..cbf5e406b1ee 100644
> --- a/drivers/iio/orientation/hid-sensor-rotation.c
> +++ b/drivers/iio/orientation/hid-sensor-rotation.c
> @@ -277,10 +277,8 @@ static int hid_dev_rot_probe(struct platform_device *pdev)
> indio_dev->channels = devm_kmemdup(&pdev->dev, dev_rot_channels,
> sizeof(dev_rot_channels),
> GFP_KERNEL);
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
>
> ret = dev_rot_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org,
Hartmut Knaack <knaack.h@gmx.de>, Jiri Kosina <jikos@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio/orientation: Delete an error message for a failed memory allocation in two functions
Date: Sun, 4 Feb 2018 11:01:07 +0000 [thread overview]
Message-ID: <20180204110107.19861b13@archlinux> (raw)
In-Reply-To: <ebf6c923-d641-8bf8-5544-630a5ee39980@users.sourceforge.net>
On Mon, 29 Jan 2018 22:26:15 +0100
SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 29 Jan 2018 22:20:07 +0100
>
> Omit an extra message for a memory allocation failure in these functions.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Same response as previous patch - it might not be adding much information,
but it is adding some so we should keep it.
Jonathan
> ---
> drivers/iio/orientation/hid-sensor-incl-3d.c | 4 +---
> drivers/iio/orientation/hid-sensor-rotation.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c
> index 1e5451d1ff88..742c0e0eb4cf 100644
> --- a/drivers/iio/orientation/hid-sensor-incl-3d.c
> +++ b/drivers/iio/orientation/hid-sensor-incl-3d.c
> @@ -336,10 +336,8 @@ static int hid_incl_3d_probe(struct platform_device *pdev)
>
> indio_dev->channels = kmemdup(incl_3d_channels,
> sizeof(incl_3d_channels), GFP_KERNEL);
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
>
> ret = incl_3d_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
> diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c
> index a69db2002414..cbf5e406b1ee 100644
> --- a/drivers/iio/orientation/hid-sensor-rotation.c
> +++ b/drivers/iio/orientation/hid-sensor-rotation.c
> @@ -277,10 +277,8 @@ static int hid_dev_rot_probe(struct platform_device *pdev)
> indio_dev->channels = devm_kmemdup(&pdev->dev, dev_rot_channels,
> sizeof(dev_rot_channels),
> GFP_KERNEL);
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
>
> ret = dev_rot_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
next prev parent reply other threads:[~2018-02-04 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 21:26 [PATCH] iio/orientation: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2018-01-29 21:26 ` SF Markus Elfring
2018-02-04 11:01 ` Jonathan Cameron [this message]
2018-02-04 11:01 ` 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=20180204110107.19861b13@archlinux \
--to=jic23@kernel.org \
--cc=elfring@users.sourceforge.net \
--cc=jikos@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=srinivas.pandruvada@linux.intel.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.