Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp749657ybh; Sat, 3 Aug 2019 09:02:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwarQRKX7ffiIidCYsnVTrkAv2UqrWtvzXGhygB2Dwz1YytOIFPjzARQGH/kDor5xgEqt+a X-Received: by 2002:a63:b10f:: with SMTP id r15mr59029524pgf.230.1564848133841; Sat, 03 Aug 2019 09:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564848133; cv=none; d=google.com; s=arc-20160816; b=SScZP2YBkrlRbX80HApmHCqJ6QIJki7KP3xBl6i8z8fLaKSAYeGktMhml+2PLM2vcw quWfVCBbgAB9KkO3RkoCah6ja3TqJmFQu2gek5Mzxr4D9YQcqCLyudDlQyCWxtJUCJjA d8CxYch4jfG4DI1MMh2/UnKtwO5wrSa8TKTn58/cu7y16nD6tP9ElcImuANx6JC8DY0y RQ6wNUz3vo9pMN2opzAjPjAN6/S1XQJAldFV4otJJz39hRasyFTcIWIVcuoESDO/Jac5 yoDBt3OwDGjImoR60EQCGEsPwDUN7EpMsalq9OspDJc3oFsVgKAZ5QHIaZTDINdF0sBR TKRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wUxgX0YdN/+XbOWCJg9+CRO91zGqFJx2/5fWNF5aTDw=; b=kWTOn315CptchojSaVaARmO7Q4uUYJTuy8LkCfNGqCEEnRmsFtF56s/YItvLypGSvr dDeZ/mu7pVH5oGfsSqGHz8EHVeVOWmcdUNHqv89k/dc0ZfNUBXtIXoD4E8+wexm3HTj9 i8bhRB5a87W0BDkP9IyDtcuOGkA5m9q5AwVoSI8kKcFImq7jZM64I+aJLVVayoyEgRCi 898zaIrT5ioplZbQ9n8ZApi1eAaguWWUDDaQAHEqqhysYG2l+MIHq9a2KWSbSJO3cApb 5gCT3ZvCG+G57LTsJ5ojAbcFMedbGbwUiypa82D0+PzwXMKgOQeuB+pHEjACSaObqpsj D1rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FZi0aW7h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si38689099pld.418.2019.08.03.09.01.59; Sat, 03 Aug 2019 09:02:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FZi0aW7h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404153AbfHBRGF (ORCPT + 99 others); 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