Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp164159pxk; Tue, 1 Sep 2020 19:59:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOnj/zr8dQMAQ2wdb8kN5KcZ3AuL6J5LENqHu3ny9f+N/79t+owK2TP5gA3qKcW21YMO8k X-Received: by 2002:a17:906:2f02:: with SMTP id v2mr4047314eji.465.1599015561833; Tue, 01 Sep 2020 19:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599015561; cv=none; d=google.com; s=arc-20160816; b=ErOkqeGfovtaEXh8oIT6/SfZ9YyRTKwfabNMDa2QIRebjqi7StTp8TGI35rTVKKemS FdCnA0wkT0xgI4UZ94AY2zZjF+2nACQxAALwqgh5KY9Tml42ss4LxC1F3ZCfHpvqOgSh zl9yXuAO/c+GMH6WDwqc59fwkgUJaXWDPXzoInVFjZ36yC8VHyEmbaaceWmtknxvUzxL P20pi5UxAFwg88xZkS5j54LyFCxROpfDecaT346Z/f8YGMfFZcGWZBAVSeEOx5QHGIFQ im5ih2sRev13wh5hQeVJ/HDAjhB5s/jPYs0/oHmhIMem9FKKRgmHn7H6Ul1on2gyd/kN dEuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=1gDNbLszCZN99bJwB9iP/gqOB/R0k8ExiyNepIqXtPM=; b=MUChTQqW+WDRRWEI9Jh8OCPC5tnuwt/mady61XidAMGF8UcX9NcCup8I0Hy4Z0JRzX DuzdEKQAipqsxosugyIbo4tJ7EmpTqdqEuu8utaa+6FpQl64Pv903smHxsLmqSuxYr/g TJevZu1IqAtDKYSlWTzSbdLQyv6Pj+2ZNzPZV0hg+zxzNTCSHzTLzzGTMF1L3es9ZyCJ WPuvgIPcI9ozOVxU73Wzi8P7zWIEQmN/Qjc6TJDZ4/84hc6seY6XeoTOQfZKxnXiU+Wj CQXU6gmENfHPrd5TDuJWDfD2Th0UuljQrdRaaL4YDc7RI6581V7wBhRZpdBlC/ix/bJb g5eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si1651641edt.550.2020.09.01.19.58.58; Tue, 01 Sep 2020 19:59:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726922AbgIBC4a (ORCPT + 99 others); Tue, 1 Sep 2020 22:56:30 -0400 Received: from mga07.intel.com ([134.134.136.100]:49594 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbgIBC42 (ORCPT ); Tue, 1 Sep 2020 22:56:28 -0400 IronPort-SDR: YtR6V2f4o3jWdy6WRXoT24ry2NL3nU4/4PyZI9HjUtTLRQdcGuLcGILBXYmEN5SmRMfd8mDNV6 Axiquuno1bmQ== X-IronPort-AV: E=McAfee;i="6000,8403,9731"; a="221528365" X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="221528365" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:27 -0700 IronPort-SDR: 395dK8xsNWpapo9ogp8zrJZE5gWqVekiXkh9RJrSJ7vt9B314uPfiPkVgqs6X8cVmpXp/nFOca StZ349S1LlTw== X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="477457248" Received: from bard-ubuntu.sh.intel.com ([10.239.13.33]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:23 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: [PATCH 1/7] ASoC: soc-dai: clarify return value for get_sdw_stream() Date: Tue, 1 Sep 2020 23:02:34 +0800 Message-Id: <20200901150240.19288-2-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> References: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart Previous changes move to use ERR_PTR(-ENOTSUPP), but it's not clear what implementations can return in case of errors. Explicitly document that NULL is not a possible return value, only ERR_PTR with a negative error code is valid. Fixes: 308811a327c38 ('ASoC: soc-dai: return proper error for get_sdw_stream()') Cc: Srinivas Kandagatla Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/sound/soc-dai.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 776a60529e70..8b693dade9c6 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -471,7 +471,8 @@ static inline int snd_soc_dai_set_sdw_stream(struct snd_soc_dai *dai, * This routine only retrieves that was previously configured * with snd_soc_dai_get_sdw_stream() * - * Returns pointer to stream or -ENOTSUPP if callback is not supported; + * Returns pointer to stream or an ERR_PTR value, e.g. + * ERR_PTR(-ENOTSUPP) if callback is not supported; */ static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai, int direction) -- 2.17.1