From nobody Thu Feb 12 21:47:13 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 766231B2194 for ; Sat, 4 Jan 2025 14:14:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000061; cv=none; b=sDkPzS0jZIAD3u/P2q/JhRiyfRUjoN6yZ94Q3vOm/RhhZvPW4OpKlJ4/laz03IkKzTr49yIMsu6UNPcuHAJg2sLKCvQTJ19dNVUL6zWMI1azw/1KabCyryyZPtsR1HzbuJ3nATZISZfJDX9WPzgwVHDpVO0DQjOoZxr6BgpbDDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000061; c=relaxed/simple; bh=BFZmBgaMcS54qAWLwDUnFP8OGtFQJeNMVwkZ/dPHTsk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FgfH99YbpSLjY/afV7rmEpLZfOB1TNH7dyZs0TfiCG5Da/B29rrMS6a1QnttONtMdE/L+oZGhAij31r6AQiEO5nZojLo12BlTo8CxTLdFqn7xjw0vxBh1FGjBGNEweVQJw0xrI4QUTxXHWONJj3i6brF0/4EIVkK6Xr6wTSeYmg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=io5jIHyy; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="io5jIHyy" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3862f11a13dso1571074f8f.2 for ; Sat, 04 Jan 2025 06:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736000058; x=1736604858; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Arz7UH5V0R/QtRgjMHXv0sSR73DFlldxjby2FSghGEU=; b=io5jIHyywCMADug9UHYcrI6rSqt5QmlP/H9XhgSC5T96POptBFp1Auv3/eLCbw6ViJ eU7+mXOeYKmCCAKg6uzL3LwVt5FCojsfWWwQHnZhPWltKjyyvQeu9pzhF51jHWJf09z4 yeHAul0SZtORVUhtUuBta1JVS3mqtT1l4YjRI3EFv/Io3sxzjjAtOITHBkSuudOsxlsD Ek9jjBPLy7hfzVh/C3D8GlOfVkngxQotfzKGc4f9ZVcpJFNIVsSD4RwWkp+4Zb860zui LcFHaN3IHdeByNhpjuF1we7u7Zz8GM5Ti9ocLs5WYVXoYQ8ROcz63nsxPk6i+/0kSpAk Ka9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736000058; x=1736604858; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Arz7UH5V0R/QtRgjMHXv0sSR73DFlldxjby2FSghGEU=; b=jycyBUMRcaGhE9GJvmZgfD3+HoqwS5IpMT3RC4YWHXt98MADGbHw2M8u0UTklY4hU4 PMGAQZEtN6mUcoBcQ6QbUaVHwF7pNAinLlYpq/dBX7DVa6kFeRdofDtjzOyybhDm5Rlm ZlnCnLg/OEhskfcQGI8gfFixvl4nTibovE1IIwA5jLAyGoLZKrTVnMizEfSsmJQqdvuQ gwFqdIcVWwmqh19ZMCDm1qXZiZwNY3gi8jn+lx5t5uAE/hsWuVi8+zZ4eqxB3o8J+Zgc NC4lrMQnzhii94KYIckhIM9vTWR2M+gXbINI7UgfhoaVehIgAo9QEtMRCPUm1XyYzTXL 0EBQ== X-Forwarded-Encrypted: i=1; AJvYcCWLy1qlSc79NppHnW51yEFcskyOKO87MCZefVteFGmE8V7L6sb3XUvRcRmja2M2j34DVu9uctUMajSHMVg=@vger.kernel.org X-Gm-Message-State: AOJu0YxljDXx6e9HiHSTJtWcbsdlMlnLQN6K6nq5EA3sfSIxh5DeL5ax 5ZfdnXSc+JBaFHqhY0OU14oyahclAmzX5uBifmd5bWFyfxZEG9xwaVzogVqAy74= X-Gm-Gg: ASbGnctjq8874f3iY0tHdX9A6HU3gSbQRfWfZVQtYbVRsVnmvQT+C6gBY1ZQczNBCFi n3ZRpN/UlktNMyWo7/P6JZbs78gOO4BKVsBsMDUCaCv1dWFVACy4s0xjyV9bOMaWoEVoJI2yth5 s0YEDKU0ZaDf4wjPWV9FcAbGgyFiiHCoyy3eiyTSSqULjQAwDCCvFtZ7f+fwf1+Z1DfIS+MoQXZ YzzHrzN7jPRKvTnbEmcG1origDvqeEzcAz2OsgWfUiV75GvaiWi8tEVh37ubSQ24R+nQbg= X-Google-Smtp-Source: AGHT+IERntYolr/hyWXdngG0D2K9j63kKng280g8bHrpnSl9cEopIlz5IwybNnf8vAnOOpfA4Wvl7A== X-Received: by 2002:adf:9d84:0:b0:385:ed78:e17d with SMTP id ffacd0b85a97d-38a2213dfc3mr13593423f8f.0.1736000057707; Sat, 04 Jan 2025 06:14:17 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b207sm545316105e9.32.2025.01.04.06.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 06:14:17 -0800 (PST) From: Krzysztof Kozlowski To: Julia Lawall , Nicolas Palix , cocci@inria.fr, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] coccinelle: platform_no_drv_owner: Handle also built-in drivers Date: Sat, 4 Jan 2025 15:14:14 +0100 Message-ID: <20250104141414.114971-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" builtin_platform_driver() and others also use macro platform_driver_register() which sets the .owner=3DTHIS_MODULE, so extend the cocci script to detect these as well. Signed-off-by: Krzysztof Kozlowski --- scripts/coccinelle/api/platform_no_drv_owner.cocci | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/coccinelle/api/platform_no_drv_owner.cocci b/scripts/c= occinelle/api/platform_no_drv_owner.cocci index 8fa050eeb7e5..5e869858bda8 100644 --- a/scripts/coccinelle/api/platform_no_drv_owner.cocci +++ b/scripts/coccinelle/api/platform_no_drv_owner.cocci @@ -10,12 +10,21 @@ virtual org virtual report =20 @match1@ +declarer name builtin_i2c_driver; +declarer name builtin_platform_driver; +declarer name builtin_platform_driver_probe; declarer name module_i2c_driver; declarer name module_platform_driver; declarer name module_platform_driver_probe; identifier __driver; @@ ( + builtin_i2c_driver(__driver); +| + builtin_platform_driver(__driver); +| + builtin_platform_driver_probe(__driver, ...); +| module_i2c_driver(__driver); | module_platform_driver(__driver); --=20 2.43.0