Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8621511rwb; Thu, 24 Nov 2022 01:58:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zKXET/SBjyJDqwJGigGYoXmvrxCwwou00tP1hHKG04H9JagYY3//tFo+l+CEw3qDb9l2d X-Received: by 2002:a17:903:3292:b0:188:ec14:e3a3 with SMTP id jh18-20020a170903329200b00188ec14e3a3mr12437302plb.154.1669283895947; Thu, 24 Nov 2022 01:58:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669283895; cv=none; d=google.com; s=arc-20160816; b=Y+Ku7z8n6GLIt9eE9llGPu560SkeCpZhqAu8ZPw7NNC5irM/lJvrzqnHLUxFzMox1v IGHa6hLo6iinRHyoXH4Ba15ax+5Oy0cC886QuDFvjByKLuSjWwGdyFrl8AKOqonyb53w vK0OjSmZrSWqU4NKoCLMpOHxeDrh+kQsRpZagbhwykA/c8yPTLO3cpRtc1uKceKlZL57 FqAsCQrCjRhHgvm/373a+7xFz7wrfNwTiyqlGOomNZ3X105zOhLSfoxWgRFkQcpJdvjB 9Mc3lenzf2GQkhNPQLdQkFDi/bfXnq4E0TIP2xqf8jkeAbPEo0KtdAi8mp4eVa4TA1GC h30Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wsQRThLlbccZrJZvbPoJQTj1QE08PMaYf1MzGwUSMRs=; b=N7/PjqPu2cNfYVHWujQ0cJ2Cae6lojl+13q/A3Gi/b+KLrnVS1b0+lqQjYWVz72hWh FgFyJ05Tiuv1oyHfmv1lYsHI4ODxbsjuOSLfrh7Je8+pviK7cVq/YstgWFLYNspO4c+3 oIVNwE0etkyHQXwyKYYlWBIc4YpD5bd1TKhvwHaPC9xzr4gy8CdwkkkWT/fOQuz/8Dpg Nin/ax9YDGW+NChCAWoBWEDGMfXwHUtmt0mw/fxX5GTxbyXBkopIpWyBXyXRVPkIWVFn MR+f3pWeea7Lpj46DLECfEuYo4RJN0HOGQDwSrKloAhp1LiqIVPGrpDjVJ0TCENTLH7F eNhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=i5gjlt74; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj3-20020a17090b4f4300b001ed40b70436si910973pjb.155.2022.11.24.01.58.05; Thu, 24 Nov 2022 01:58:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=i5gjlt74; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbiKXJWp (ORCPT + 87 others); Thu, 24 Nov 2022 04:22:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiKXJWo (ORCPT ); Thu, 24 Nov 2022 04:22:44 -0500 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A055413E12 for ; Thu, 24 Nov 2022 01:22:42 -0800 (PST) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AO7sBjC004512; Thu, 24 Nov 2022 03:22:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=wsQRThLlbccZrJZvbPoJQTj1QE08PMaYf1MzGwUSMRs=; b=i5gjlt74FrlTQbWhuAAPG3dJqgx3eK04h7TQlp/bjl8NA4f1QKJ8Ykj2IuygpBH7WJ2r sapLXTgMk6fy2e3/bo55WcuUyPf/04Yit3K8coqNyAWRAqqCruxMvkTYIguPW9fcxJDU QzhjkjRs+lw5/dfmcOO6Kwqdg/oLR24aHU6H6GoNk8vBIbT6q4FlTmGzzS4k3QmlTR8P 6yae4ieGttCq7NphI5bG1IaMjJhuUr+GhDN20OBNKXBSkkf4BivUzPObd/A048U4EAjK gaIo0p0t7uZqYAdThtKDwFsyhTQxQ+OWJ2bwwKDIB5HAVeiVv4czWpxYJaF5hGVd8WJN qQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3kxwe6wygd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Nov 2022 03:22:33 -0600 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Thu, 24 Nov 2022 03:22:31 -0600 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.20 via Frontend Transport; Thu, 24 Nov 2022 03:22:31 -0600 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A87282BA; Thu, 24 Nov 2022 09:22:31 +0000 (UTC) Date: Thu, 24 Nov 2022 09:22:31 +0000 From: Charles Keepax To: Vinod Koul CC: , , , , , Subject: Re: [PATCH v3 2/4] soundwire: Provide build stubs for common functions Message-ID: <20221124092231.GD105268@ediswmail.ad.cirrus.com> References: <20221121141406.3840561-1-ckeepax@opensource.cirrus.com> <20221121141406.3840561-3-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: iKGQYZSxFjDxzItSCcsTmehsj3BpSXOI X-Proofpoint-GUID: iKGQYZSxFjDxzItSCcsTmehsj3BpSXOI X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 24, 2022 at 10:21:32AM +0530, Vinod Koul wrote: > On 21-11-22, 14:14, Charles Keepax wrote: > > Provide stub functions when CONFIG_SOUNDWIRE is not set for functions > > that are quite likely to be used from common code on devices supporting > > multiple control buses. > > > > Reviewed-by: Pierre-Louis Bossart > > Signed-off-by: Charles Keepax > > --- > > +static inline int sdw_stream_add_slave(struct sdw_slave *slave, > > + struct sdw_stream_config *stream_config, > > + struct sdw_port_config *port_config, > > + unsigned int num_ports, > > + struct sdw_stream_runtime *stream) > > +{ > > + return 0; > > Should this and other here not return error...? Indicating sdw is not > available..? Silently ignoring may not be very helpful in debugging > Yeah I was a little unsure which way to go on that, in the end I opted for returning zero as it was more likely code would get optimised out. But I am happy to switch to returning an error, it would as you say making debugging misconfigurations easier. -ENOSYS seems kinda reasonable I think. Thanks, Charles