Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp92533rdh; Mon, 18 Dec 2023 12:33:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuhlJ3+GuqtHVpWDzYCSaXGSJUbBgcpQQCWqmVwHtuBzX9jzBhsgHxm2+yzbYny8xYnbND X-Received: by 2002:ac8:5a43:0:b0:425:4043:50e9 with SMTP id o3-20020ac85a43000000b00425404350e9mr22360036qta.120.1702931634050; Mon, 18 Dec 2023 12:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702931634; cv=none; d=google.com; s=arc-20160816; b=xW8wNg7LszuWYcOlKqMxjxXIn3jXypljosrRzaifOu05Oj2W73FOqL4pm70OgzzisM ote+t3EKzBejYZ7JsAjERu69Pin+gN/djKuN74uch3xqv2IYi72+njopv4NS6N5zXRFn IzNV9Vv8SleoFpuqqK27kLc6OLAKR6U4EKNAqOTlOumTZ5rbH9gNDGsA6cKPyZcXFoMr DZnoX8mR+QknyFxaxTVBfzWlvjBr1ToBAWjTVQC+g4ym1McAfjTSvKDiaZBbABt/iIrB ig7GjKgs2+qtFdIpCQV23xRKeT8KzHm3PhrrxxevXoREFcp5ryJoVTODHOSNeNVM9uEz 5tkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zAQQcJvxmv/Gi19bl+nhpgpziG1IJRjXX8xL+uIl24E=; fh=8B3NYm4cY3Jfgrhmqnp/eS9NhmGphkHCj2/O0He0TCM=; b=06AM1UtbK8ng6IN3JXYcYZv5Eb7RXqxcf34SraBtXI8ua8h3MP4kVmlsHRjn8/Rxwx VlWzYZgJ38Mdv84uXywGfUJiXWFJPqb6AtsrK+AdZUv4ekyWx/ZDz3E9o2hJFZlTBqbQ p+hhOYWvzJiucis4RqFuy4+rnRfSLaL840DosgQtgbI/R1Ic4m8zs+GQhRf8G0Ch2R2d YqMDfZo/Y7q6UkHmq5baPCbiWM4MU6gz7MmUVGbyqI1AnZz6RBtK42oMiBWrCWN7MfxG IZ4uP1wx27SIri8Zkt0Qox3pBMvt5cECMjqvF+WGGlZ0ApeXRx/diEvSCHIn5SdhO2WP e1Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aAaNF9Gx; spf=pass (google.com: domain of linux-kernel+bounces-4359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h18-20020ac85e12000000b00425e942f110si15228121qtx.325.2023.12.18.12.33.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 12:33:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aAaNF9Gx; spf=pass (google.com: domain of linux-kernel+bounces-4359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CAFB21C21917 for ; Mon, 18 Dec 2023 20:33:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DB2354650; Mon, 18 Dec 2023 20:33:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="aAaNF9Gx" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 488511DA27; Mon, 18 Dec 2023 20:33:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 334CAC433C8; Mon, 18 Dec 2023 20:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702931626; bh=1boN5Sa2fUXDliSwKANgC1UGa1HVdAijXd4ulUQ0DyU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aAaNF9Gx2Igc9pGydY/HVX8/niCAp/y8J6soYiRlBqHvz6ef3trhhtli1TY5Bzixi r6AnWQjNFJM22dYsi5hAK6S8kRQkGmthuXOk5SIU2ijj3crz9aQLKcwb/KshhymRgC 4cQPUkKDO4yVthjmRJdnG+hWJ7XPELNqR4uz11fU= Date: Mon, 18 Dec 2023 21:33:43 +0100 From: Greg Kroah-Hartman To: Marco Pagani Cc: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org Subject: Re: [RFC PATCH v3 2/2] fpga: set owner of fpga_manager_ops for existing low-level modules Message-ID: <2023121829-zealous-prissy-99cc@gregkh> References: <20231218202809.84253-1-marpagan@redhat.com> <20231218202809.84253-3-marpagan@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231218202809.84253-3-marpagan@redhat.com> On Mon, Dec 18, 2023 at 09:28:09PM +0100, Marco Pagani wrote: > This patch tentatively set the owner field of fpga_manager_ops to > THIS_MODULE for existing fpga manager low-level control modules. > > Signed-off-by: Marco Pagani > --- > drivers/fpga/altera-cvp.c | 1 + > drivers/fpga/altera-pr-ip-core.c | 1 + > drivers/fpga/altera-ps-spi.c | 1 + > drivers/fpga/dfl-fme-mgr.c | 1 + > drivers/fpga/ice40-spi.c | 1 + > drivers/fpga/lattice-sysconfig.c | 1 + > drivers/fpga/machxo2-spi.c | 1 + > drivers/fpga/microchip-spi.c | 1 + > drivers/fpga/socfpga-a10.c | 1 + > drivers/fpga/socfpga.c | 1 + > drivers/fpga/stratix10-soc.c | 1 + > drivers/fpga/tests/fpga-mgr-test.c | 1 + > drivers/fpga/tests/fpga-region-test.c | 1 + > drivers/fpga/ts73xx-fpga.c | 1 + > drivers/fpga/versal-fpga.c | 1 + > drivers/fpga/xilinx-spi.c | 1 + > drivers/fpga/zynq-fpga.c | 1 + > drivers/fpga/zynqmp-fpga.c | 1 + > 18 files changed, 18 insertions(+) > > diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c > index 4ffb9da537d8..aeb913547dd8 100644 > --- a/drivers/fpga/altera-cvp.c > +++ b/drivers/fpga/altera-cvp.c > @@ -520,6 +520,7 @@ static const struct fpga_manager_ops altera_cvp_ops = { > .write_init = altera_cvp_write_init, > .write = altera_cvp_write, > .write_complete = altera_cvp_write_complete, > + .owner = THIS_MODULE, Note, this is not how to do this, force the compiler to set this for you automatically, otherwise everyone will always forget to do it. Look at how functions like usb_register_driver() works. Also, are you _sure_ that you need a module owner in this structure? I still don't know why... thanks, greg k-h