Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbcDUV1S (ORCPT ); Thu, 21 Apr 2016 17:27:18 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:33205 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbcDUV1P (ORCPT ); Thu, 21 Apr 2016 17:27:15 -0400 MIME-Version: 1.0 In-Reply-To: <1461105548-20618-6-git-send-email-octavian.purdila@intel.com> References: <1461105548-20618-1-git-send-email-octavian.purdila@intel.com> <1461105548-20618-6-git-send-email-octavian.purdila@intel.com> Date: Fri, 22 Apr 2016 00:27:14 +0300 Message-ID: Subject: Re: [RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications From: Andy Shevchenko To: Octavian Purdila Cc: "Rafael J. Wysocki" , Len Brown , Matt Fleming , Mark Brown , Wolfram Sang , Joel Becker , "linux-acpi@vger.kernel.org" , linux-efi@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi , "linux-kernel@vger.kernel.org" , irina.tirdea@intel.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 942 Lines: 39 On Wed, Apr 20, 2016 at 1:39 AM, Octavian Purdila wrote: > This patch adds supports for I2C device enumeration and removal via > ACPI reconfiguration notifications that are send as a result of an > ACPI table load or unload operation. > > acpi_dev_free_resource_list(&resource_list); > > + strlcpy(info->type, dev_name(&adev->dev), sizeof(info->type)); strscpy() ? > +static int acpi_i2c_match_adapter(struct device *dev, void *data) > +{ > + struct i2c_adapter *adapter = i2c_verify_adapter(dev); > + > + if (!adapter) > + return 0; > + > + return ACPI_HANDLE(dev) == (acpi_handle)data; What is suppose to return? Hidden bool to integer conversion is not best option I suppose. > +} > + > +static int acpi_i2c_match_device(struct device *dev, void *data) > +{ > + return ACPI_COMPANION(dev) == data; Ditto. > +} -- With Best Regards, Andy Shevchenko