From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbdLEWPQ (ORCPT ); Tue, 5 Dec 2017 17:15:16 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:52473 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288AbdLEWPL (ORCPT ); Tue, 5 Dec 2017 17:15:11 -0500 Reply-To: shuah@kernel.org Subject: Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions To: SF Markus Elfring , linux-usb@vger.kernel.org, Greg Kroah-Hartman , Valentina Manea Cc: LKML , kernel-janitors@vger.kernel.org, Shuah Khan , Shuah Khan References: <6a84f1e4-a5c1-84da-bd14-de28e306991b@users.sourceforge.net> From: Shuah Khan Message-ID: Date: Tue, 5 Dec 2017 15:14:57 -0700 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-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2017 02:49 PM, SF Markus Elfring wrote: > From: Markus Elfring > 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 > --- > 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