From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753416AbdA3WsW (ORCPT ); Mon, 30 Jan 2017 17:48:22 -0500 Received: from mga14.intel.com ([192.55.52.115]:2126 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753069AbdA3WsU (ORCPT ); Mon, 30 Jan 2017 17:48:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,312,1477983600"; d="scan'208";a="59300931" Subject: Re: [PATCH 1/2] device property: export code duplicating array of property entries To: Dmitry Torokhov References: <20170123073849.28352-1-dmitry.torokhov@gmail.com> <1485183638.2133.287.camel@linux.intel.com> <20170123224654.GC34769@dtor-ws> Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, Mika Westerberg , Hans de Goede From: "Rafael J. Wysocki" Organization: Intel Technology Poland Sp. z o. o., KRS 101882, ul. Slowackiego 173, 80-298 Gdansk Message-ID: Date: Mon, 30 Jan 2017 23:48:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170123224654.GC34769@dtor-ws> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/23/2017 11:46 PM, Dmitry Torokhov wrote: > 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. Can you please CC it to linux-acpi while at that? It will help to handle it. Thanks, Rafael