Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp985342rdb; Fri, 2 Feb 2024 09:46:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoVMwtPejyG7m8okYty8CZdbR/epxw7yqkdBizlbl0Pn2btWdxv9WR1xLpQB1I4Lj82dF+ X-Received: by 2002:a05:620a:40d5:b0:785:52f6:6a1 with SMTP id g21-20020a05620a40d500b0078552f606a1mr3648935qko.8.1706895962607; Fri, 02 Feb 2024 09:46:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706895962; cv=pass; d=google.com; s=arc-20160816; b=niBXRp0zqgCD+q/05FhnjdcLcoDoGMr3wMRTeHFurNg4frrP17ew6mqczpCq76qXA7 zWZOVyQwote76FD3ZY30WkAhdoEe8X31nxVu17o3fmOdnc2BSp0N7vS+h0O0iwmwITFY HgA/N5EtmfXI0NUIJYa1SKxjjYTDI6n5EBKhdPVRNJcbe2TPUNxTRz/MHexfv/E9oSvI xPBjlF1X0zH/5fiirUGOYKyOSBhKDWAdg/32bF5bp2XQCdu++HISHk+/ks7PR31uT0fY xby4Fppi2515eJyfc5keJfsHn0LFQOsWjCHnot1MxKTCHABpnZPuBAIl/Nw+jfk1cYYz m6DA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=++pep7UK0OfxTpG5wffeR3Nq4MugK8U0/QV/c/5dIwY=; fh=O1lRmchJIkhSBrRtEMUEG5M/y/XGjVtfbgbFmZ7OkOk=; b=kA8kXeEGOmdeBH/6JiUjNrPJUMAGjk0xLhrRyoArsCDYe1ZuNe1XYaW4JU1hInk9tX cvy5XQfUBH1AExkWM2kQod0+1aeGmbRR9bVThRusTiNyV7wuARbO/A2mp9tUUfrBNnWB R9mUMMMLd+o+eq2IUoV/8eDd4ubT3Zp8/Sp3CW93tW942+bew2+78lOUwbSD2Dsaew/q 8pLitgYmeWwAqZDfG/utQmdkIeTkHjkIJQquOGc0J0H1R9dVhjv/ZAtKrKEJStofrTW3 0rJtKcvUD7qYb8kpPHebTntX17bFKb1N1hB8w8BdZ0Gck2tmM6E4TsosKCJAoVVqQCm8 Hvhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aV71RMNi; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCVgHM315QcxtBaG9yQgJIEg+8cWzsFo0lXjGVgvUcKu0wACLWRXPBZdbBr0NoOGip892dvc+W1YCVQAGkV7LjBcbkY1yoeH1XGb/4jDZA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z2-20020ae9e602000000b00785158d90f4si2051442qkf.622.2024.02.02.09.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 09:46:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50259-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=@redhat.com header.s=mimecast20190719 header.b=aV71RMNi; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 4C1F31C26EA0 for ; Fri, 2 Feb 2024 17:45:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C64B14AD0F; Fri, 2 Feb 2024 17:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aV71RMNi" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9A12414A4DD for ; Fri, 2 Feb 2024 17:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706895848; cv=none; b=gfAoPzMjT8Ww6tuXyWbYaouJKQ3+Uea5id1qj13Xw8NdP1b1UKoDvWRckPJ2jn32+GUfl9FC2MxMrkOkjlWw9ukwJebbV++NSxAVB+EUmswGoToeDGRSex8i7Rrzjr/Zape6slEfIv4kzqbdADy3sfczEoYmLcCLe5hhXL0Rqv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706895848; c=relaxed/simple; bh=6/qPdGRGqcwv3m1KSfVw8PW50DkgRWx8evfvr1L5p10=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sufC5MEf5SINsp1CeQPx3TsO4WEvObQGtYiG8LRgV5xZBM9KbZgmLCU2D1GMFEPi2WasQ0OPxzWbqhlxTES9YLr+mB5rbOHZa+/Tqj8o6KgzEajv/2B1hMVs008dyh4NVN+v6cdmD4o+KwC/HV9FpkwIzWu4FiGB4G2od6oyEU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=aV71RMNi; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706895845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=++pep7UK0OfxTpG5wffeR3Nq4MugK8U0/QV/c/5dIwY=; b=aV71RMNiZUj+kCGWnivmY0aHfbM4P/ceON6eNjcAZ0HgrZzMTHFwXKa7/I7MlTnFitux7E A6Zfe8cWOJ9VjaReoGJVz46MtCofTzmpjbW7bxpVeIZKvSS01EkdCVjL8TwPVFfaVRNgvk cn7N6FYXFGn5F1QYsZ/wPSfu+LIaP+o= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-251-Q6ONBlDTOq6Zz-CyVd-SuQ-1; Fri, 02 Feb 2024 12:44:04 -0500 X-MC-Unique: Q6ONBlDTOq6Zz-CyVd-SuQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-33b16845d12so826097f8f.0 for ; Fri, 02 Feb 2024 09:44:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706895843; x=1707500643; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=++pep7UK0OfxTpG5wffeR3Nq4MugK8U0/QV/c/5dIwY=; b=crVCpKpl7SYQnPSTc7x3kvXspdILzumV05V7EbCtoaVPYt0D9ccmq7BQOWYqap90dY gMr91Kc7RpRym1xlZZdVUQIW2zJ5cl37nGTloLrHi84CEPVzc5EQHABs/0WGlAhLsiXP xkxOrG9CawB39AwxIx74ag/DkvzsdS/ji9X6rx/AtiIAQV+O8VhXfiEGkpnHTGvF2UAI bRiqwDLiG20xFn6Dz3lXd4btArWaaovbU+h0WDvUnyWlKaQh8G+775iJr2kGi8cCsDt1 fkA2gDXA7Gas5ZR/ZIa0Roqc/DmqkffdQuKfE1RxdOyfrsN5UpoOgESFyoozSGsX7LqE VBTA== X-Gm-Message-State: AOJu0YwnQtrYUgZXxoXXysiloeahmNOZw1xPGzEWXpMMBOqcGTAENt1Y NJVsAVLaMvbQR8qe9C1Xbx/aIqRsqiyVHe8RzUv14jf7N8gcSLor0czxgKGHz+WLPsX+9t9vgNk CSPQuleC7564o1FeMggg6sImU5+NhnuQuX7l/wupFEgvTto7pwLf8h0HjlvVR X-Received: by 2002:a5d:59aa:0:b0:33b:1a42:cd04 with SMTP id p10-20020a5d59aa000000b0033b1a42cd04mr3770936wrr.15.1706895843235; Fri, 02 Feb 2024 09:44:03 -0800 (PST) X-Received: by 2002:a5d:59aa:0:b0:33b:1a42:cd04 with SMTP id p10-20020a5d59aa000000b0033b1a42cd04mr3770925wrr.15.1706895842897; Fri, 02 Feb 2024 09:44:02 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVPe9GCk+5shgZ3WfE9iMyubLBQrBBIRioAzdNByGofbVJp+KGEo1ZlaWyt3SSmxTOoE160snjMhdcV678U5RUuTYsIBNb6TnLyWT2JCdTJucFL6CWxtE7o/Nt3lypkdkcAlGVbu5LCAxKxwdefpNF+TFgdu2IKKYXOevvHR7t7TDgsFztkrAl9N38yHePVL9aaofnqNw1bAbBxNePcincnt8xxCpNJxk1w5BfK+Js+25FwSrNu42sLzw70tL348kgHrV1sF5oR1ICSfxDeUjT4AxbZVvEZ5wG8w5UsqP/lgvM0Xjy6E4cU+JmOmFrQiXRMiiXPISLCWkScQnHje4C/AABC Received: from [192.168.9.34] (net-2-34-24-75.cust.vodafonedsl.it. [2.34.24.75]) by smtp.gmail.com with ESMTPSA id h18-20020a05600c351200b0040faf3df118sm526056wmq.32.2024.02.02.09.44.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 09:44:02 -0800 (PST) Message-ID: <0720eb91-72f9-4781-8558-8a1b0a3691c2@redhat.com> Date: Fri, 2 Feb 2024 18:44:01 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v5 1/1] fpga: add an owner and use it to take the low-level module's refcount Content-Language: en-US To: Xu Yilun Cc: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , Jonathan Corbet , Greg Kroah-Hartman , Alan Tull , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fpga@vger.kernel.org References: <20240111160242.149265-1-marpagan@redhat.com> <20240111160242.149265-2-marpagan@redhat.com> From: Marco Pagani In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-01-30 05:31, Xu Yilun wrote: >> +#define fpga_mgr_register_full(parent, info) \ >> + __fpga_mgr_register_full(parent, info, THIS_MODULE) >> struct fpga_manager * >> -fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info); >> +__fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info, >> + struct module *owner); >> >> +#define fpga_mgr_register(parent, name, mops, priv) \ >> + __fpga_mgr_register(parent, name, mops, priv, THIS_MODULE) >> struct fpga_manager * >> -fpga_mgr_register(struct device *parent, const char *name, >> - const struct fpga_manager_ops *mops, void *priv); >> +__fpga_mgr_register(struct device *parent, const char *name, >> + const struct fpga_manager_ops *mops, void *priv, struct module *owner); >> + >> void fpga_mgr_unregister(struct fpga_manager *mgr); >> >> +#define devm_fpga_mgr_register_full(parent, info) \ >> + __devm_fpga_mgr_register_full(parent, info, THIS_MODULE) >> struct fpga_manager * >> -devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info); >> +__devm_fpga_mgr_register_full(struct device *parent, const struct fpga_manager_info *info, >> + struct module *owner); > > Add a line here. I can do it myself if you agree. Sure, that is fine by me. I also spotted a typo in the commit log body (in taken -> is taken). Do you want me to send a v6, or do you prefer to fix that in place? > > There is still a RFC prefix for this patch. Are you ready to get it merged? > If yes, Acked-by: Xu Yilun I'm ready for the patch to be merged. However, I recently sent an RFC to propose a safer implementation of try_module_get() that would simplify the code and may also benefit other subsystems. What do you think? https://lore.kernel.org/linux-modules/20240130193614.49772-1-marpagan@redhat.com/ > Next time if you think patches are ready for serious review and merge, drop > the RFC prefix. That avoids an extra query. Okay, I'll do it like that next time. Thanks, Marco