Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755683AbbG1Jwm (ORCPT ); Tue, 28 Jul 2015 05:52:42 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:36739 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755252AbbG1Jwk (ORCPT ); Tue, 28 Jul 2015 05:52:40 -0400 Date: Tue, 28 Jul 2015 10:52:36 +0100 From: Matt Fleming To: Guenter Roeck Cc: Wim Van Sebroeck , linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Mika Westerberg , Andy Shevchenko , Jean Delvare , Wolfram Sang , Matt Fleming , Peter Tyser , Samuel Ortiz , Lee Jones Subject: Re: [PATCH 1/5] iTCO_wdt: Expose watchdog properties using platform data Message-ID: <20150728095236.GF2492@codeblueprint.co.uk> References: <1438004292-16382-1-git-send-email-matt@codeblueprint.co.uk> <1438004292-16382-2-git-send-email-matt@codeblueprint.co.uk> <55B636D4.6020709@roeck-us.net> <20150727141948.GA2677@codeblueprint.co.uk> <55B63F09.4030101@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B63F09.4030101@roeck-us.net> 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 Content-Length: 1220 Lines: 28 On Mon, 27 Jul, at 07:24:09AM, Guenter Roeck wrote: > On 07/27/2015 07:19 AM, Matt Fleming wrote: > >On Mon, 27 Jul, at 06:49:08AM, Guenter Roeck wrote: > >> > >>I don't see the platform data freed anywhere, neither in the error path nor > >>in the cleanup path of this driver. Can you use devm_kzalloc() ? > >>Otherwise I think you'll need a cleanup path. > > > >Oops, good catch. Yes, devm_kzalloc() can be used here, thanks! > > > Or maybe just use a static data structure, like in the i2c driver. The point of dynamically allocating it is that we can use the data from the static lpc_ich_chipset_info array and munge into the correct platform data. The alternative would be to go and mass-modify that array to include iTCO_wdt_platform_data objects that we could directly pass to the iTCO_wdt driver. I wanted to avoid the code churn, but I'm not super bothered either way if people have strong opinions about it. -- Matt Fleming, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/