From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f197.google.com (mail-ua0-f197.google.com [209.85.217.197]) by kanga.kvack.org (Postfix) with ESMTP id 2AFF86B000A for ; Fri, 3 Aug 2018 04:56:03 -0400 (EDT) Received: by mail-ua0-f197.google.com with SMTP id t22-v6so1978039uap.19 for ; Fri, 03 Aug 2018 01:56:03 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s28-v6sor1515931uab.252.2018.08.03.01.56.02 for (Google Transport Security); Fri, 03 Aug 2018 01:56:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Andy Shevchenko Date: Fri, 3 Aug 2018 11:56:01 +0300 Message-ID: Subject: Re: [PATCH v2 2/9] dmapool: cleanup error messages Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Tony Battersby Cc: Matthew Wilcox , Christoph Hellwig , Marek Szyprowski , Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , iommu@lists.linux-foundation.org, linux-mm , linux-scsi , MPT-FusionLinux.pdl@broadcom.com On Thu, Aug 2, 2018 at 10:57 PM, Tony Battersby wrote: > Remove code duplication in error messages. It is now safe to pas a NULL > dev to dev_err(), so the checks to avoid doing so are no longer > necessary. > > Example: > > Error message with dev != NULL: > mpt3sas 0000:02:00.0: dma_pool_destroy chain pool, (____ptrval____) busy > > Same error message with dev == NULL before patch: > dma_pool_destroy chain pool, (____ptrval____) busy > > Same error message with dev == NULL after patch: > (NULL device *): dma_pool_destroy chain pool, (____ptrval____) busy Have you checked a history of this? I'm pretty sure this was created in an order to avoid bad looking (and in some cases frightening) "NULL device *" part. If it it's the case, I would rather leave it as is, and even not the case, I'm slightly more bent to the current state. -- With Best Regards, Andy Shevchenko