From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079233; b=FSoA443rqKfaQMjsZgXg2a0P+yebLgyu5+Se7MSgEqOoWgxJs3MioPy9h4vYOLCBe3qn hLMr5BzO3c7g8+Nc3nkHrr+f6wCS8WYzFs0TLg6fe1JJOhZGJwr5Lx8ngy65IwDSmUElK OibSrJUcEVQPAZbI/wK03G0WCphM/vboxRz47ISJWYzyke/EUrYEGZeaZfHIzwJhehcYI xlsWdMXqzv6BPFVvqKzuPiqTjLbl+9QHiXAzqUckjYZBuLwkdklCrqeDZWY641EMJwz9i SWohhrJG1JtwPouzRVY3QFUMv8uKeYU2zC1pQVZkhW+ftQAf/uSD2olSMy8WFfnz3cg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079233; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=8cohzD+qmW5sfsNXaoQgdo/Qk9eAr7/mckvMjDjCvng=; b=M1og9aEiv645N4BD3SugGVR7RmOVGkaGLqlOfXGv1AIEaEfX9UeVhBoNhtjac1k9vTRY ef/UOqA/gWLwu+PgrHQ+aa/PdhxFg8KIZQZMdhhT46Du2nDPC910oTrIHWeXVEz2xhMUI MSMRUaScMD/AsZyn1/yxc3Fr5Ma2YeQfb002jOHRRJgd5S38NW5l5PMFBe6aRdl6mgsg+ HuZeoKbCrlst4eFHotGGNuHu8iDojqR0v2xAeB0YgYwAM745oOflxPAgLuSpN208eJY8t kbOBaDnyBWYqxpuLzV6Iy8dchckgtEmL3+1qghRPWy568vDSz/fpT/UoSZALtx8fuSg== 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=GnjO7kAt; arc=none smtp.remote-ip=74.125.82.69 Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) (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 7BC56606A327 for ; Mon, 30 Nov 2026 22:53:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7BC56606A327 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=GnjO7kAt Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-1383723dfddso11084466c88.0 for ; Mon, 30 Nov 2026 14:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079232; x=1796684032; darn=lists.linux.dev; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=8cohzD+qmW5sfsNXaoQgdo/Qk9eAr7/mckvMjDjCvng=; b=GnjO7kAtFiFZ0KtdXxTarWqWmrTR4kMc//vfu7+jqJGFoo7FSxpqqt5+0hTgYUB4jN /S1zMAEiJiatTpQL6WSekTc7NFDwX40j4Ql4lhjZT4BIG3pFh7pvSRvizS4j+Biwiwfe fcauSc4LjlrVmC+5FW+W4rBkTFt56yZkAm8VmVW9odLlJ4azN6poh9/dfCr3wvWzDkmf G2eO1ifOA0cBsxpXFaMr8wIpi9srIpLm5JKmrZNEgs6BD7FWikwWHRgxK+ih59RNeNIa crtUepc++yb2KO9FuUhMscmVVcGwoQtbataRW+to4hJ1cxa+2CmWdJPBdzfKc3a69k80 rzWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079232; x=1796684032; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8cohzD+qmW5sfsNXaoQgdo/Qk9eAr7/mckvMjDjCvng=; b=z2CVMCIZXCh9Mie4a6lZZVScPqFR3mFnYqyT64j9f+KwJHn10SxQaZMkkrUdJFO9HO 4uVi+/T7GLdMD3x1RWkCf9dk2EtOHPxi7CLU2QkxdwqJNSXSsrdR5xy6usZDb25Rgk+3 nlRhOahtoSnZA8P8epw1tp5Dm8khvpb07ROr5YO37/ERFunj5uEl45j3WgEvdx31ZVb1 LrT4ASm/aObQE1k4FgfWzfbrU2hUNUAZW26meQFLiQ/je2oDD1+jpeoXHGIzm2+47Zr3 JJE8futkHw4vl0OKLm17Ghmrm/LIcJd4RYh9StLe3VBMkGmVgFSYOKIqG7E/kcjqRh9f mUrw== X-Forwarded-Encrypted: i=1; AL+hErFNN6vRUhWxBRWHV9r3i+OZBm+7tDHAu4HusQ63Cpw6TS5V33PRyFIMXX/qkY+oVE6p3Mud@lists.linux.dev X-Gm-Message-State: APuU4Z/JqU65HL71fQSYHfyZX6bGee6Y/X6PFYEMpw6swnnKO7yIQuVi uDm7G9AI/3TiwPCihLAkg8IyzSj96KyCSEczUGN5MOfwKIYksCgB2V86IuwmpBgy0od1bIE3fvx WaGZVkKcsNA== X-Received: from dlbtu5.prod.google.com ([2002:a05:7022:3c05:b0:1a7:44f:3bc7]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:7e82:b0:189:d6bf:7eaa with SMTP id a92af1059eb24-1b56f39c64bmr25856803c88.16.1796079231659; Mon, 30 Nov 2026 14:53:51 -0800 (PST) Date: Mon, 30 Nov 2026 14:53:37 -0800 X-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130225340.96859-1-irogers@google.com> Subject: [PATCH 0/3] driver core: Add __must_init annotations to core registration structs 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" Following the addition of __must_init in driver-core-next, this series annotates mandatory fields in core device-model and firmware upload structures whose registration functions reject missing values at runtime: 1. struct bus_type::name and struct class::name (checked via kobject_set_name() in bus_register() and class_register()) 2. struct auxiliary_driver::probe and id_table (checked with WARN_ON() in __auxiliary_driver_register()) 3. struct fw_upload_ops::prepare, write, poll_complete, and cancel (checked in firmware_upload_register()) All existing in-tree initializers already populate these fields; tested with an x86_64 LLVM=1 build on top of driver-core-next with zero warnings. Tooling note: Clang's require_explicit_initialization attribute (__must_init) was used to verify all in-tree initializers, and an AI coding assistant helped audit the registration paths and draft the commit messages. All changes were reviewed and build-tested locally. Ian Rogers (3): driver core: Require explicit initialization of class and bus_type name driver core: auxiliary: Annotate probe and id_table with __must_init firmware_loader: Annotate mandatory fw_upload_ops with __must_init include/linux/auxiliary_bus.h | 5 +++-- include/linux/device/bus.h | 2 +- include/linux/device/class.h | 2 +- include/linux/firmware.h | 9 +++++---- 4 files changed, 10 insertions(+), 8 deletions(-) base-commit: f62fba71a846ebe59423bfd057af023b418935a0 -- 2.56.1.839.g22a8290db9-goog