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=1796318196; b=k5zbb1NUM6+2BOzIe37EDpOU7V2dQkl/sJ/r+uyLWl5L5Map9qTSU1B2jFAY1H15WskE 8pGE1Y6r7BnAjbGbf7NFcfM3lAzctTG+6YpplKd1LNc82EweE4p7ii04ZVgwXCR6/nsmK y8IWueQ2Qs+utgpCSzsqcdP8Q1u1l+wB7MBEJHfrF78u6zbdZmwHrlKX7OE0JCESvTvPj bIz+HKxst5uOVaZrsLmChAD+OD8aX108OF0PloZOHKa+OcxuMBQIWfKTtv0kRnomUnm5v cPl83HXkXpOOCGiYslLBpQUCkx8aWgeMD6KpxuhlsnhhMyYgm0ABOL1MAi5SQYVyQdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796318196; 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=A2hHHPneY8iXmPjjs4xZU09h2Xm4dVl2EcBJQptlGgQ=; b=KFlGwjKDXjtQEgNrhgMxSq3IGRx2ivdtbT8wEGz27n11mwPId7IC3gE4smKU/ixa08NR O4tXPejb4jwX3tGgD1/NabCQ3fKJEP89sgFe1DLWX+v2g0j91J9h8CJBycSCfAp/Kg6ER MqIQ9rqFPzHDfF9ArJkz1P2tEWlUOTOJumtWpJZR17azl3i2uANzCR0qWA77ogU3i/0GA ymU4TU1L7fph19Ns0SjKSYBwpACfvvz8A1SZvY+r0vliwXr+eY+ABpmkr/fp+PQkFmuw9 joaFBCJOHgDXzPtnpAEbtMuDNVxjOyrPFmNGyBeo3WBbcUoCtJ4b7MSl0W3ULt4EeAA== 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=bA27xJol; 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 BB07B606A689 for ; Thu, 3 Dec 2026 17:16:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BB07B606A689 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=bA27xJol Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-38355b03cb8so13776472eec.0 for ; Thu, 03 Dec 2026 09:16:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796318195; x=1796922995; 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=A2hHHPneY8iXmPjjs4xZU09h2Xm4dVl2EcBJQptlGgQ=; b=bA27xJolZ3Sko3ZRUpkdCSKXcyhcDlUYnzbOBc+UpeR4bXH+m2apfiNzJhNT2ZTP2D iC9GrFizg1dD7YWfe4KrsxxhTgjUrhukCFFfK9Vq5AIzsvpXJXlv7cWwwVhXCOWczkUT nUwCDlwMNpjX8+rikESU51F9z/sDTeFYqxyyVSYgOa7e+MkUEiSiU/24IXUfuZGbPsqu T1efY1n/myxBkH1ZWM0oZsLfMVZpJnyQIm8glj9Wwg99yfzU9NCBwXeO2++Z/x6LsyK9 eFBThf+/rdmUoE/L6Bn4Vz6aSDZYFGeBDqfWkaYfNUDB/a0pnZEE1MLpLFHXDcNFQuMk p+dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796318195; x=1796922995; 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=A2hHHPneY8iXmPjjs4xZU09h2Xm4dVl2EcBJQptlGgQ=; b=2KKBnj8dAhfGxwgoSknZ8qCX17uVw0uA/701AnimM0yITBddXPbPGlnPlluY+/bStG Z1XJCV13OqhFPe1BixlGo35dK9AWCOa0/vOsgHUhLKmODi3hIMfuGtBCayJ9eOt77Gs1 e5DOEWpbMD5jcmaz6r5Ys+BmI95jQMa9uXmrQLAsMuBZc7tKYfvHx8VHUxXA+//A+Lru Zu1gsOBKvdq/JwVYj9IkIBuT1oUID38fBdyIb5rYKUzctJGtuceiIiw87P/kmTVe1wPs 0IlMk4s82ptuyEpc/haeshJorHOf+kQeunUbSrX/DVj/OpPz+7BNp5SH4z5zu1cJjmJn TP8A== X-Forwarded-Encrypted: i=1; AL+hErEpsTCcPG4ve9Bni7MDqYH3BM2eyYOLkiXitmKEagLGM6DYmbubCms7MOA/Lgz5caV7TFt8@lists.linux.dev X-Gm-Message-State: APuU4Z8PzdT+nCKziX9wTGtidvUjACEt56TbCG3uEqR8ZB9ZwopfKEAE yTtSdUQVUeI/lHJsM7PvwQ3eWulodylvusHloJlRouAC+ZFvg9c0uMZKLdykDwpS3CdZTPx0gZ6 WUrRGHtOgyA== X-Received: from dykf2.prod.google.com ([2002:a05:7300:6902:b0:387:4d44:7a5b]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:d086:b0:387:4455:b38b with SMTP id 5a478bee46e88-3874455b988mr2307365eec.24.1796318194500; Thu, 03 Dec 2026 09:16:34 -0800 (PST) Date: Thu, 3 Dec 2026 09:15:44 -0800 In-Reply-To: <20261203171549.438355-1-irogers@google.com> 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 References: <20261203171549.438355-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261203171549.438355-3-irogers@google.com> Subject: [PATCH 2/5] media: rockchip: rkcif: Set .owner = THIS_MODULE in v4l2_file_operations From: Ian Rogers To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Laurent Pinchart Cc: Nathan Chancellor , linux-media@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers , Mehdi Djait , Michael Riesch , Heiko Stuebner , Hans Verkuil , Gerald Loacker , "Bryan O'Donoghue" , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Content-Type: text/plain; charset="UTF-8" video_register_device() passes vdev->fops->owner to __video_register_device(), which sets vdev->cdev->owner = owner so chrdev_open() pins the V4L2 driver module while the device node is open. When .owner is omitted in a const struct v4l2_file_operations, vdev->cdev->owner is NULL and the driver module is not reference counted on open(). Set .owner = THIS_MODULE in rkcif_stream_file_ops, found with Clang's require_explicit_initialization attribute. Fixes: 501802e2ad51 ("media: rockchip: rkcif: add abstraction for dma blocks") Signed-off-by: Ian Rogers --- drivers/media/platform/rockchip/rkcif/rkcif-stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c index 3130d420ad55..329c38d284f1 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c @@ -506,6 +506,7 @@ static const struct v4l2_file_operations rkcif_stream_file_ops = { .unlocked_ioctl = video_ioctl2, .poll = vb2_fop_poll, .mmap = vb2_fop_mmap, + .owner = THIS_MODULE, }; static int rkcif_stream_init_vb2_queue(struct vb2_queue *q, -- 2.56.1.839.g22a8290db9-goog