From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079233; b=YfIgjvNIGgVUV3YWqf7QsCgzQQcqwCl3M6PtHwGAYvppnNVErysz/yiQNC6jl/iDG8jJ 4LIzf1UiLCaQPdL7ThDQ1KKQ/8YEapGsywHcw5dTcXqP3QYzxX7zaDhM+smWE3St1cyJ0 FFCyutX32sOjqfJgC+okKmR24EqPT9VAAh1fiIiIFAvkm+ASSqFcvEG9xYYqtUmCCsAcH kbdkGb6erh4YdM1LBPH5gKYXLCrAyWuxXPxpyVP6lDJ8i1zmOJ/Es0Q+02zAq8a14PBHl p43bo4Fqq8BIYqMPV9Ldm6WgQqjUmRTecwBCNbNyk3+oUfplUzcVYFWx59E+SV7o0TA== 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=IQl2kHFXWWRxm+J1V23MMG5clD8ADNvj0WRhYAaTd4p/7D+ih0zjbQRQORZIpq0E9CJS 2LQjS8wKNbG9tlqbLa6qtym1YNbCrOeNdGAPUEppbGkvHi3dth/uWnU+YxMP59mcvxgO9 Fq+niq+qI86JtWk/NLr/BVXpyD1vuh9QtSNETPL2ZJ6HxlE526X91nwvjiO0DYP+cwiQa lt8IwY09h1beeDlhgCWNUxg9Z7GLVOPtxw9lhGeXatP/1KoeuhzyCMkgQbhh/iCWWxH8B JK/CcMO8FubG95/jmlUSuFCo15RSLyHsVtqXWAOhQN7oVjMXhJ48ARXfrg8JGPmgB8g== 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=LE9ua3p6; arc=none smtp.remote-ip=74.125.82.71 Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) (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 603FE606A325 for ; Mon, 30 Nov 2026 22:53:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 603FE606A325 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=LE9ua3p6 Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-1383723dfddso11084463c88.0 for ; Mon, 30 Nov 2026 14:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796079232; x=1796684032; darn=vger.kernel.org; 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=LE9ua3p6bVP3iONBqlAxmHaiwjWJcwOV3G07cpktli10MM5pCU6brasaEE6+nrx51R OAiUhUxld6lEkEJy+P3Hb43q6aJX9cyrEbJH4Ast9gqr4HXqLwhn18H554o79B3DTyP8 uY/5Ddsh1Hb7tQTHIodAHy8VpRYEgju1i5fah7mVZn6M4nzySxcAsVO1s2xxO//XlORm Tpn0gor9SdJfD/0MeyimHTe+QJSuiW046O2F5dr5+okeTyty358DtKAZRGX41OaWIoQh 6t86CbogD5BpBnUGHwPU7Ter3JE6D4jWUcPuyJ08h5YR8zrfVbfKl3606tQ5xYpQj191 /BCw== 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=0cDOpPLduWUmqx7Oh3dKAYa4k4QTuR7xjEj2YWY6Sz/ZK0PbTKI6b/MWcc+El5i4Jf g7Syq0W5CJQNKJucj+yA76aSyh/LpCCK66FwWuABfqg2WRnKBMp4goMALrZ+EPYWdHqB zgNQ+kSL9Dd7jJumUS91aHrRulwXy7JoFJWXGwqVkRCnVVaSzavPtuxh/TVpX9EyBG7d seogD7/bGCYQI2XTYyZvk3VkpWLn/F8RkW0XBD7TjT2LGV93gWVW+8GqLSjiC7Azl8C9 Id70ib6AtJDyVRW/+aByxo8HplszAu8iXnH7+b8ilQ3xkW6WzonIHjbrncRWWWYRU4C6 oK6w== X-Forwarded-Encrypted: i=1; AL+hErHji3sMxdRAFEaWqzt+CIjY6HVBw2Zps0Q14wOI6piMyki+36feCcc/Ha3+1BZqpJ6cxPD0ojrdEnH01EA=@vger.kernel.org X-Gm-Message-State: APuU4Z9SIGl58HtJ3dGqSeLoeoYcEY+JmS05yijdjlRncq5CI/rxHhcT q1O1emll8rLHoF4d4okNea6FGlzE3pYbsQ6T+9Y8CLo6nBqT3hToPAHGt3HofAdPMYp3dRLM8PR Vs4Lul58Gzg== 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: linux-kernel@vger.kernel.org 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