Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdFFSq7 (ORCPT ); Tue, 6 Jun 2017 14:46:59 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:33458 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418AbdFFSp6 (ORCPT ); Tue, 6 Jun 2017 14:45:58 -0400 MIME-Version: 1.0 In-Reply-To: <20170606165443.GB32509@fury> References: <20170606165443.GB32509@fury> From: Andy Shevchenko Date: Tue, 6 Jun 2017 21:45:57 +0300 Message-ID: Subject: Re: [PATCH v2] platform/x86: wmi-bmof: New driver to expose embedded Binary WMI MOF metadata To: Darren Hart Cc: Andy Lutomirski , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Platform Driver , Andy Shevchenko , Andy Lutomirski , Mario Limonciello , Rafael Wysocki , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2169 Lines: 81 On Tue, Jun 6, 2017 at 7:54 PM, Darren Hart wrote: > On Tue, Jun 06, 2017 at 12:30:38PM +0300, Andy Shevchenko wrote: >> On Tue, Jun 6, 2017 at 6:16 AM, Andy Lutomirski wrote: >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> > +#include >> >> Alphabetical order? Up to you. > > OK, I failed to audit this... lots we don't need in here. > > The minimum to build is: > > #include > > So assuming this was copy/pasted from another file. > Again, no guidance in coding-style.rst on includes. Seems to me we should > include what we specifically require, regardless of whether or not another > header also happens to include it. Usually it's a sane choice. Regarding to order the rationale I see there is easiest way to detect (on the glance) what headers are already there and there is no duplication. I saw in the past few patches to remove header duplication since the original list wasn't in order in the first place. Of course there might be exceptions. > We need acpi for example, even though wmi > also includes it. > > We should include modules, even though acpi includes it. > > We use several other things we aren't including for, like > > memcpy > dev_kzalloc > sysfs_create_bin_file > > So I suggest: > > #include > #include > #include > #include > #include > #include > #include > #include > #include > > Which removes: > #include > #include > #include > #include > #include > #include > > And adds: > #include > #include > #include Works for me! -- With Best Regards, Andy Shevchenko