From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bw0-f51.google.com (mail-bw0-f51.google.com [209.85.214.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 9123F1007D1 for ; Tue, 22 Nov 2011 12:26:31 +1100 (EST) Received: by bkat8 with SMTP id t8so7268495bka.38 for ; Mon, 21 Nov 2011 17:26:26 -0800 (PST) Sender: =?UTF-8?Q?Micha=C5=82_Nazarewicz?= Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: leoli@freescale.com, balbi@ti.com, "Peter Chen" Subject: Re: [PATCH] USB: fsl_udc_core: Use (&) instead of (==) to compare ISO XFER References: <1321924521-3218-1-git-send-email-peter.chen@freescale.com> Date: Tue, 22 Nov 2011 02:26:24 +0100 MIME-Version: 1.0 From: "Michal Nazarewicz" Message-ID: In-Reply-To: Cc: gregkh@suse.de, linuxppc-dev@lists.ozlabs.org, linux-usb@vger.kernel.org, stable@kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > On Tue, 22 Nov 2011 02:15:21 +0100, Peter Chen wrote: >> @@ -877,7 +877,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_reque= st *_req, gfp_t gfp_flags) >> VDBG("%s, bad ep", __func__); >> return -EINVAL; >> } >> - if (ep->desc->bmAttributes =3D=3D USB_ENDPOINT_XFER_ISOC) { >> + if (ep->desc->bmAttributes & USB_ENDPOINT_XFER_ISOC) { On Tue, 22 Nov 2011 02:22:10 +0100, Michal Nazarewicz wrote: > What you really meant is: > > (ep->desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) =3D=3D USB_ENDPO= INT_XFER_ISOC > > It would probably be useful to create a function that performs that ch= eck rather > than having to type all of that every time. Ah, there it is: usb_endpoint_xfer_isoc(ep) :) > >> if (req->req.length > ep->ep.maxpacket) >> return -EMSGSIZE; >> } -- = Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz= (o o) ooo +------------------ooO--(_)--Ooo--