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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 D8945C433DB for ; Sat, 6 Mar 2021 08:20:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2ABB65016 for ; Sat, 6 Mar 2021 08:20:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbhCFIT1 (ORCPT ); Sat, 6 Mar 2021 03:19:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:54412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbhCFITQ (ORCPT ); Sat, 6 Mar 2021 03:19:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 407E665012; Sat, 6 Mar 2021 08:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615018756; bh=0hfOENxhVnX1yjdNrP/1FHbMGCQPZIvQnOF1zBWR0z8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NILZTZ3sHhkiuctvansXIrN8RZvO1IWkz+/NM4xUO1z8elzrgNxk4PGA8ssXCIGQo 3rYzvPggeGXcPr9vm/HUM+Q5E+vsJ6TLyOWG4390PXy2mU3bmDq+oE7/YIZ7MsQlft GkahuuSE3Wb82Nye/ThC0/JZpZxZI6HhUZi9+4NQ= Date: Sat, 6 Mar 2021 09:19:13 +0100 From: Greg KH To: Peter Chen Cc: Pawel Laszczak , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kurahul@cadence.com, sparmar@cadence.com Subject: Re: [PATCH] usb: cdnsp: Fixes incorrect value in ISOC TRB Message-ID: References: <20210305051059.31623-1-pawell@gli-login.cadence.com> <20210306005342.GA1119@b29397-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210306005342.GA1119@b29397-desktop> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Sat, Mar 06, 2021 at 08:53:42AM +0800, Peter Chen wrote: > On 21-03-05 06:10:59, Pawel Laszczak wrote: > > From: Pawel Laszczak > > > > The value "start_cycle ? 0 : 1" in assignment caused > > implicit truncation whole value to 1 byte. > > To fix the issue, an explicit casting has been added. > > The root cause for this issue should be operator "|" priority higher > than "? :", I think just add () for start_cycle ? 0 : 1 could fix it. > Please double confirm it, and change the commit log if necessary Please do not rely on this type of thing to get the code right. Spell it out with real if () statements so that humans can read it and understand it and maintain it for the next 10+ years. thanks, greg k-h