Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4505957ybi; Mon, 3 Jun 2019 12:08:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO24gVgqLjjQ/C1O+mYRS9JgLPbWMvuK/6d+n/LveFWd0PwwjsU5lM65+DLgYAh2h6EJVg X-Received: by 2002:aa7:8dcd:: with SMTP id j13mr32393810pfr.107.1559588883239; Mon, 03 Jun 2019 12:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559588883; cv=none; d=google.com; s=arc-20160816; b=PY1Ll13MYxHzjUqi1VuNyYWEv+gdb0Wvkhqgo0UDpCaT/LW5u+Hi9VinWZ+m+ur6iF wKEf0x2ibhSf/2i3/RanbS2OvAPSdBTfuPwdoI+FkH6CTcaC8V22BA4TvAgBFVBgJJOi GRfmJORnS7hKqAubPhGg91IsdGErGa2AYiTCMdJM+fFT3LHy/6c7FVliDxvp3RahF7lu 84YajajzicgMTggESN6/4EwB/DNLp7qiz6jzzV/074C8ffcZEX1RqGBC1pDgk32R2dca rDyOuPgA7SBGN4Jn+xvuqlKRMpyRtCfz3EBxqKYph7j6bpZ3Ajs53DI9OsMMkCTvJNf9 Bz0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WRUoSJAEOgZZOoKZxwcPvIXu2r5AC2Hmbqs0fUUFwEI=; b=eD3fP3H0FMKGB6ascyQh1pK7VVaKjCFZUuj6bfLoKXn1NkWNXdXs+Tb1E2LNg4/ttB R87ZnTu11DNOmVHzaYvKaq8iE3xlF1V4Apno/R6ti6KvQwMEeZ6wMPdNomS6ALshJ661 DqdcP+1s4HJKf9c4+STq2WO6H08axjTHeR0tMopcpALaIXJmSfoHCLPAhRnqjN3MOYdq fGm10AmwgI6DnZQxr+9d5Kau1Y2HoPwhBqZpaGPHQo29PazMVwm5VBSF/IEmqYXGPq3Y oIMn2XK9U3xg+6/z+xW+73MP+nlADrFnAWF18QzIXmZyXOrOpZFw4jisutVwFaJ0jtZw 8cxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jb25hMVL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d124si23093475pfd.29.2019.06.03.12.07.46; Mon, 03 Jun 2019 12:08:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jb25hMVL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbfFCTFC (ORCPT + 99 others); Mon, 3 Jun 2019 15:05:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:40692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfFCTFA (ORCPT ); Mon, 3 Jun 2019 15:05:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B567326DF6; Mon, 3 Jun 2019 19:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559588700; bh=R8oH6TrNzNnKnXl40BLjxloa+JfMj2hBIL8vLlewyX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jb25hMVLOuG+2146l3orHarP96UdmDO8nJiRUIL1Xy/WxTEr+hGXUaPPxVc90bmZx FfpEV8iLbt5sl36CBC6DIqyvl6+3p+Mz0Y/yjTPxX16QUlpEzrxTFODwIwbgCdyX/D TQNK3ROcfly0jIxHhUD3sWDnZAimv1IM5/5xquWU= Date: Mon, 3 Jun 2019 21:04:57 +0200 From: Greg Kroah-Hartman To: Hariprasad Kelam Cc: Carmeli Tamir , Nishad Kamdar , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Staging: emxx_udc: fix warning "sum of probable bitmasks, consider |" Message-ID: <20190603190457.GA6487@kroah.com> References: <20190603185412.GA11183@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190603185412.GA11183@hari-Inspiron-1545> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 12:24:12AM +0530, Hariprasad Kelam wrote: > Knowing the fact that operator '|' is faster than '+'. > Its better we replace + with | in this case. > > Issue reported by coccicheck > drivers/staging/emxx_udc/emxx_udc.h:94:34-35: WARNING: sum of probable > bitmasks, consider | > > Signed-off-by: Hariprasad Kelam > --- > drivers/staging/emxx_udc/emxx_udc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h > index b8c3dee..88d6bda 100644 > --- a/drivers/staging/emxx_udc/emxx_udc.h > +++ b/drivers/staging/emxx_udc/emxx_udc.h > @@ -91,7 +91,7 @@ int vbus_irq; > #define BIT30 0x40000000 > #define BIT31 0x80000000 All of those BITXX defines should be removed and the "real" BIT(X) macro used instead. > -#define TEST_FORCE_ENABLE (BIT18 + BIT16) > +#define TEST_FORCE_ENABLE (BIT18 | BIT16) It really doesn't matter, a good compiler will have already turned this into a constant value so you really do not know if this is less/faster code or not, right? Did you look at the output to verify this actually changed anything? thanks, greg k-h