Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752616AbbLMUtF (ORCPT ); Sun, 13 Dec 2015 15:49:05 -0500 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:48500 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752208AbbLMUtE (ORCPT ); Sun, 13 Dec 2015 15:49:04 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3865:3867:3870:3872:4250:4321:5007:6261:7903:10004:10400:10848:11232:11658:11783:11914:12043:12517:12519:12740:13069:13311:13357:13894:14659:21080:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: girls48_6c0bd76894032 X-Filterd-Recvd-Size: 1396 Message-ID: <1450039741.20678.7.camel@perches.com> Subject: Re: [PATCH] checkpatch: detect leading * in NULL comparison check From: Joe Perches To: "S. Gilles" , Andy Whitcroft , linux-kernel@vger.kernel.org Date: Sun, 13 Dec 2015 12:49:01 -0800 In-Reply-To: <1450029592-476-1-git-send-email-sgilles@math.umd.edu> References: <1450029592-476-1-git-send-email-sgilles@math.umd.edu> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 25 On Sun, 2015-12-13 at 12:59 -0500, S. Gilles wrote: > Prevent checkpatch.pl from emitting messages like > > ? CHECK: Comparison to NULL could be written "!rx_p" > ? #51: FILE: drivers/staging/iio/accel/sca3000_ring.c:51: > ? +???????if (*rx_p == NULL) { > > by checking for leading * characters in the comparison value. > > Signed-off-by: S. Gilles > --- > > I've run this through everything in staging/ as a test, it seems to > work okay. This wouldn't work with * foo == NULL; but there don't seem to be any in the kernel source. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/