Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6369431ybi; Tue, 4 Jun 2019 23:36:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqTBneZ/npuzng77A92tkWNsHaVqj/vKRhRf4aX28PH3AJL+2MG38JTNxwSbKWY/jz1vwy X-Received: by 2002:a17:90a:77c4:: with SMTP id e4mr42734086pjs.86.1559716598853; Tue, 04 Jun 2019 23:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559716598; cv=none; d=google.com; s=arc-20160816; b=G1jEy6uqgIfYhjZXAQHgTbMuyf0q3ZyOEGJEubHAoAQwzkCxbViXAnSdcSV4pf2UAL 3MlOWH2JZSu0onsZFhLYFDMD8mSS69YqdZNl6Vy9c5Kn60vnByrZ4yPN9jbr54psGUu0 I6qTr5F+GlE7PYUWbfaY3NxmrweMcYhtafPv5vA5cfpWFS/rZGE5MnoU6zFq23SLdeHP t7akJpb0dsEdFLos/31lWLQMV5S8K51iTmpAAPesZJqnIYXbplRq9avKHRj9v5TJq1mc +cyTseZ7NcYZyCBGuWyX23DTvJpQZ5j5vU2uttvZ8sz+WsT1NIHzOZGm1F0yYjHEe0HI GINQ== 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:to :from:date:dkim-signature; bh=j74qjlM9WHB/196pmL6fsOcRFlXhlEU+5GmJo6s7F+8=; b=RiJZDq77br7Mxv89r6dX9w/3Uw1X8SZuStEf/LF4AqxJrQOUvES3CT2qqlfmgxEC1A u5uFMqWDaNc1LdbDy2A4pBKlcSoIur/85a9dfjbiSoKdcB4zTqaSEFbeIvgOGa+F1wD+ zWjwa5f34TUE/0JqGM9C7fvE4YOTZnmMsnFat8L3gVTJnitJY+7n7ZZm7SEzfyXjs2bn VaxS+q6UfL+wMCJtpxdZE58UkTkXczXvZHxhTWpHEcHUPpCDLPRosG9k2pnX7sfpBuBV su3rohzqFYlbJyzQn6vGGp9U7UnGdxt6Yh5O9lC/FbqURanI5cHlgkmmt97DZj6pz6uh VgJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CsBDsCgd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si25598532pfn.96.2019.06.04.23.36.22; Tue, 04 Jun 2019 23:36:38 -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=@gmail.com header.s=20161025 header.b=CsBDsCgd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfFEGes (ORCPT + 99 others); Wed, 5 Jun 2019 02:34:48 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38495 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfFEGes (ORCPT ); Wed, 5 Jun 2019 02:34:48 -0400 Received: by mail-pg1-f193.google.com with SMTP id v11so11831945pgl.5 for ; Tue, 04 Jun 2019 23:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j74qjlM9WHB/196pmL6fsOcRFlXhlEU+5GmJo6s7F+8=; b=CsBDsCgdKy2tmN10RVUFOkVGzO02MkUhApWGr1QfWdYFte3UwhHpx2ck98TR5XKkR5 fue5UeS7NgR1wyjCjnq2ij/OuchDoLKWdMoPOItqW4a1iYW+oULbWjInnUd9TMjazq9y kmd0UVOF2+aNKxqdt0ceWaw9KBj9w6SpchvHz7QJMpq1s2OBOv3cD19PQ5JqLrMITHWx UouHjMaWulH4rbtxw6I36NLKi8P7vKn/cUtwKLdfnWvcg4ZVxaip2visKNUWFrAJGZvt Dtyr5o/RdLRtw/aZAIJYjf7lqIF8aAv7nkbPq2/JwyvxL6agQI+vBDrXjO63GRFsDjJU HnMQ== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j74qjlM9WHB/196pmL6fsOcRFlXhlEU+5GmJo6s7F+8=; b=EqYAhFwbTWnHYSbGp31D7tpChWy7xDhZWnIuF5V0Ar53HSh3Zyw/8pLAL07lsOMACb k8gfsizT4MDntCb0ejqtYarD4f9nnedPEC9K+2marO4d8Utj40gJYs6HWSpkxHigqltH oPlEiLPtahnpPEUZ4Mmt3+Js0ZyitABEXyN5dZNg1m6966cKHTmLuEzNYvNC7NzDv6lM +EtzyVpF+EiEEFdKCXcIcvyvbJxYID0xNCGtsMlXnO1fNVlLBvAJm0aWyfMiCF8QcC0p shhIiAyKTJoVRNdWz5ojUGX7xFxfm8bXEPm5gYm0dDCQElD7NBJoAf1VpUmNFrL7rJp4 uJMw== X-Gm-Message-State: APjAAAUo+mf/D2PAqonALG/UPTSeR2EtJHC6spaK6q5EhVJX/z01iZQ/ Iv52x8hrTfXOegClhnUg1w0d50xD X-Received: by 2002:a17:90a:ac14:: with SMTP id o20mr14295818pjq.114.1559716487770; Tue, 04 Jun 2019 23:34:47 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id q12sm29106397pgs.22.2019.06.04.23.34.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 23:34:47 -0700 (PDT) Date: Wed, 5 Jun 2019 12:04:43 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , 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: <20190605063443.GA5248@hari-Inspiron-1545> References: <20190603185412.GA11183@hari-Inspiron-1545> <20190603190457.GA6487@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190603190457.GA6487@kroah.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 03, 2019 at 09:04:57PM +0200, Greg Kroah-Hartman wrote: > 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. Yes will send separate patch to address this. > > > -#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 Ok . Treating this as false postive from coccicheck. Thanks, Hariprasad k