From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754364AbdLFJLf (ORCPT ); Wed, 6 Dec 2017 04:11:35 -0500 Received: from mout.web.de ([212.227.15.14]:63782 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754032AbdLFJLb (ORCPT ); Wed, 6 Dec 2017 04:11:31 -0500 Subject: Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions To: shuah@kernel.org, linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , Shuah Khan , Valentina Manea , kernel-janitors@vger.kernel.org, LKML References: <6a84f1e4-a5c1-84da-bd14-de28e306991b@users.sourceforge.net> From: SF Markus Elfring Message-ID: Date: Wed, 6 Dec 2017 10:10:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:nwRWTo6zZCd7rdGQKVIw3gJXjqFRFwu2YM+rgHUlfEyWx2FFgp9 bzkh8DsCdLAqJ5A8hVHzXB3Z1VN7X4liL2OtZzoDaXvZqssYv0PhCRITL9gBdcb5JIyRy2i pl5/iaqMvk4pi3tMhfw0BMuKjBGqXjWm5XxyZC8hvKRLqdOZgAPj7NdDU8GBKhxxyWLmCYe nQZhqjecBDgfQdM2YN7Aw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ia8UDeBWqCA=:dDQE9+IK16r+ieBy0/2RbW mPabZsH7st2X/m4Wodep7tLaAPHOZD3/8ETUBIhKnNlKtdDirPE3uwIkTQ3hjW+tIzcqpk2VQ vE97Aktf9anT0NoY0AbqQUidlDmLkpthvZjqZ/sjxM46Ov+ZdsnAXBaMdgnlGQaxkpffuVkq9 5VPcN7UqhUyrtwkdaLwROShhX7PxcC4UX7rzksC1B+nzZii5Hj2qeM7208rh/r+7kDEI+VXBA iwZsXgJzGPXmvqYHPwUDnCDJw9jfj+6B8DoS0oaWhfHrbZwKkvNtaM9qVbdZ1wNa6Z5ezIgxT uLm+7oCqFGw2fDB01V2JWZfix/k829LpWuArS2B1j3ozA4IIZZBMHnPF5iVSicOKsRuMT0otp vX3ZZ0iWrWOBVKZR0gHUyzbQ9fITEWbM/zgMm+rHxkQsxSguFwS+FNEuYR2c1ULtVIQXyO92v uKPgAoetQG6FanuK1cytErZaq3Tllcfg/HfKb1DF+QYBUr4cGzOUEJWXwipFokrV8KKUObYEf hvCeoHrex+dEem/1NI7XtEMUJVTnnni7/EHobahip6IxYB24TT37ZdcnhlSCBzwB+Dm2Vbhj6 2CoIlK/2C/oBpbf8uoNO9nwI19FJ2mpwXk77qFMZzVb/C1MEuOsX2VFFW5LOcs9FBOjq0wjEC m9PMpGGF1fiKtOyAPhQsBxRHOGkKwU+boCFliGWOroXOLSQXLH6A71A8JDAibJJHNft27xuPQ en0rJ//KcdHF957OJRYNJKXfxHy8gG3tXW41tYh4qAb90mjMMlm6hAT6b4dEolzOtzVK1uI1T lcyIWif7wo+9FStGMdwkZAj40Yokkb6x8X51t3oQFkGVFefUavQZIY0eD3yh3DWQI+3N7ny Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.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