From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079237; b=ENIuw4rcTJP1czRJbNzaLxmOMYmR+k2Q4avnMNEsgu5QW00BtywZq7rtD5wcKaCVaqkG xRGwOGO2X1cLzaba8Oui50f1bvLMNJmw8r86aHCWummMGA8fd1ZPg5fflrz1Jl4eFgkuW 9zWvNHSNK5+tqTQz7gf4lMVM25qlKCvZudmu5O6JS1uaU+IgPHZSa60GXdRFxGH0iDbao svxFH1mEGiaR5tj6WvZ9c9Y7B5jTDmf92FWi8Ps7EMOAd7PxubrgmQJHzUudlMScJujEx NLfyNzCaM/8AkfGPQ6/zin7yzxC7IP5eL3PZPKzvb4X4k0bwYLjHyBu5Sq2yUnP9Vyg== 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=38y+eLBo3t+R96FkCuCdp6AUZ0Ff4ESkBo4bz/kO0XCBHVVEdn/tsHCwITj5hnSOzbfT eobU4Ne2l0k1Z+0OijNV1A75bWTOGw7tPUP5UyoFYX6x/3Ze92IDjuiUpBAZfZusXifks 6+s5Iq7oWmoXUYfhn4+a21CQnCsevcElDcDJWSNhJ320CzfB1f7WQGE1/CxB4le9ZmqlO tFA7YZilnI1IAWVaRHK0TSKgHcGfDRBV6zIazQxoRtgIyHHYxcWj3xgbRfXYG3tNfjGOj P4OfqS4IhZAy0z/nK9QUmG65/f/LpqakSLyX3CYV+ESscVY1GPsoaccOaFsz8OuNhyQ== 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=oSxfNASm; arc=none smtp.remote-ip=74.125.82.199 Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) (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 CA5ED606A33D for ; Mon, 30 Nov 2026 22:53:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CA5ED606A33D 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=oSxfNASm Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-384c78aa0dbso13535314eec.0 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=vger.kernel.org; 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=oSxfNASmvLQ0l8TBt/w0N9WEY3eBc5yf3W9j+FNYPdcZ06MJ7XLvkL18H5MryQZ6bq ACzNsDFoeWF5jTgs0aJnhLAcnEKMZ03TeMw2O+ZG/kpemX/zyyV1YCISHT26VRfH/oXV qDWHTfxAfXEtxjpwYypkyGi2NcYgZm8pcVGcu6fBc7o3q8wgzgeDG7birZQ/7zWKXz+t UhL+kCliorFGeEdD5Ut80WAYUx69Me5CafMxRRt27Qp14deermcah1AK8+lN4460YNDh VJ2kUPBs0EfyFPEBMExA/AkKMywHLZH0+8PezPgBRhZ/aXTURf59NKdjEecTWQDfyuei OIzQ== 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=RbXI9SWL1fdYoMsaJizjOIPvheMxw4ofyVayi3m0aW7V9TJoaszzzoIFhKFjqC5fr8 aqaQqByp+IqI1uJuzPjdJVtSIA9fADnU+QtlUKPy9ORiBLoRFPf7kpHvkC7SeNnTPTC/ vNdmbVfIFWnuTZbR47r5JnAXwc/+IGTmVzOcu6iAwJ2JolXW3FK+2w3QNrcBKd1c4bRz enIamw73neQVS4+TfyxcrhaOm3ZC2lmWrRBtqERqkp5TurovfN8ZxSPhbm8LFqexa8TQ SFiiBnMk3+ZFC3LIDWvQGcxs5cLSdc308l3LjzB00RN89BBTbbuFLz5W3ERFnBF17f72 cLIg== X-Forwarded-Encrypted: i=1; AL+hErH4RQKtO3SlfxJy9jq8V1y+8Qnahr+m3Hvv4BvtjGAPPUegpLJy4Sdq1v41tvkjSEEOHcNXbDuqP44u7Q4=@vger.kernel.org X-Gm-Message-State: APuU4Z/iaaBx1Ph9VEOZTyOpPzpWQ8YcwiRvj1p/Uhgib489KsKV3smQ pLySUCmbyc0cjwjgeU7te+xip83N2vAEdTfHXKsVIvHyId3pqjO2OEoiL1NIoBeokNk/itpj2Sg +PjbbMRN3Iw== 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: linux-kernel@vger.kernel.org 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