From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BE9AC433FE for ; Fri, 4 Dec 2020 10:28:15 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FF7A2251D for ; Fri, 4 Dec 2020 10:28:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FF7A2251D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0992587C3C; Fri, 4 Dec 2020 10:28:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AeyCjQA4+6w1; Fri, 4 Dec 2020 10:28:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 3EF3787C48; Fri, 4 Dec 2020 10:28:12 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2B926C0FA8; Fri, 4 Dec 2020 10:28:12 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C0AF0C013B for ; Fri, 4 Dec 2020 10:28:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AD33087C48 for ; Fri, 4 Dec 2020 10:28:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AaDm5qCwlOxH for ; Fri, 4 Dec 2020 10:28:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6F11887C3C for ; Fri, 4 Dec 2020 10:28:09 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id 142so5974034ljj.10 for ; Fri, 04 Dec 2020 02:28:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PMQ7u80c2VYDiQqBDklziVDIGD3Rre753uPc1a1D44s=; b=MeoTiHlVXSLTcCOR3Euq69mRPH+qCKxTzasEztvXPgNtMpRf1GdaTYr4gPPasHwg6V EGBKw++xsu01ihAtw4C3pwPnaQwQIKkEWdQHXS6WhAwKuQycjuN18BEbmbPRive2ZJSs 3IZeWp7HoEnqEaYFjVpcqdbQ4IPTs6lRkbmaesBeARAGDzN1ZdP3f0t/OcNfGrzhCnS4 C6WrKf81xW/jZTYnn+A1aC6sO9rJy6W3YD8GcLlNuyW1+swfBTpRF91WqFoCsT8lBCpx wLFaTOJI4gqzJdJJJ35GZ8Lz5W52AwAjMrmATLMSwG70GQPD/jyJHRrBOIFjNoTEdnUB Rrdg== X-Gm-Message-State: AOAM533yABiyrwg8LMLxJIvD3lzHndytBtDLLrhES8qGtJve9fZgwl+x y+45+mgClmZ7sC7S1Utd4ow= X-Google-Smtp-Source: ABdhPJxpsPWDqJtU0JgHWhhn2H2mShfTxc3V/9p2u9VkBOuuOSwq9LyWVwsNakGu1sS/PmOu6zbB+Q== X-Received: by 2002:a2e:b8d0:: with SMTP id s16mr3020770ljp.423.1607077687709; Fri, 04 Dec 2020 02:28:07 -0800 (PST) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id c5sm1518163lfg.84.2020.12.04.02.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 02:28:06 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1kl8KO-0005WV-Qi; Fri, 04 Dec 2020 11:28:40 +0100 Date: Fri, 4 Dec 2020 11:28:40 +0100 From: Johan Hovold To: Himadri Pandya Message-ID: References: <20201104064703.15123-1-himadrispandya@gmail.com> <20201104064703.15123-14-himadrispandya@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201104064703.15123-14-himadrispandya@gmail.com> Cc: linux-usb@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, johan@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH 13/15] usb: serial: iuu_phoenix: use usb_control_msg_send() X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Wed, Nov 04, 2020 at 12:17:01PM +0530, Himadri Pandya wrote: > The new usb_control_msg_send() nicely wraps usb_control_msg() with proper > error check. Hence use the wrapper instead of calling usb_control_msg() > directly. > > Signed-off-by: Himadri Pandya > --- > drivers/usb/serial/iuu_phoenix.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c > index b4ba79123d9d..dfbcdcec94e7 100644 > --- a/drivers/usb/serial/iuu_phoenix.c > +++ b/drivers/usb/serial/iuu_phoenix.c > @@ -968,9 +968,8 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port) > priv->poll = 0; > > #define SOUP(a, b, c, d) do { \ > - result = usb_control_msg(port->serial->dev, \ > - usb_sndctrlpipe(port->serial->dev, 0), \ > - b, a, c, d, NULL, 0, 1000); \ > + result = usb_control_msg_send(port->serial->dev, 0, b, a, c, d, NULL,\ > + 0, 1000, GFP_KERNEL); \ No need to for this either even if the result was used for anything else but logging (since there's no data stage). > dev_dbg(dev, "0x%x:0x%x:0x%x:0x%x %d\n", a, b, c, d, result); } while (0) > > /* This is not UART related but IUU USB driver related or something */ Please drop. Johan _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees