From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [Linux-nvdimm] [PATCH 1/9] SQUASHME: pmem: Remove unused #include headers Date: Wed, 10 Sep 2014 15:16:42 -0400 Message-ID: <20140910191642.GI27730@localhost.localdomain> References: <1409173922-7484-1-git-send-email-ross.zwisler@linux.intel.com> <540F1EC6.4000504@plexistor.com> <540F1F6F.7090905@plexistor.com> <1410301783.8366.1.camel@rzwisler-mobl1.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Boaz Harrosh , Jens Axboe , linux-fsdevel , Andrew Morton , Matthew Wilcox , linux-nvdimm@lists.01.org To: Ross Zwisler Return-path: Received: from mga01.intel.com ([192.55.52.88]:28401 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717AbaIJTQx (ORCPT ); Wed, 10 Sep 2014 15:16:53 -0400 Content-Disposition: inline In-Reply-To: <1410301783.8366.1.camel@rzwisler-mobl1.amr.corp.intel.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Sep 09, 2014 at 04:29:43PM -0600, Ross Zwisler wrote: > On Tue, 2014-09-09 at 18:40 +0300, Boaz Harrosh wrote: > > From: Boaz Harrosh > > > > Removed: > > -#include > > -#include > > > > These two are included in linux/blkdev.h Woah, woah, woah, what is this craziness? You shouldn't ever rely on implicitly included files. > > -#include > I think this was present in the BRD code for flush_dcache_page(), but we > should probably be direct and include instead. Reasonable. > > -#include > Yep, not needed. Agreed. > > -#include > Yep, not needed. I don't see a need for it either. > > These 3 are not used anymore > > I was under the impression that the philosophy regarding includes was that you > should directly include header files for the things that you use, and not rely > on headers that include other headers? That way a change to a header file > where you remove an unneeded #include doesn't cascade into a bunch of changes > in .c files for now undefined symbols? Correct. > If we *should* directly include the header files for anything that we use, we > can probably pare it down to this: > > #include > #include > #include > #include > #include > #include > #include > #include > #include Looks reasonable.