Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1019656yba; Thu, 4 Apr 2019 02:34:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUK7Usbu7ijAoBYQVBn+OFb7u5Un/ksQ9yv2xg3PUd6ROYZQjjIKZaqm7MxwclyX9xry7i X-Received: by 2002:a65:62d2:: with SMTP id m18mr4854915pgv.122.1554370452926; Thu, 04 Apr 2019 02:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370452; cv=none; d=google.com; s=arc-20160816; b=0kUinR/gfrff5CagEYKvLzG8/hiclSa26270NY7aPT3ClCHAGlrMWJPrGplF4BSnYq /jhp5xuNgBWbsu3KQzBSP655e58kZK3JJb3LFlUAurY86F2iRKB1/NMjabpVVfZzlzZi jAZWEBQeoQuijZNfB1S3YyhvkHfcs33wP7/Sn+SNeR4r5qHtcWocIJKIxwvm5SmNhxj9 xi8jfDH6va4QVDFSFbDOBjuEtnqIE99wwMlbsvYQbwTTmHtviPz1QkAkjl0AYEwx95yM yGk3bKNJuopXBtF1LyfCKuhqe4HQKp1m3H4GphdxJtC605OaZnLe6FW0Nhx2jqwjl2gr PG+A== 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=JDv010dhrPLwC3J9tGRK6LOYCBaVzJNmY5i8WbNcgdQ=; b=ZcOqRhc/e7BUEm1tHrf+jYRSmYaDrH+VTz4NTHRWVsxfgGj3dHZAL9ie7xCqWerXcV c5CHxR1CrkLWQLau5rMniwEiY+UcDk1MKnU5VN0htBFJAUYRiTpf9y4cCEcsD1nN7Yrg 9WuitcyOvm62uqRdwDDnRcbXpRfOEQ3BGin1IXA0c2r78W7Sn7dYnW9oFwAq/xpldJbA +HAyO3XwGBj+xltCCd0bRzAOxL9J4cWCIvoH05tgR298AZ29YHcmxD9r/D7nad/PX2Ri Yvy3SfoqEnEspUItCsX8WCAQfjB6YmaEJseNmJ/lmJZCQ1QcyPWrfFnfcwSfVbwmP+nz BjFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=C7qFtYY6; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si10043088pgd.394.2019.04.04.02.33.57; Thu, 04 Apr 2019 02:34:12 -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=@oracle.com header.s=corp-2018-07-02 header.b=C7qFtYY6; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733001AbfDDJbr (ORCPT + 99 others); Thu, 4 Apr 2019 05:31:47 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:60572 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732782AbfDDJJR (ORCPT ); Thu, 4 Apr 2019 05:09:17 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3499C0P117841; Thu, 4 Apr 2019 09:09:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=JDv010dhrPLwC3J9tGRK6LOYCBaVzJNmY5i8WbNcgdQ=; b=C7qFtYY6NqlsORS5QT0Dt7MxbLbujKXHyAnD7RvXys2129o2alTpAet6FClcGGE5N1EJ N1hQTWRAroqn5M0wsuVcj9/LhPC+6wTu8d8I3WeRQD9WXpRKwzhAUkcMn03VUCFATYJm CXpRzVEycfKgbyvSjspeZYJYO2Tg0EBUDOalQd8Gh92Pu1KdrDw4xlciOzwgAhNoAtPq bkSfhQd1d5q4y7JzRrWhQyYYHzOMV8v4yKHrhgpjZDTJKZ6bKrP5Dcw7VKAfAbdGBpBC 39PRXg+Qp+muUXa5OWNGCeWLyyPxm4Wm15dnATLczf9+Ys4xGaMikzXXn7UVTo+gYi/T sQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2rj13qdsu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Apr 2019 09:09:12 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3498I7d147321; Thu, 4 Apr 2019 09:09:11 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2rm8f5hxsm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Apr 2019 09:09:11 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x34999dE015665; Thu, 4 Apr 2019 09:09:11 GMT Received: from kadam (/41.202.241.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Apr 2019 02:09:09 -0700 Date: Thu, 4 Apr 2019 12:09:00 +0300 From: Dan Carpenter To: Madhumitha Prabakaran Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Staging: rtlwifi: Remove unwanted parentheses Message-ID: <20190404090900.GH32590@kadam> References: <20190403223851.22524-1-madhumithabiw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190403223851.22524-1-madhumithabiw@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904040065 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904040065 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You should probably update the subject line because now it's not just about parentheses any more. [PATCH v2] Staging: rtlwifi: clean up crc16_ccitt() So the one thing per patch rule is a little bit about selling your patch. We never allow "Clean up whole_file.c" but we do sometimes allow "Clean up a function()" so long as the patch description sells it in the right way. Blah blah function does "BIT(0) << i" instead of "BIT(i)". Using !! is slightly shorter than "foo ? 1 : 0". Blah blah, etc. On Wed, Apr 03, 2019 at 05:38:51PM -0500, Madhumitha Prabakaran wrote: > @@ -351,13 +351,13 @@ static u16 crc16_ccitt(u8 data, u16 crc) > else > result |= BIT(0); > > - crc_bit11 = ((crc & BIT(11)) ? 1 : 0) ^ shift_in; > + crc_bit11 = !!(crc & BIT(11)) ^ shift_in; > if (crc_bit11 == 0) > result &= (~BIT(12)); ^ ^ I thought your Coccinelle script was going to complain about these parentheses. Probably the &= confuses it? There are a couple others in the same function. regards, dan carpenter