Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11444167ybi; Thu, 25 Jul 2019 16:42:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBD6q8YSfXjYLk0ausnL1T+FYxyC2hwtDD1d6JLegqPSaP9qfu+fcrPKZh7znXgjzqJpfI X-Received: by 2002:a17:902:e30d:: with SMTP id cg13mr92924996plb.173.1564098169053; Thu, 25 Jul 2019 16:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564098169; cv=none; d=google.com; s=arc-20160816; b=bR5tJbuef+meXhTI/OIX7iMtiLMEXGKryEHVvBtdjzU232FMhgw2Sr3xqiqu2/QCEz fXldCo4SQzsuLj8zf7+22KreJZFiWtEkrVlJoR16zs1auGNyMk/bluEpBVwqEibcReDL r6f57C5NmpzR+QN6JwjD4PX3yZJOzMUPOfKSxUsu/J5c3smJb2BWUryxY5h+2QLfShnc XjEiQ03fdj4NJCse4oG9oTtXrIJ9fKusaDIFJYDSmIppIzxSaMJyUFM73eSE4qfjSbOw krIQyRz2/8wiqrxo0d6Z4Plwdg8fPtmc6Ldw5fdGnqx34Z9vSi0yNEF5/7i9BRsYO1Qx sVOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nVl4Kr5qwK0I/pmBmQP6BUcOBR36HdyT2fhddYMBuKw=; b=WZM3XaJ4ApqzBtRrxyt7t5vGCwlO2f7Y/lrEArb0PyFGmVu9lVjiGut0/M6xGzKN33 jra4u3Hvc5+cSsNz2zcVGCfmOJNql59ABcJLJTYxKF50de2h++vmYz+iP+I0S1kCURE9 kUIPcZNYr9G/y0U237VDsZK8ZKKrHNHHPf94q2oSpkL92V0FVPxiqEBW3fjZaTbqi+D4 pnJ1peG9Z2qWG7NI/UrJ2cAFXw28oB4TcWoraEnyBNh8RSyLycMSsJejI48vG/2vC21s XxZ7c2wpEhnGq7F/y46j89VIMIca+DfnMlnO1PQb/eBVCXbU8VOSTvb3ou9sNSnpGoM7 GwLw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u46si18635566pgn.578.2019.07.25.16.42.34; Thu, 25 Jul 2019 16:42:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727373AbfGYXla (ORCPT + 99 others); Thu, 25 Jul 2019 19:41:30 -0400 Received: from mga06.intel.com ([134.134.136.31]:51808 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727300AbfGYXl1 (ORCPT ); Thu, 25 Jul 2019 19:41:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 16:41:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="369874729" Received: from amrutaku-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.230.75]) by fmsmga006.fm.intel.com with ESMTP; 25 Jul 2019 16:41:25 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Pierre-Louis Bossart , Sanyog Kale Subject: [RFC PATCH 18/40] soundwire: bus: split handling of Device0 events Date: Thu, 25 Jul 2019 18:40:10 -0500 Message-Id: <20190725234032.21152-19-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Assigning a device number to a Slave will result in additional events when it reports its status in a PING frame. There is no point in dealing with all the other devices in a loop, this can be done when a non-device0 event happens. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 0a45dc5713df..bca378806d00 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -985,6 +985,11 @@ int sdw_handle_slave_status(struct sdw_bus *bus, ret = sdw_program_device_num(bus); if (ret) dev_err(bus->dev, "Slave attach failed: %d\n", ret); + /* + * programming a device number will have side effects, + * so we deal with other devices at a later time + */ + return ret; } /* Continue to check other slave statuses */ -- 2.20.1