From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932179AbcF2PqT (ORCPT ); Wed, 29 Jun 2016 11:46:19 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:36000 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbcF2PpR (ORCPT ); Wed, 29 Jun 2016 11:45:17 -0400 Subject: Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global To: Stuart Yoder , "gregkh@linuxfoundation.org" References: <1466631652-25731-1-git-send-email-stuart.yoder@nxp.com> <1466631652-25731-7-git-send-email-stuart.yoder@nxp.com> <5773D877.1040005@suse.com> Cc: "devel@driverdev.osuosl.org" , "agraf@suse.de" , "arnd@arndb.de" , Jose Rivera , "linux-kernel@vger.kernel.org" , Yang-Leo Li From: Matthias Brugger Message-ID: <5773E2E0.4050802@suse.com> Date: Wed, 29 Jun 2016 17:01:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/06/16 16:25, Stuart Yoder wrote: > > >> -----Original Message----- >> From: Matthias Brugger [mailto:mbrugger@suse.com] >> Sent: Wednesday, June 29, 2016 9:17 AM >> To: Stuart Yoder ; gregkh@linuxfoundation.org >> Cc: devel@driverdev.osuosl.org; agraf@suse.de; arnd@arndb.de; Jose Rivera ; >> linux-kernel@vger.kernel.org; Yang-Leo Li >> Subject: Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global >> >> On 22/06/16 23:40, Stuart Yoder wrote: >>> make fsl_mc_is_root_dprc() global so that the dprc driver >>> can use it >>> >>> Signed-off-by: Stuart Yoder >>> --- >>> drivers/staging/fsl-mc/bus/mc-bus.c | 28 +++++++++++++--------------- >>> drivers/staging/fsl-mc/include/mc.h | 2 ++ >>> 2 files changed, 15 insertions(+), 15 deletions(-) >>> >>> diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c >>> index e975adc..a49186e 100644 >>> --- a/drivers/staging/fsl-mc/bus/mc-bus.c >>> +++ b/drivers/staging/fsl-mc/bus/mc-bus.c >>> @@ -24,8 +24,6 @@ >>> >>> static struct kmem_cache *mc_dev_cache; >>> >>> -static bool fsl_mc_is_root_dprc(struct device *dev); >>> - >>> /** >>> * fsl_mc_bus_match - device to driver matching callback >>> * @dev: the MC object device structure to match against >>> @@ -247,19 +245,6 @@ static void fsl_mc_get_root_dprc(struct device *dev, >>> } >>> } >>> >>> -/** >>> - * fsl_mc_is_root_dprc - function to check if a given device is a root dprc >>> - */ >>> -static bool fsl_mc_is_root_dprc(struct device *dev) >>> -{ >>> - struct device *root_dprc_dev; >>> - >>> - fsl_mc_get_root_dprc(dev, &root_dprc_dev); >>> - if (!root_dprc_dev) >>> - return false; >>> - return dev == root_dprc_dev; >>> -} >>> - >>> static int get_dprc_attr(struct fsl_mc_io *mc_io, >>> int container_id, struct dprc_attributes *attr) >>> { >>> @@ -424,6 +409,19 @@ error_cleanup_regions: >>> } >>> >>> /** >>> + * fsl_mc_is_root_dprc - function to check if a given device is a root dprc >>> + */ >>> +bool fsl_mc_is_root_dprc(struct device *dev) >>> +{ >>> + struct device *root_dprc_dev; >>> + >>> + fsl_mc_get_root_dprc(dev, &root_dprc_dev); >>> + if (!root_dprc_dev) >>> + return false; >>> + return dev == root_dprc_dev; >>> +} >>> + >>> +/** >> >> Is there any reason why apart from deleting "static" you move >> fsl_mc_is_root to a different line? > > I moved it just to keep internal consistency inside the source file where all the > static functions were grouped together in the first part of the file, and public > functions were in the second part. > Ok, thanks for clarification. Reviewed-by: Matthias Brugger