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=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 7F572C433FF for ; Fri, 2 Aug 2019 17:06:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A3B62173E for ; Fri, 2 Aug 2019 17:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564765566; bh=zyFQjXyh3QHHzXm6u/m7sXjNjCXkfXoAXKp3IdMcjwk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=mT7FHqhR12pIMtr8UWWS87LX5odKAwN9Lbjg77QFNgQy6gnvYEN9hFNoMWS9mVWnK 2u3Rp2e1DNiJAxOJgCHVbswMSIpZVCK+GOjHmb208Lya43MbA+hlUHqOL8hUQbcYgj JCDnWPatjsRMfkGGTaEAjUziP/Of1BGeqZc1MVcQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404172AbfHBRGF (ORCPT ); Fri, 2 Aug 2019 13:06:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:36778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403954AbfHBRGE (ORCPT ); Fri, 2 Aug 2019 13:06:04 -0400 Received: from localhost (unknown [106.51.106.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0DE220644; Fri, 2 Aug 2019 17:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564765563; bh=zyFQjXyh3QHHzXm6u/m7sXjNjCXkfXoAXKp3IdMcjwk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FZi0aW7hN7atOO49xnVUT7RbRhGIanyxnc5VBG93AS4P3SJ0v/zGLXClQD8S2xJ6z PCJDaMZtexuQbRv6gDsfqWaxRMC7juiESX4QHIRZZO3uGxw5lu0D6fVOOTnDdmcOKn BbpDXMIhg1sJyGfUHJ+ocJxX/PhdGY9uzxb98+h0= Date: Fri, 2 Aug 2019 22:34:50 +0530 From: Vinod Koul To: Pierre-Louis Bossart Cc: Guennadi Liakhovetski , alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, slawomir.blauciak@intel.com, Sanyog Kale Subject: Re: [alsa-devel] [RFC PATCH 21/40] soundwire: export helpers to find row and column values Message-ID: <20190802170450.GY12733@vkoul-mobl.Dlink> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-22-pierre-louis.bossart@linux.intel.com> <20190726144325.GH16003@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26-07-19, 10:26, Pierre-Louis Bossart wrote: > > > On 7/26/19 9:43 AM, Guennadi Liakhovetski wrote: > > On Thu, Jul 25, 2019 at 06:40:13PM -0500, Pierre-Louis Bossart wrote: > > > Add a prefix for common tables and export 2 helpers to set the frame > > > shapes based on row/col values. > > > > > > Signed-off-by: Pierre-Louis Bossart > > > --- > > > drivers/soundwire/bus.h | 7 +++++-- > > > drivers/soundwire/stream.c | 14 ++++++++------ > > > 2 files changed, 13 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h > > > index 06ac4adb0074..c57c9c23f6ca 100644 > > > --- a/drivers/soundwire/bus.h > > > +++ b/drivers/soundwire/bus.h > > > @@ -73,8 +73,11 @@ struct sdw_msg { > > > #define SDW_DOUBLE_RATE_FACTOR 2 > > > -extern int rows[SDW_FRAME_ROWS]; > > > -extern int cols[SDW_FRAME_COLS]; > > > +extern int sdw_rows[SDW_FRAME_ROWS]; > > > +extern int sdw_cols[SDW_FRAME_COLS]; > > > > So these arrays actually have to be exported? In the current (5.2) sources they > > seem to only be used in stream.c, maybe make them static there? > > > > > + > > > +int sdw_find_row_index(int row); > > > +int sdw_find_col_index(int col); > > yes, they need to be exported, they are used by the allocation algorithm (in > Patch 27). > Others will need this for non-Intel solutions, it's really a part of the > standard definition and should be shared. > I can improve the commit message to make this explicit. Yes that would help! And also move it to before it's usage so it clear that it is used in next one. -- ~Vinod