From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasuaki Ishimatsu Subject: Re: [PATCH 01/02] ACPI: sysfs eject support for ACPI scan handlers Date: Fri, 8 Feb 2013 09:50:28 +0900 Message-ID: <51144BD4.7070804@jp.fujitsu.com> References: <1360191056-13293-1-git-send-email-toshi.kani@hp.com> <1360191056-13293-2-git-send-email-toshi.kani@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Return-path: Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:38939 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553Ab3BHAvY (ORCPT ); Thu, 7 Feb 2013 19:51:24 -0500 In-Reply-To: <1360191056-13293-2-git-send-email-toshi.kani@hp.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Toshi Kani Cc: rjw@sisk.pl, linux-acpi@vger.kernel.org, gregkh@linuxfoundation.org, bhelgaas@google.com, mika.westerberg@linux.intel.com, matthew.garrett@nebula.com, yinghai@kernel.org, liuj97@gmail.com, linux-kernel@vger.kernel.org Hi Toshi, 2013/02/07 7:50, Toshi Kani wrote: > Changed sysfs eject, acpi_eject_store(), to support ACPI scan handlers. > > Signed-off-by: Toshi Kani > --- > drivers/acpi/scan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index cfd7a69..3ff632e 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -203,7 +203,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, > return -EINVAL; > } > #ifndef FORCE_EJECT > - if (acpi_device->driver == NULL) { > + if (!acpi_device->driver && !acpi_device->handler) { I don't understand the fix. The if sentence becomes true, when both acpi_device->driver and acpi_device->handler are NULL. It means that acpi_eject_store() runs if either acpi_device->driver or acpi_device->handler has pointer. Is it O.K.? I think it should be if (!acpi_device->driver || !acpi_device->handler). Thanks, Yasuaki Ishimatsu > ret = -ENODEV; > goto err; > } > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757208Ab3BHAvZ (ORCPT ); Thu, 7 Feb 2013 19:51:25 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:38939 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553Ab3BHAvY (ORCPT ); Thu, 7 Feb 2013 19:51:24 -0500 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <51144BD4.7070804@jp.fujitsu.com> Date: Fri, 8 Feb 2013 09:50:28 +0900 From: Yasuaki Ishimatsu User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Toshi Kani CC: , , , , , , , , Subject: Re: [PATCH 01/02] ACPI: sysfs eject support for ACPI scan handlers References: <1360191056-13293-1-git-send-email-toshi.kani@hp.com> <1360191056-13293-2-git-send-email-toshi.kani@hp.com> In-Reply-To: <1360191056-13293-2-git-send-email-toshi.kani@hp.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Toshi, 2013/02/07 7:50, Toshi Kani wrote: > Changed sysfs eject, acpi_eject_store(), to support ACPI scan handlers. > > Signed-off-by: Toshi Kani > --- > drivers/acpi/scan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index cfd7a69..3ff632e 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -203,7 +203,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, > return -EINVAL; > } > #ifndef FORCE_EJECT > - if (acpi_device->driver == NULL) { > + if (!acpi_device->driver && !acpi_device->handler) { I don't understand the fix. The if sentence becomes true, when both acpi_device->driver and acpi_device->handler are NULL. It means that acpi_eject_store() runs if either acpi_device->driver or acpi_device->handler has pointer. Is it O.K.? I think it should be if (!acpi_device->driver || !acpi_device->handler). Thanks, Yasuaki Ishimatsu > ret = -ENODEV; > goto err; > } > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >