From patchwork Thu Jul 6 14:27:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Pagani X-Patchwork-Id: 13303788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32377EB64D9 for ; Thu, 6 Jul 2023 14:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232477AbjGFO3C (ORCPT ); Thu, 6 Jul 2023 10:29:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232308AbjGFO3B (ORCPT ); Thu, 6 Jul 2023 10:29:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFD231732 for ; Thu, 6 Jul 2023 07:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688653696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bOMqxFOjwhp1sr/qCndFS1unAUJRkXxGEaTi00qWpSg=; b=GFRf2dq5sX8IZchEBfd6oVYj4Cl0BCpEmCRnUjTctZJCuvZ05nSGrRAZotvPWuP1cdRLvt IqMXsk+TTXjonUPNXgqf6Uil9LukxY6RQozJ29K4JzRCO8KDDjMNryNRRvcbpuJJTeohFy 11nhZ1UlChaXtPxMsZiTPGzxgkrOZBs= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-2YJki0tZMGGhXI5SmsXrVQ-1; Thu, 06 Jul 2023 10:28:15 -0400 X-MC-Unique: 2YJki0tZMGGhXI5SmsXrVQ-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-635325b87c9so9499116d6.1 for ; Thu, 06 Jul 2023 07:28:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688653694; x=1691245694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bOMqxFOjwhp1sr/qCndFS1unAUJRkXxGEaTi00qWpSg=; b=HD7/it/fGCde7/UFnymAo7g4vS5lsxNS9wVvV9Q4B36ihEoiK5NIffNcqd8Ch5VHru azEbg4jlPpoL3AEBymIPs3XHSdvm9wJ6ASJv83iPQPXzS1sqXrW6h3QmqKkGp/Madmqo AyVq9p5yQZTWWyh2ZGPLGrsaUSwshhjG1TaoWco0aInDVH4kiUjo9qTIz7axMkAy8ghv AVc3aBTq92egFh3nMR0ud4twU0GpK/FFaYY3tXqiUUAvePgnICdNQt9JN6Q24BahJt+r SgGBBHMNEpTeGUwlhq+J2ryPe2Uk0K7v00iyN6JIbm1xNS+Ts3Omdp6zBmnGZyjHOJ9Y XtrQ== X-Gm-Message-State: ABy/qLalWech/lb0kW8d6F1Vw640/9js8wl+W8tX8N4IBQTgcnUqeZnM /hrTMRH8WvkmbRQPlnmmX8+OC5bUhtvBHeAVuCXhqZ8GyMjkrICDyXpKNuaTPVeEd4ggnB9vODm qBm9DgVqI9+xfTQrq+Wv8JpgN0W6X X-Received: by 2002:a0c:cd09:0:b0:62d:fddb:1856 with SMTP id b9-20020a0ccd09000000b0062dfddb1856mr1632418qvm.43.1688653693404; Thu, 06 Jul 2023 07:28:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0y438reE5zjXcfDA7xUYnNrfLuDVwrxlHfu4NCHzXOuaLWtwVFf9gTuweECoZsXnlFMPAQg== X-Received: by 2002:a0c:cd09:0:b0:62d:fddb:1856 with SMTP id b9-20020a0ccd09000000b0062dfddb1856mr1632397qvm.43.1688653693121; Thu, 06 Jul 2023 07:28:13 -0700 (PDT) Received: from klayman.redhat.com (net-2-34-24-242.cust.vodafonedsl.it. [2.34.24.242]) by smtp.gmail.com with ESMTPSA id r21-20020a0cb295000000b0063631be090csm923526qve.125.2023.07.06.07.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 07:28:12 -0700 (PDT) From: Marco Pagani To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix Cc: Marco Pagani , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org Subject: [RFC PATCH 1/2] fpga: region: fix kernel-doc Date: Thu, 6 Jul 2023 16:27:54 +0200 Message-ID: <20230706142755.124879-2-marpagan@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706142755.124879-1-marpagan@redhat.com> References: <20230706142755.124879-1-marpagan@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org - Fix the following warnings issued by the kernel-doc script: drivers/fpga/fpga-region.c:46: warning: No description found for return value of 'fpga_region_get' drivers/fpga/fpga-region.c:97: warning: No description found for return value of 'fpga_region_program_fpga' drivers/fpga/fpga-region.c:295: warning: No description found for return value of 'fpga_region_init' - Remove the "and registers a reconfig notifier" part from the description of fpga_region_init() since it does not register an of_overlay notifier anymore. - Remove the outdated "if @np is not an FPGA Region" case from the return description of fpga_region_get() and replace it with the case when try_module_get() fails. Signed-off-by: Marco Pagani Reviewed-by: Randy Dunlap Acked-by: Xu Yilun --- drivers/fpga/fpga-region.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c index ccf6fdab1360..c9d065a6961b 100644 --- a/drivers/fpga/fpga-region.c +++ b/drivers/fpga/fpga-region.c @@ -38,9 +38,10 @@ EXPORT_SYMBOL_GPL(fpga_region_class_find); * * Caller should call fpga_region_put() when done with region. * - * Return fpga_region struct if successful. - * Return -EBUSY if someone already has a reference to the region. - * Return -ENODEV if @np is not an FPGA Region. + * Return: + * * fpga_region struct if successful. + * * -EBUSY if someone already has a reference to the region. + * * -ENODEV if can't take parent driver module refcount. */ static struct fpga_region *fpga_region_get(struct fpga_region *region) { @@ -91,7 +92,7 @@ static void fpga_region_put(struct fpga_region *region) * The caller will need to call fpga_bridges_put() before attempting to * reprogram the region. * - * Return 0 for success or negative error code. + * Return: 0 for success or negative error code. */ int fpga_region_program_fpga(struct fpga_region *region) { @@ -288,8 +289,9 @@ static void fpga_region_dev_release(struct device *dev) } /** - * fpga_region_init - init function for fpga_region class - * Creates the fpga_region class and registers a reconfig notifier. + * fpga_region_init - creates the fpga_region class. + * + * Return: 0 on success or ERR_PTR() on error. */ static int __init fpga_region_init(void) { From patchwork Thu Jul 6 14:27:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Pagani X-Patchwork-Id: 13303789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61174EB64D9 for ; Thu, 6 Jul 2023 14:30:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231979AbjGFO3K (ORCPT ); Thu, 6 Jul 2023 10:29:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232821AbjGFO3J (ORCPT ); Thu, 6 Jul 2023 10:29:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B372410F5 for ; Thu, 6 Jul 2023 07:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688653705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EiEyy1Zz1RJBfezlwrqTDqR5fyYdhtm3nESopN9SQeo=; b=D0XDS8yXcZurDxsqStmZ0yRA3GMX5I1D+Qw+qFqW7L3nOQAt4lzU0r3YrmXNZCHDSlZJzR BR2kbV1PV8b6nUP+nQkSkiDJWccRxdiZF6A7KR4hxCrncVhGmsz9KSEX9M6jsVBudxmeBm Y6BBwGTjwwH7f8bejblRAuueJ4KQRXo= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-39-tAoWLpnBMwKO22l0M0QTuQ-1; Thu, 06 Jul 2023 10:28:24 -0400 X-MC-Unique: tAoWLpnBMwKO22l0M0QTuQ-1 Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-440aef0aa27so60563137.3 for ; Thu, 06 Jul 2023 07:28:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688653704; x=1691245704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EiEyy1Zz1RJBfezlwrqTDqR5fyYdhtm3nESopN9SQeo=; b=PhJiW9QrBKkfwqM0zlHFevJVcPaQKl6LzhaPJWSxwsYXuDrGvb7GObAS+aqj+JKFBa oOthRgOalL0grPQobGEQ3+dNzMHpbP9es4Xn6IidEw/NhibebtUJPsRjvu667v/4A7g6 caqmvnUZ63oWNpXCLlV1MZNZ28q+3+KxcaI1VR3Vvu9ZS4KZH6ovwPxK8Cvxbt8RKPMd 0C1CmQFN0UxDoLve/T2srVd35B+Xnai10w48kHzwHDlhuKX1rCM6GZ5adRnC6T5X8C5a UuH/GRqVR/oVVaZh2ocKf66fIx2W2TXTWzOEdejmFnEoQ2Y4VHZn9bhSzN5Dqj0gU++U g5Aw== X-Gm-Message-State: ABy/qLZTyaKEAgBmJYY23Wz9QKhCtN5aephVR4kFrS1sSKqr8b17rkCw oflG7CB2jMIUVbEjJy+XP5aBr4WJV8d34PbZ+7wQoGLZ3WKrUl7YnmIbAhfns5nJsaTj5LRQ8u9 HpiH9oc5UjNmksEjxJjE+ X-Received: by 2002:a67:f78f:0:b0:443:6792:38a with SMTP id j15-20020a67f78f000000b004436792038amr666512vso.34.1688653704259; Thu, 06 Jul 2023 07:28:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHsmH9Qe69ZAE1m+BF0AQJAAi8Bt5cjaVucwH0fzIP7WDlWRFShHuVChIX7676PUfZkjjSNSQ== X-Received: by 2002:a67:f78f:0:b0:443:6792:38a with SMTP id j15-20020a67f78f000000b004436792038amr666502vso.34.1688653703990; Thu, 06 Jul 2023 07:28:23 -0700 (PDT) Received: from klayman.redhat.com (net-2-34-24-242.cust.vodafonedsl.it. [2.34.24.242]) by smtp.gmail.com with ESMTPSA id r21-20020a0cb295000000b0063631be090csm923526qve.125.2023.07.06.07.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 07:28:23 -0700 (PDT) From: Marco Pagani To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix Cc: Marco Pagani , linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org Subject: [RFC PATCH 2/2] fpga: bridge: fix kernel-doc Date: Thu, 6 Jul 2023 16:27:55 +0200 Message-ID: <20230706142755.124879-3-marpagan@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706142755.124879-1-marpagan@redhat.com> References: <20230706142755.124879-1-marpagan@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org Fix the following warnings issued by the kernel-doc script: drivers/fpga/fpga-bridge.c:99: warning: No description found for return value of 'of_fpga_bridge_get' drivers/fpga/fpga-bridge.c:163: warning: No description found for return value of 'fpga_bridges_enable' drivers/fpga/fpga-bridge.c:187: warning: No description found for return value of 'fpga_bridges_disable' drivers/fpga/fpga-bridge.c:238: warning: No description found for return value of 'of_fpga_bridge_get_to_list' drivers/fpga/fpga-bridge.c:268: warning: No description found for return value of 'fpga_bridge_get_to_list' - Extend the return description of of_fpga_bridge_get() to include the case when try_module_get() fails. Signed-off-by: Marco Pagani Reviewed-by: Randy Dunlap Acked-by: Xu Yilun --- drivers/fpga/fpga-bridge.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c index a6c25dee9cc1..0b76c67c50e5 100644 --- a/drivers/fpga/fpga-bridge.c +++ b/drivers/fpga/fpga-bridge.c @@ -87,12 +87,13 @@ static struct fpga_bridge *__fpga_bridge_get(struct device *dev, /** * of_fpga_bridge_get - get an exclusive reference to an fpga bridge * - * @np: node pointer of an FPGA bridge - * @info: fpga image specific information + * @np: node pointer of an FPGA bridge. + * @info: fpga image specific information. * - * Return fpga_bridge struct if successful. - * Return -EBUSY if someone already has a reference to the bridge. - * Return -ENODEV if @np is not an FPGA Bridge. + * Return: + * * fpga_bridge struct pointer if successful. + * * -EBUSY if someone already has a reference to the bridge. + * * -ENODEV if @np is not an FPGA Bridge or can't take parent driver refcount. */ struct fpga_bridge *of_fpga_bridge_get(struct device_node *np, struct fpga_image_info *info) @@ -155,9 +156,9 @@ EXPORT_SYMBOL_GPL(fpga_bridge_put); * fpga_bridges_enable - enable bridges in a list * @bridge_list: list of FPGA bridges * - * Enable each bridge in the list. If list is empty, do nothing. + * Enable each bridge in the list. If list is empty, do nothing. * - * Return 0 for success or empty bridge list; return error code otherwise. + * Return: 0 for success or empty bridge list or an error code otherwise. */ int fpga_bridges_enable(struct list_head *bridge_list) { @@ -179,9 +180,9 @@ EXPORT_SYMBOL_GPL(fpga_bridges_enable); * * @bridge_list: list of FPGA bridges * - * Disable each bridge in the list. If list is empty, do nothing. + * Disable each bridge in the list. If list is empty, do nothing. * - * Return 0 for success or empty bridge list; return error code otherwise. + * Return: 0 for success or empty bridge list or an error code otherwise. */ int fpga_bridges_disable(struct list_head *bridge_list) { @@ -230,7 +231,7 @@ EXPORT_SYMBOL_GPL(fpga_bridges_put); * * Get an exclusive reference to the bridge and it to the list. * - * Return 0 for success, error code from of_fpga_bridge_get() otherwise. + * Return: 0 for success, error code from of_fpga_bridge_get() otherwise. */ int of_fpga_bridge_get_to_list(struct device_node *np, struct fpga_image_info *info, @@ -260,7 +261,7 @@ EXPORT_SYMBOL_GPL(of_fpga_bridge_get_to_list); * * Get an exclusive reference to the bridge and it to the list. * - * Return 0 for success, error code from fpga_bridge_get() otherwise. + * Return: 0 for success, error code from fpga_bridge_get() otherwise. */ int fpga_bridge_get_to_list(struct device *dev, struct fpga_image_info *info,