From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbdAWWq7 (ORCPT ); Mon, 23 Jan 2017 17:46:59 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34459 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbdAWWq6 (ORCPT ); Mon, 23 Jan 2017 17:46:58 -0500 Date: Mon, 23 Jan 2017 14:46:54 -0800 From: Dmitry Torokhov To: Andy Shevchenko Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Mika Westerberg , Hans de Goede Subject: Re: [PATCH 1/2] device property: export code duplicating array of property entries Message-ID: <20170123224654.GC34769@dtor-ws> References: <20170123073849.28352-1-dmitry.torokhov@gmail.com> <1485183638.2133.287.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1485183638.2133.287.camel@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 23, 2017 at 05:00:38PM +0200, Andy Shevchenko wrote: > On Sun, 2017-01-22 at 23:38 -0800, Dmitry Torokhov wrote: > > When augmenting ACPI-enumerated devices with additional property data > > based > > on DMI info, a module has often several potential property sets, with > > only > > one being active on a given box. In order to save memory it should be > > possible to mark everything and __initdata or __initconst, execute DMI > > match early, and duplicate relevant properties. Then kernel will > > discard > > the rest of them. > > > > Looks good to me. > > Reviewed-by: Andy Shevchenko > > Couple of style nitpicks. > > > > > +struct property_entry *property_entries_dup( > > + const struct property_entry > > *properties) > > Can we use > > struct propert_entry * > property_entries_dup(...) > > ? Sure, will adjust. I also realized we'll need property_entries_free() for proper cleanups. I'll repost the series. > > > > +struct property_entry *property_entries_dup( > > + const struct property_entry > > *properties); > > > > Ditto. > > -- > Andy Shevchenko > Intel Finland Oy -- Dmitry