From: SF Markus Elfring <elfring@users.sourceforge.net>
To: shuah@kernel.org, linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Shuah Khan <shuahkh@osg.samsung.com>,
Valentina Manea <valentina.manea.m@gmail.com>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions
Date: Wed, 6 Dec 2017 10:10:29 +0100 [thread overview]
Message-ID: <e1078aa2-b2c6-abd9-bad1-098528c9ff5b@users.sourceforge.net> (raw)
In-Reply-To: <cafd3792-f02a-7643-a263-4e1523428ca6@kernel.org>
>> 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
Do you find the wording “WARNING: Possible unnecessary 'out of memory' message”
from the script “checkpatch.pl” more reasonable?
> and log from Coccinelle software
There is no log file from which I could extract something for this case.
> in any future patches for the issues detected by Coccinelle.
Would you like to help a bit to make the commit message better for your needs?
>> @@ -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.
The source code analysis approach could be improved somehow.
> This is not an extra message.
There can be different opinions around the handling of such exceptional situations.
> This message is for the second kmemdup() failure and is necessary.
This function is called only once within the implementation of
the function “stub_recv_cmd_submit” (and in this source file).
Do you find a default Linux allocation failure report insufficient?
Regards,
Markus
next prev parent reply other threads:[~2017-12-06 9:11 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
2017-12-06 9:10 ` SF Markus Elfring [this message]
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=e1078aa2-b2c6-abd9-bad1-098528c9ff5b@users.sourceforge.net \
--to=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=shuah@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