From: Shuah Khan <shuah@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Valentina Manea <valentina.manea.m@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Shuah Khan <shuahkh@osg.samsung.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions
Date: Tue, 5 Dec 2017 15:14:57 -0700 [thread overview]
Message-ID: <cafd3792-f02a-7643-a263-4e1523428ca6@kernel.org> (raw)
In-Reply-To: <ffdb1a7c-2dd6-416e-e13f-e54289e2c194@users.sourceforge.net>
On 12/05/2017 02:49 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 5 Dec 2017 22:25:38 +0100
>
> Omit an extra message for a memory allocation failure in these functions.
>
> This issue was detected by using the Coccinelle software.
Please include the problem and log from Coccinelle software in any
future patches for the issues detected by Coccinelle.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/usb/usbip/stub_rx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c
> index 536e037f541f..a70eb81823a3 100644
> --- a/drivers/usb/usbip/stub_rx.c
> +++ b/drivers/usb/usbip/stub_rx.c
> @@ -302,7 +302,6 @@ static struct stub_priv *stub_priv_alloc(struct stub_device *sdev,
>
> priv = kmem_cache_zalloc(stub_priv_cache, GFP_ATOMIC);
> if (!priv) {
> - dev_err(&sdev->udev->dev, "alloc stub_priv\n");
> spin_unlock_irqrestore(&sdev->priv_lock, flags);
> usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
> return NULL;
> @@ -466,7 +465,6 @@ static void stub_recv_cmd_submit(struct stub_device *sdev,
> priv->urb->setup_packet = kmemdup(&pdu->u.cmd_submit.setup, 8,
> GFP_KERNEL);
> if (!priv->urb->setup_packet) {
> - dev_err(&udev->dev, "allocate setup_packet\n");
If Coccinelle found this as an extra message, there is something
wrong with the Coccinelle script. This is not an extra message.
This message is for the second kmemdup() failure and is necessary.
> usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
> return;
> }
>
thanks,
-- Shuah
next prev parent reply other threads:[~2017-12-05 22:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 21:48 [PATCH 0/2] usbip: Adjustments for two function implementations SF Markus Elfring
2017-12-05 21:49 ` [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2017-12-05 22:14 ` Shuah Khan [this message]
2017-12-06 9:10 ` SF Markus Elfring
2017-12-05 21:52 ` [PATCH 2/2] usbip: Use common error handling code in stub_recv_cmd_submit() SF Markus Elfring
2017-12-05 22:21 ` Shuah Khan
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=cafd3792-f02a-7643-a263-4e1523428ca6@kernel.org \
--to=shuah@kernel.org \
--cc=elfring@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=valentina.manea.m@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome