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] hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel
Date: Sun, 04 Feb 2018 11:23:46 +0000 [thread overview]
Message-ID: <20180204112346.0977e938@archlinux> (raw)
In-Reply-To: <0406765c-bdd1-1a82-cf66-1c248063ae4f@users.sourceforge.net>
On Wed, 31 Jan 2018 22:26:14 +0100
SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 31 Jan 2018 22:20:56 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Marcus,
If making changes like this I would suggest only sending one until
you have have a response from the relevant maintainer.
It would save you time as often these sorts of changes are
a matter of personal taste and weighing up of costs vs gains
- hence it is not obvious that they will be accepted.
Jonathan
> ---
> drivers/iio/accel/hid-sensor-accel-3d.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
> index c066a3bdbff7..3d0acde40285 100644
> --- a/drivers/iio/accel/hid-sensor-accel-3d.c
> +++ b/drivers/iio/accel/hid-sensor-accel-3d.c
> @@ -383,11 +383,9 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
> return ret;
> }
> indio_dev->channels = kmemdup(channel_spec, channel_size, GFP_KERNEL);
> -
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
> +
> ret = accel_3d_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
> hsdev->usage, accel_state);
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] hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_probe()
Date: Sun, 4 Feb 2018 11:23:46 +0000 [thread overview]
Message-ID: <20180204112346.0977e938@archlinux> (raw)
In-Reply-To: <0406765c-bdd1-1a82-cf66-1c248063ae4f@users.sourceforge.net>
On Wed, 31 Jan 2018 22:26:14 +0100
SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 31 Jan 2018 22:20:56 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Marcus,
If making changes like this I would suggest only sending one until
you have have a response from the relevant maintainer.
It would save you time as often these sorts of changes are
a matter of personal taste and weighing up of costs vs gains
- hence it is not obvious that they will be accepted.
Jonathan
> ---
> drivers/iio/accel/hid-sensor-accel-3d.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
> index c066a3bdbff7..3d0acde40285 100644
> --- a/drivers/iio/accel/hid-sensor-accel-3d.c
> +++ b/drivers/iio/accel/hid-sensor-accel-3d.c
> @@ -383,11 +383,9 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
> return ret;
> }
> indio_dev->channels = kmemdup(channel_spec, channel_size, GFP_KERNEL);
> -
> - if (!indio_dev->channels) {
> - dev_err(&pdev->dev, "failed to duplicate channels\n");
> + if (!indio_dev->channels)
> return -ENOMEM;
> - }
> +
> ret = accel_3d_parse_report(pdev, hsdev,
> (struct iio_chan_spec *)indio_dev->channels,
> hsdev->usage, accel_state);
next prev parent reply other threads:[~2018-02-04 11:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 21:26 [PATCH] hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_ SF Markus Elfring
2018-01-31 21:26 ` [PATCH] hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_probe() SF Markus Elfring
2018-02-04 11:23 ` Jonathan Cameron [this message]
2018-02-04 11:23 ` Jonathan Cameron
2018-02-05 18:26 ` hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_prob SF Markus Elfring
2018-02-05 18:26 ` hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_probe() SF Markus Elfring
2018-02-05 21:51 ` hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_prob Jonathan Cameron
2018-02-05 21:51 ` hid-sensor-accel-3d: Delete an error message for a failed memory allocation in hid_accel_3d_probe() Jonathan Cameron
2018-02-05 21:51 ` Jonathan Cameron
2018-02-06 8:45 ` Software evolution around “checkpatch.pl”? SF Markus Elfring
2018-02-06 8:45 ` SF Markus Elfring
2018-02-10 14:53 ` Jonathan Cameron
2018-02-10 14:59 ` Joe Perches
2018-02-10 14:59 ` Joe Perches
2018-02-10 14:59 ` Joe Perches
2018-02-10 15:57 ` Jonathan Cameron
2018-02-10 15:57 ` Jonathan Cameron
2018-02-10 15:57 ` Jonathan Cameron
2018-02-10 17:42 ` Joe Perches
2018-02-10 17:42 ` Joe Perches
2018-02-10 17:42 ` Joe Perches
2018-02-10 18:30 ` SF Markus Elfring
2018-02-10 18:30 ` SF Markus Elfring
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=20180204112346.0977e938@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.