Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756280AbdDRKWF (ORCPT ); Tue, 18 Apr 2017 06:22:05 -0400 Received: from mga01.intel.com ([192.55.52.88]:57864 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755151AbdDRKWD (ORCPT ); Tue, 18 Apr 2017 06:22:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,218,1488873600"; d="scan'208";a="1137115661" Date: Tue, 18 Apr 2017 13:21:59 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Linux ACPI , LKML , Andy Shevchenko Subject: Re: [PATCH 2/2] ACPI / scan: Avoid enumerating devices more than once Message-ID: <20170418102159.GC3093@lahna.fi.intel.com> References: <20731969.imAyuWkf7P@aspire.rjw.lan> <2231844.zRx0dlJUx2@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2231844.zRx0dlJUx2@aspire.rjw.lan> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 14 On Mon, Apr 17, 2017 at 01:20:48AM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > acpi_bus_attach() does not check the visited flag for devices that > have been enumerated already and some of them may be enumerated > for multiple times as a result, because some callers of > acpi_bus_scan() don't check the visited flag either. > > For this reason, modify acpi_bus_attach() to check the visited flag > and avoid enumerating devices that have already been enumerated. > > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg