From patchwork Sat Jul 12 23:47:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 4540291 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7027C9F37C for ; Sat, 12 Jul 2014 23:47:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD2032018B for ; Sat, 12 Jul 2014 23:47:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B48652017A for ; Sat, 12 Jul 2014 23:47:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 639DC6E392; Sat, 12 Jul 2014 16:47:30 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx-out-2.rwth-aachen.de (mx-out-2.rwth-aachen.de [134.130.5.187]) by gabe.freedesktop.org (Postfix) with ESMTP id F16346E395 for ; Sat, 12 Jul 2014 16:47:27 -0700 (PDT) X-IronPort-AV: E=Sophos;i="5.01,651,1400018400"; d="scan'208";a="251774398" Received: from hub1.rwth-ad.de (HELO mail.rwth-aachen.de) ([134.130.26.142]) by mx-2.rz.rwth-aachen.de with ESMTP; 13 Jul 2014 01:47:25 +0200 Received: from appserver.fset.rwth-aachen.de (137.226.172.40) by mail.rwth-aachen.de (134.130.26.142) with Microsoft SMTP Server (TLS) id 14.3.181.6; Sun, 13 Jul 2014 01:47:25 +0200 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: Subject: [PATCH] drm/radeon/audio: break out of loops once we match connector Date: Sun, 13 Jul 2014 01:47:15 +0200 Message-ID: <1405208836-14854-2-git-send-email-stefan.bruens@rwth-aachen.de> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1405208836-14854-1-git-send-email-stefan.bruens@rwth-aachen.de> References: <1405208836-14854-1-git-send-email-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 X-PMWin-Version: 3.1.1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No need to continue with the loops once we've matched the appropriate connector. See commit 8a992ee14551eae53fd3ab6c2dc8e06ba6fff174 Signed-off-by: Stefan BrĂ¼ns --- drivers/gpu/drm/radeon/dce6_afmt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c index 2b14506..8a76180 100644 --- a/drivers/gpu/drm/radeon/dce6_afmt.c +++ b/drivers/gpu/drm/radeon/dce6_afmt.c @@ -164,8 +164,10 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder) offset = dig->afmt->pin->offset; list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { - if (connector->encoder == encoder) + if (connector->encoder == encoder) { radeon_connector = to_radeon_connector(connector); + break; + } } if (!radeon_connector) { @@ -225,8 +227,10 @@ void dce6_afmt_write_sad_regs(struct drm_encoder *encoder) offset = dig->afmt->pin->offset; list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { - if (connector->encoder == encoder) + if (connector->encoder == encoder) { radeon_connector = to_radeon_connector(connector); + break; + } } if (!radeon_connector) {