From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751409AbdJEREa (ORCPT ); Thu, 5 Oct 2017 13:04:30 -0400 Received: from esa2.dell-outbound.iphmx.com ([68.232.149.220]:41268 "EHLO esa2.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbdJERE3 (ORCPT ); Thu, 5 Oct 2017 13:04:29 -0400 From: X-LoopCount0: from 10.166.132.190 X-IronPort-AV: E=Sophos;i="5.42,481,1500958800"; d="scan'208";a="993938400" X-DLP: DLP_GlobalPCIDSS To: CC: , , , , , , , , , Subject: RE: [PATCH v4 05/14] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver Thread-Topic: [PATCH v4 05/14] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver Thread-Index: AQHTPWLwy4LaHQCqf0OMYSZFVl7S46LVECmAgABJrHA= Date: Thu, 5 Oct 2017 17:04:26 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v95H4Zdf010875 > -----Original Message----- > From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] > Sent: Thursday, October 5, 2017 12:34 AM > To: Limonciello, Mario > Cc: dvhart@infradead.org; LKML ; Platform Driver > ; Andy Lutomirski ; > quasisec@google.com; Pali Rohár ; Rafael J. Wysocki > ; mjg59@google.com; Christoph Hellwig ; > Greg KH > Subject: Re: [PATCH v4 05/14] platform/x86: dell-wmi-descriptor: split WMI > descriptor into it's own driver > > On Thu, Oct 5, 2017 at 1:48 AM, Mario Limonciello > wrote: > > All communication on individual GUIDs should occur in separate drivers. > > Allowing a driver to communicate with the bus to another GUID is just > > a hack that discourages drivers to adopt the bus model. > > > > The information found from the WMI descriptor driver is now exported > > for use by other drivers. > > > + priv = list_first_entry_or_null(&wmi_list, > > + struct descriptor_priv, > > + list); > > > + priv = list_first_entry_or_null(&wmi_list, > > + struct descriptor_priv, > > + list); > > static inline ...to_priv(...) > { > return list_first_entry_...(); > } > > > + list_add_tail(&priv->list, &wmi_list); > > > + list_del(&priv->list); > > Do these need locking? Yeah this seems like a good idea. I'll add it in. > > > +bool dell_wmi_get_interface_version(u32 *version); > > +bool dell_wmi_get_size(u32 *size); > > This might need stubs when module is not selected (when functionality > is optional if it would be the case), otherwise all users should > select it explicitly. Per Darren's other threads I'm adjusting Kconfig to make sure this module is selected. It's realistically not optional when using these others.