From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A530C433E0 for ; Wed, 3 Feb 2021 23:08:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3174064E46 for ; Wed, 3 Feb 2021 23:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233309AbhBCXIX (ORCPT ); Wed, 3 Feb 2021 18:08:23 -0500 Received: from mga03.intel.com ([134.134.136.65]:57540 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233238AbhBCXHs (ORCPT ); Wed, 3 Feb 2021 18:07:48 -0500 IronPort-SDR: +yDlhbc5KBOGBe+u/pYF913N6n5SJ8K8kHC5/gkh0ntoIHQ2ZReedsv95LzgXfs9FBgKEVmEvB dpWUFhivaXww== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="181207547" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="181207547" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:06:52 -0800 IronPort-SDR: qQAPGiFMeJNym3pvMrqM1aqmddz4pgJC8vBaQgBuHjmX/nRG06wbDwyUFq8JXwcmOgAGoKgawt ieT53Z/xdWug== X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="396844148" Received: from rhweight-mobl2.amr.corp.intel.com (HELO [10.0.2.4]) ([10.212.187.111]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:06:52 -0800 Subject: Re: [PATCH v3 1/1] fpga: dfl: afu: harden port enable logic To: Tom Rix , mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: lgoncalv@redhat.com, yilun.xu@intel.com, hao.wu@intel.com, matthew.gerlach@intel.com References: <20210202230631.198950-1-russell.h.weight@intel.com> <15f90871-170c-3487-0f99-47cf54163bb7@redhat.com> From: Russ Weight Message-ID: <9e53d35b-b1b5-5f21-f771-63ce689dd67e@intel.com> Date: Wed, 3 Feb 2021 15:06:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <15f90871-170c-3487-0f99-47cf54163bb7@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/21 7:25 AM, Tom Rix wrote: > ..snip.. > > On 2/2/21 3:06 PM, Russ Weight wrote: >> diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl-afu.h >> index 576e94960086..e5020e2b1f3d 100644 >> --- a/drivers/fpga/dfl-afu.h >> +++ b/drivers/fpga/dfl-afu.h >> @@ -80,7 +80,7 @@ struct dfl_afu { >> }; >> >> /* hold pdata->lock when call __afu_port_enable/disable */ >> -void __afu_port_enable(struct platform_device *pdev); >> +int __afu_port_enable(struct platform_device *pdev); >> int __afu_port_disable(struct platform_device *pdev); >> > Should the '__' prefix be removed from __afu_port* ? > > This would make the function names consistent with the other decls The '__' prefix is used here to help highlight the fact that these functions go not manage the locking themselves and must be called while holding the port mutex. There are additional functions, such as__port_reset(), that are following this same convention. I think these are OK as they are. - Russ > > Tom > >> void afu_mmio_region_init(struct dfl_feature_platform_data *pdata);