From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930AbdCWLWD (ORCPT ); Thu, 23 Mar 2017 07:22:03 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:34781 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbdCWLWC (ORCPT ); Thu, 23 Mar 2017 07:22:02 -0400 Date: Thu, 23 Mar 2017 11:21:57 +0000 From: Lee Jones To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mfd: core: Preserve PLATFORM_DEVID_NONE Message-ID: <20170323112157.lroxixbzfrkj45ch@dell> References: <20170316141959.16018-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170316141959.16018-1-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Mar 2017, Andy Shevchenko wrote: > There is a potential flaw if cell has id > 0 and is going to be > registered with PLATFORM_DEVID_NONE. > > Ignore if PLATFORM_DEVID_NONE is supplied. This is a substantial change to a pretty tried and tested piece of sub-system code. Can you put some more meat on the bones in the commit log, and include examples. > Signed-off-by: Andy Shevchenko > --- > drivers/mfd/mfd-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c > index c57e407020f1..c9583f895058 100644 > --- a/drivers/mfd/mfd-core.c > +++ b/drivers/mfd/mfd-core.c > @@ -149,7 +149,7 @@ static int mfd_add_device(struct device *parent, int id, > int platform_id; > int r; > > - if (id == PLATFORM_DEVID_AUTO) > + if (id < 0) > platform_id = id; > else > platform_id = id + cell->id; -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog