From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA5B5322DC0 for ; Mon, 29 Dec 2025 14:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767019411; cv=none; b=mth/yqlUIoeb4w3kCQRrrmCofGhQ7bbxrFjZENU14Acs/rOQwpqjzGVF99xqa1N5hLLQRd7m1/SWncVU9PHUSExgxRlwgLnjD74aWvTCRnyX+fmYNSWL2Vjpi7egWgCel7g6qXeo2ny6nm1r69DScVpnNmR6ydEjdkRXAGzNu58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767019411; c=relaxed/simple; bh=BP25S6VZJ6osT32vrKEhrlBmxgwWCvZXYyPr8VFt/18=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=L1Nt0B0b0B8Zptkbpptm6bRn8lAK7W1XOonujURYO4Imvujby2lYMrgO6wg/ZUimCSvKC2E25in59fgS7P+hGWdSN73hwzm/17v3avTnC3DtSAw/kyPHNk63aV2BLR1LEvGlR4hU8UvJ8WBWP0zsHgcLec3SFAFc9K4PYJZWUl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NULrhidx; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NULrhidx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767019410; x=1798555410; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BP25S6VZJ6osT32vrKEhrlBmxgwWCvZXYyPr8VFt/18=; b=NULrhidxfYP6fGDFqvdT5Rj6v+p79KaZQsPuSod0qiglOPDvnuRJvDQZ A6t+4BKhnIT5cPYBB/gmPrL2xeUD6UiOueD51zRBTt9iUIu0AHOl6CVQV rX6vd9wOf/+ffFSlJ95Pf5mGhdm1JxvJpdJLHwafj36YNQOPIqu5CN0g2 o/cDFrZT2TetY93cYw3VRwEEO67M6grCMyb3g6bIS2cj6BjMpXv+ISE+W R6qNTD5hML/Jd9wJ+onmQp4tjbLNIBTohYtXRYaH0GkIjNbhPnNDgkbDV /NtUOvzqsiElgKMIj+NCr/7nW91xKb28/uUMNPmxMg7k2e3kBRx30o1/7 A==; X-CSE-ConnectionGUID: oF1a8Fb4Rzy7iCwcWEN/sA== X-CSE-MsgGUID: UUcY4wIOTr6qBsEmJ6cKGA== X-IronPort-AV: E=McAfee;i="6800,10657,11656"; a="72475651" X-IronPort-AV: E=Sophos;i="6.21,186,1763452800"; d="scan'208";a="72475651" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2025 06:43:29 -0800 X-CSE-ConnectionGUID: y5nQEuPcSleW2NP5BxXlPw== X-CSE-MsgGUID: F2MntgBaS8K43vfZw6RpvA== X-ExtLoop1: 1 Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa003.fm.intel.com with ESMTP; 29 Dec 2025 06:43:28 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id AECE58E; Mon, 29 Dec 2025 15:43:26 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Andy Shevchenko Subject: [PATCH v1 1/1] driver core: make bus_find_device_by_acpi_dev() stub prototype aligned Date: Mon, 29 Dec 2025 15:43:25 +0100 Message-ID: <20251229144325.1252197-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently the bus_find_device_by_acpi_dev() stub for !CONFIG_ACPI case takes a const void * parameter instead of const struct acpi_device *. As long as it's a pointer, we may named it as we want to with a help of a forward declaration. Hence move the declaration out of ifdeffery and use the same prototype in both cases. This adds a bit of an additional type checking at a compilation time. Signed-off-by: Andy Shevchenko --- include/linux/device/bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index 5c1aca0d48c8..763eea81cfb6 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -216,9 +216,9 @@ bus_find_next_device(const struct bus_type *bus,struct device *cur) return bus_find_device(bus, cur, NULL, device_match_any); } -#ifdef CONFIG_ACPI struct acpi_device; +#ifdef CONFIG_ACPI /** * bus_find_device_by_acpi_dev : device iterator for locating a particular device * matching the ACPI COMPANION device. @@ -232,7 +232,7 @@ bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device } #else static inline struct device * -bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev) +bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device *adev) { return NULL; } -- 2.50.1