From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A38DC4321D for ; Sat, 18 Aug 2018 16:26:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC44F20BF2 for ; Sat, 18 Aug 2018 16:26:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC44F20BF2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726431AbeHRTef (ORCPT ); Sat, 18 Aug 2018 15:34:35 -0400 Received: from smtprelay0081.hostedemail.com ([216.40.44.81]:48766 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726227AbeHRTef (ORCPT ); Sat, 18 Aug 2018 15:34:35 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 9EC82837F242; Sat, 18 Aug 2018 16:26:18 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: top41_5402399d70810 X-Filterd-Recvd-Size: 3028 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Sat, 18 Aug 2018 16:26:17 +0000 (UTC) Message-ID: <1ee3e90112269452b545bba54356bdba894b275c.camel@perches.com> Subject: Re: [PATCHv2] ide: Use NULL to compare with pointer-typed value rather than 0 From: Joe Perches To: Sergei Shtylyov , zhong jiang , davem@davemloft.net Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 18 Aug 2018 09:26:16 -0700 In-Reply-To: <94bdada0-e0f9-4dd2-ed6d-ad84f7114954@cogentembedded.com> References: <1534572961-16423-1-git-send-email-zhongjiang@huawei.com> <8badfdf8-ce69-1722-a489-fee161a1f4aa@cogentembedded.com> <14b562e7acdb37158190e14045fe276e9899422e.camel@perches.com> <94bdada0-e0f9-4dd2-ed6d-ad84f7114954@cogentembedded.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2018-08-18 at 19:21 +0300, Sergei Shtylyov wrote: > On 08/18/2018 07:15 PM, Joe Perches wrote: > > > > We should use NULL to compare with pointer-typed value rather than > > > > 0. The issue is detected with the help of Coccinelle. > > > > > > Your description stopped to match the patch in v2. > > > Actually, this X == NULL to !x preference is largely spocific to netdev... > > > Although, IDE maintainer is the same now person. :-) [] > > > > diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c [] > > > > @@ -1682,7 +1682,7 @@ static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) > > > > /* We won't need pci_dev if we switch to generic consistent > > > > * DMA routines ... > > > > */ > > > > - if (dev == NULL || pmif->dma_regs == 0) > > > > + if (!dev || !pmif->dma_regs) > > > > return -ENODEV; > > > > /* > > > > * Allocate space for the DBDMA commands. [] > > Perhaps discourage trivial changes to this old subsystem. > > > > checkpatch could bleat something if a patch was submitted for ide > > if the IDE MAINTAINERS entry was marked obsolete. > > Note that the IDE fixes are still OK... The checkpatch obsolete message is is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. --- > > diff --git a/MAINTAINERS b/MAINTAINERS > > index e9336962d0f2..3c4992cf5249 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -6933,7 +6933,7 @@ M: "David S. Miller" > > L: linux-ide@vger.kernel.org > > Q: http://patchwork.ozlabs.org/project/linux-ide/list/ > > T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide.git > > -S: Maintained > > +S: Maintained / Obsolete (prefer LIBATA) > > What about "S: Odd Fixes"? Perhaps it better reflects the reality... That'd be up to David.