Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2610582pxb; Mon, 19 Apr 2021 09:30:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyos8+TYwcTV+amSLyTKUSuJTW9q5g4Tkun+po+KtUD+JpNhJgL5lTEeo53aYTEXclfVViv X-Received: by 2002:a05:6402:51cd:: with SMTP id r13mr26650952edd.116.1618849850871; Mon, 19 Apr 2021 09:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618849850; cv=none; d=google.com; s=arc-20160816; b=keEc83LF4l/Xdix6Jfkw1c6gRMToFD2V8U5EwF46xu+CWQ6r6/OQEfb/Utr+PlGmHK QE0qWNdj3Jmjyv1tniRyCLqrKUZrLBFVXo5c0B2e0AtQOraQ3swE6gsusRUvzv5W4TRr dT0k4YVK3bTWrevEIcvasAlG2jL1y1qjTK1FbS6lBrPka+UHESAUdJnVzxPlkkp6sI75 ahnsuRUCX+FLwCNlTkh4PeMpsGAlUhOWUuzstWmng2DlRqv4sVh0LDKFC+4jbSV6exlp iMsgwEGPmAtVETvkG5yZqEJHTCdvpeKPg4tORXZUCTxhBL3Q96LehGR3Dpkl8ycovOyb E3Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=CwHXSfntqAWCkCzc7QyB7q8qAXkmrfgQLCiqm2KywAY=; b=sVxQ26vK9R0KGTICeUQZ0k4RMDkZf9hYcBQnFSMlH7YQfQellvu6t6CblSc5sR6Ed/ wmXymkxO/rOv4xjoMOOm3cDUauP48B84qc5mRMUB+OJrxuS1jzBhDCuDda0jj9I3Uude DucPGFCL1/lQ1/sQ0ic4nWm7rKMU9IYp2GLDbxdmkRBS/mriGgi8quGybf3z3LVNYA2k oO8hTsjojqiFWiZJR7acsUJev6n4Md/sBr3/wXVyilD2Zh0gVBYmfHzXdAMVZpQM701p Z8uvNrA0Pxn+6rU8ZWfbhYkd5+EoQaYeJU5O7euQpnvT/MqfIrbj5OeJZQUx7FMafYcK jmLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si12708544ejc.167.2021.04.19.09.30.26; Mon, 19 Apr 2021 09:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238209AbhDSQHb (ORCPT + 99 others); Mon, 19 Apr 2021 12:07:31 -0400 Received: from mga06.intel.com ([134.134.136.31]:29355 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238377AbhDSQHS (ORCPT ); Mon, 19 Apr 2021 12:07:18 -0400 IronPort-SDR: EeRepVeNmIx4ajAMZfdyWqJRLypUE+vOxaFFCzYj2IIRW+428cAQTNZbqlagAtMBPBSaqWOXF1 sutczh4PLDHg== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="256665638" X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="256665638" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.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 Cc: Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, kael_w@yeah.net 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210419112725.42145-1-wanjiabing@vivo.com> User-Agent: Mutt/1.11.1 (2018-12-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >