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=-11.4 required=3.0 tests=BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 227D1C433ED for ; Mon, 19 Apr 2021 16:04:19 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88B6761285 for ; Mon, 19 Apr 2021 16:04:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88B6761285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6C802100EBBC0; Mon, 19 Apr 2021 09:04:18 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=ira.weiny@intel.com; receiver= Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CE197100ED4BB for ; Mon, 19 Apr 2021 09:04:14 -0700 (PDT) IronPort-SDR: gnaSSqGzpXUx+Y/Okouhj+uos023Mk3Vde92SKBSFejmYw8ADzG3Ia37VYnU9kzDB1CRhNL8Yd ZsMVEfUdrpsQ== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="195382104" X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="195382104" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 09:04:12 -0700 IronPort-SDR: t5DAkXmlvwniORyDpzVffceigCGlOZ133P9EB9TGAXhCmbq9kozvQc4vsSZzXrCgvH9xXACkPm WTj4fin83e9Q== X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="420062661" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 09:04:11 -0700 Date: Mon, 19 Apr 2021 09:04:11 -0700 From: Ira Weiny To: Wan Jiabing Subject: Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration Message-ID: <20210419160411.GG1904484@iweiny-DESK2.sc.intel.com> References: <20210419112725.42145-1-wanjiabing@vivo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210419112725.42145-1-wanjiabing@vivo.com> User-Agent: Mutt/1.11.1 (2018-12-01) Message-ID-Hash: TS4V6MYOUUYY5U32RE5AFNGP5HEJGTHY X-Message-ID-Hash: TS4V6MYOUUYY5U32RE5AFNGP5HEJGTHY X-MailFrom: ira.weiny@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, kael_w@yeah.net X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote: > struct device is declared at 133rd line. > The declaration here is unnecessary. Remove it. > > Signed-off-by: Wan Jiabing > --- > include/linux/libnvdimm.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h > index 01f251b6e36c..89b69e645ac7 100644 > --- a/include/linux/libnvdimm.h > +++ b/include/linux/libnvdimm.h > @@ -141,7 +141,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct device *dev, > > struct nvdimm_bus; > struct module; > -struct device; > struct nd_blk_region; What is the coding style preference for pre-declarations like this? Should they be placed at the top of the file? The patch is reasonable but if the intent is to declare right before use for clarity, both devm_nvdimm_memremap() and nd_blk_region_desc() use struct device. So perhaps this duplicate is on purpose? Ira > struct nd_blk_region_desc { > int (*enable)(struct nvdimm_bus *nvdimm_bus, struct device *dev); > -- > 2.25.1 > _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org