Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp311780pxb; Sat, 6 Mar 2021 00:20:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJye6cHn3bPfmNfYHAaof2BRxnYoDRgEV57u0ijIyz41jGTQnr3j7SyevaxDOQcGC0aIWegc X-Received: by 2002:a17:906:85b:: with SMTP id f27mr6169550ejd.414.1615018853091; Sat, 06 Mar 2021 00:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615018853; cv=none; d=google.com; s=arc-20160816; b=vcQFyMTmnupiNjWFlOBkWre513plJIH29PJ4lELLfLw9NJOLAdagiD7QZlMtXtQJIh L8xALU/kovLdietMUgh/JAuYVy51+xylvKKKNcSc6z4whXcKba8byDYbQU3usOQ2vFzR Vi8QcgIk2ThLbOjW9iS9UWMPVUzRFrJVrVJfy9f+PGt9K1JRVMOaYFkgkM3+Zrr9hmra QYBqNxIio+FpEfwvMGctwdNYOYuET35WMbN6tPtd05h7vMLNHfiZpsgFrzJWSwQ+51lE v0tbaeHPLESH1FcMb3rAH6ghWo1F1Ig76TjAvQby6dmLz8W56/TCE99mS0gZAv9getW/ nwDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jBh6UiIyOlykykNUzI7rDDm3W8ruml5DRc/8txIh508=; b=bpVux0l73bHyTVHbPWZX4TzmvtqvmRoPL5UIOss1+nNHG3SgoK/wGQW8z7zOHVYlh+ kNVHXcZGR5hyvVFzRLXrPB35R+MHlbd136guWI6YnOKaOUQTgrUEdjUkPNiyqa/4sqXJ +qNYWA/25hAe5sKq2Rt9X40z8lH8c+lacxBKpkHbM2mQDkFXbciQ+H4KXzpqlBHpr6ga obhA3BoUQdhb9HG2LNN9r5VvczmH4Re40lQGM9q814FdRk+S+5HVjby7h6Py0CYNpkV9 MDGpMprxSoE+LSEQT9ZF/GIOcmUVudTscSVB5ThQWyMgd2EhCCWdvJuFFiXLFUAtfPW7 BcOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NILZTZ3s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si3106707edw.248.2021.03.06.00.20.30; Sat, 06 Mar 2021 00:20:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NILZTZ3s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229948AbhCFIT1 (ORCPT + 99 others); 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-kernel@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