Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8642710rwb; Thu, 24 Nov 2022 02:17:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EJ2fpfNWm1CPUJhItWSZT5/MZCw2g8KL0diHAjjqxFo9o+WZ4Vzae3KIuQVpYgzdp0SE5 X-Received: by 2002:a63:f816:0:b0:477:c1a6:32bc with SMTP id n22-20020a63f816000000b00477c1a632bcmr4931750pgh.87.1669285041664; Thu, 24 Nov 2022 02:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285041; cv=none; d=google.com; s=arc-20160816; b=S1IcLJyJrDCKRF0ygrsO/np215VA4ULcml2ZSK7aP/1kJoG1RUdFXxPO1FCwX7FocQ WvaQ7yyVxKcuCxz48GhrARr6Rd3hE1baco/sBku7u3hce0XtUEfY1ELZqol7S5HYrXpn 1MSkoeYGaskUQ1I6YRiKkPOEQ1+yCb5sLpFaE0f+jeo9OvTXvpv7rDyVpAsns6/3ue1D AgCC3IbKuPrrRGXb2R1gdEcWdoxSWnYcA7b+qHEbCqoW+Q1jKP2jTnlAdEj+uAMZyjJw chwaulQM0cnK77YNdXwk+NDnEtqa6kKpMYE31vj8EBBNAfEDMyX5xhzE0FuCuWtXoZi8 todg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TSEa/r0TgPGfO0m/w9cT7pzhwH6zCBhytHAEXhxLtFc=; b=YIi10zCKDBEX0P8U8WKd00XdVByc/noVOga//ik2Gt6lDNUh2MZ7ZQYtli2AhmCx2n 3pmpzrcHj44XKfELfHmfIYIgronXjW7mYH5xbzn3GoEJ0Sk1F7tyZ3JL3+MO7Gc0x8GY lnoClM2SxElqgas04bzTOkKS42cbmpLKLdXIbW4rSp2L6+m9lzmscQDpeiRpAKjipd2r aDZX5p+wjvMNP+fDSsNKg5DftoW1oQQ/VFfj8LLU7NaGM5d+gl8SUDZqZD4SosZoFV0x tly4+WDcz4ZvfAPl1tP6U5BHR62cAKfRtKaLM9IvPAV2P1cZLVPE+3ewHUT4MDlIPIVG l12A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QKn+ulHb; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a62d40d000000b005725d4d6fcdsi644877pfh.205.2022.11.24.02.17.10; Thu, 24 Nov 2022 02:17:21 -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=@kernel.org header.s=k20201202 header.b=QKn+ulHb; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229776AbiKXJcK (ORCPT + 87 others); Thu, 24 Nov 2022 04:32:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiKXJcJ (ORCPT ); Thu, 24 Nov 2022 04:32:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AEDB122940 for ; Thu, 24 Nov 2022 01:32:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 196EFB82738 for ; Thu, 24 Nov 2022 09:32:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F5E1C433D6; Thu, 24 Nov 2022 09:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669282325; bh=J0NwZnjrS0O8MoDomCIMQw6ef/tSlF82d6RB1VnCFX8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QKn+ulHbsn84kkDCubdAUf8zD6eWCGO/Gsi60LsOFC1MobLEzGvp9tgjT4aNv9Ffq FZUxh/RFl/FbwABMtOTtWB7O/TrspsBd1xdNiu7lmQ8YZwQ13QWImQvVWxcJpkxXfY f0MUwP+1amUKzDkSHZG0clEsZhTBYVPTJk8TrYru/Av5F9IylMMtQPZYIfMWuC4xfZ XwmSbH/vFzjKr9BxLRHZjIkvNnZbk4Yp5jW57B5EP2It27fzh8jTneILp0/dtiVnAu YKToq5UGLrtUgXURLMU6BnqLyN1P8JgGJfvzZniQm9aKmtZP4K8tVL9PNdSuzaMrxW bhVN/JjDHcBUA== Date: Thu, 24 Nov 2022 15:02:01 +0530 From: Vinod Koul To: Charles Keepax Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: Re: [PATCH v3 2/4] soundwire: Provide build stubs for common functions Message-ID: References: <20221121141406.3840561-1-ckeepax@opensource.cirrus.com> <20221121141406.3840561-3-ckeepax@opensource.cirrus.com> <20221124092231.GD105268@ediswmail.ad.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221124092231.GD105268@ediswmail.ad.cirrus.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 24-11-22, 09:22, Charles Keepax wrote: > 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. Right, -ENOSYS seems to be apt here -- ~Vinod