From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079237; b=sZB4TeLOkV64ZJwblFf0m6cFfG2cINFJadKNEm/bM3sMufKrnYUno9sdG9qCGpANf8b4 A+Q5tOWxirs5j31CUS3GkUELHODqMJ7KQola6PqreMckhnWU6Njb6DvuoXi4Wc55+DBJl gdXGHOm94reysHmFancZguykwoNsEtI9cDk7qLrJX75cPZCo6X9OY036yI6o5VganiLEQ SWYe60nYzCy2irsP1LlVvWtydMPmQiIAyNrRVFqE8bd3TCOrFu7kLui0SFQSkWzMHDJef MD0uVtHapvSLkZ4mAek0mhGNt4Bamuw0GYbVudXEepYkIuZnJvlA0ISzbR/V7fmew9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079237; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=TwM99ISK5GBK32Q4SBByfhvO69uYfp/+KmqEhC4Bd/k=; b=Po0VsPKlYAS4I8zXzTDU3scRaJmzIm1MezA9SiOYYA6StKVa/G112iROWxcpY2YGTeFf uZIKN4C/olSszQEurSCbuOcy4Cy2oerWMYOMctbSi0JEwvtVKsJwvFXSPJb/IZJ8oOCI7 DCJvPIhZQh9XaUKVpxPsv+dIn2TP+Eb/nU9BDJ2pqMD5it4Zl77IyGGaEosYlNMrOWYMU rGmwvBZPutM3SMmiduY5goqgoYYNeZXHOXfucjF5szh/SLbLPbV+PN7dnihX89NXEvGfL sKBmxl4ewwY47XjzBg3w+TjrAdM9H3yjYgeWGkt2YizVh18iFW/wTm6aXFFXf8euxHg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=A+LTO9+A; arc=none smtp.remote-ip=74.125.82.200 Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6259606A33E for ; Mon, 30 Nov 2026 22:53:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E6259606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=A+LTO9+A Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-3846d5f54c1so11964412eec.1 for ; Mon, 30 Nov 2026 14:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079236; x=1796684036; darn=lists.linux.dev; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TwM99ISK5GBK32Q4SBByfhvO69uYfp/+KmqEhC4Bd/k=; b=A+LTO9+AicdtM34C82/BRZP0JwT9+pZUGyeWo2no6769q1USZxRJolIIRfMQwni8xN 7oww8Kzcg69n4+4akfn7O0H70GgrEj2IW0z4tFgBvpvstkGSgSoIbuwMhXdKa26jWRk8 kN76CCJFNb/eyLC20xeqW5kgtJz+ao+3qBxdZw1HQqVYLXcq7FVLhV8GJ9i1zzAZ7o5t mUgqvux5202cTUXSLld4S3HEF2vvqoUevklBGKG8xp/WX2aLvZuqb1lEqZ8HK4EKX0ON ctOTHpjNUnkDyByQicWXhJ0LOdcoCILWr970xy1TOW7NAH/+Gq3x33bxmhSYyCYIY1lC pjdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079236; x=1796684036; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TwM99ISK5GBK32Q4SBByfhvO69uYfp/+KmqEhC4Bd/k=; b=AQY3OlEfP3fDSS8MaXCXhBSt5FFpiAYTjTyLU+t+hzBMV9ogjYSEzVqizukNQCBjrJ C+NGenLp5rJdDUbjNKj3yiFeg93lxCqQOHM8+MFu+JU0BI5HBOHETom3/SIf9bCenVNP Z0iofecjs4bghU5gGHTpQdURKrL8RVvP/p1Dls0vxeAjlAuGv3Yjw+AOVPpE95nuCJtr 1dnRMpI3GsNRKtDL1lrTwwXQjzzZbLDsvywyw/AGU9+LYuh7bI6HENvQ5Mt+dak9rdsj efggMsVrcBixKRKPGvAMQehmsEHdS1KC3zwcWw9FaEScEyTvS1m1X6k62P86NXmdoMs1 fkSA== X-Forwarded-Encrypted: i=1; AL+hErEGPKzID0k5JiMig/k3MM62AzoQQ7p9t0BqWQZsVTUa/bq9Cx23FyS0V7EV8MLEhmsj9xx+DuOKxISZ8w==@lists.linux.dev X-Gm-Message-State: APuU4Z/J5EePeiQIDzNToVuVrVpFTB/Q5Cp60NnyQZGEpKZMqTzRZVb/ BM4jVbGJL5CbZB4Io9ZW7wbTJsezcf/n0pNsk+7NhLQQNoyUh9AEp5IEpFnA88WDrlggb0ML01b nONBv5NcDLA== X-Received: from dlfz24-n1.prod.google.com ([2002:a05:701a:8458:10b0:1b5:b752:2531]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:f51b:b0:1b5:10cf:c458 with SMTP id a92af1059eb24-1b5568af41amr26388268c88.23.1796079235632; Mon, 30 Nov 2026 14:53:55 -0800 (PST) Date: Mon, 30 Nov 2026 14:53:39 -0800 In-Reply-To: <20261130225340.96859-1-irogers@google.com> X-Mailing-List: driver-core@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261130225340.96859-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130225340.96859-3-irogers@google.com> Subject: [PATCH 2/3] driver core: auxiliary: Annotate probe and id_table with __must_init From: Ian Rogers To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich , Johan Hovold , Luis Chamberlain Cc: Dave Ertman , Ira Weiny , Leon Romanovsky , Kees Cook , Miguel Ojeda , Nathan Chancellor , driver-core@lists.linux.dev, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers Content-Type: text/plain; charset="UTF-8" __auxiliary_driver_register() rejects auxiliary_driver structures that omit probe or id_table with WARN_ON(!auxdrv->probe) and WARN_ON(!auxdrv->id_table), returning -EINVAL. Annotate probe and id_table in struct auxiliary_driver with __must_init so missing initializers are caught at compile time. Signed-off-by: Ian Rogers --- include/linux/auxiliary_bus.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h index de0ecd0fb05a..387f2af85526 100644 --- a/include/linux/auxiliary_bus.h +++ b/include/linux/auxiliary_bus.h @@ -191,14 +191,15 @@ struct auxiliary_device { * }; */ struct auxiliary_driver { - int (*probe)(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id); + int (*probe)(struct auxiliary_device *auxdev, + const struct auxiliary_device_id *id) __must_init; void (*remove)(struct auxiliary_device *auxdev); void (*shutdown)(struct auxiliary_device *auxdev); int (*suspend)(struct auxiliary_device *auxdev, pm_message_t state); int (*resume)(struct auxiliary_device *auxdev); const char *name; struct device_driver driver; - const struct auxiliary_device_id *id_table; + const struct auxiliary_device_id *id_table __must_init; }; static inline void *auxiliary_get_drvdata(struct auxiliary_device *auxdev) -- 2.56.1.839.g22a8290db9-goog