From patchwork Fri Sep 11 10:09:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 7159181 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0977BBEEC1 for ; Fri, 11 Sep 2015 10:11:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38E202082B for ; Fri, 11 Sep 2015 10:11:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5564A20829 for ; Fri, 11 Sep 2015 10:11:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbbIKKL2 (ORCPT ); Fri, 11 Sep 2015 06:11:28 -0400 Received: from mga03.intel.com ([134.134.136.65]:28146 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365AbbIKKL1 (ORCPT ); Fri, 11 Sep 2015 06:11:27 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 11 Sep 2015 03:11:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,511,1437462000"; d="scan'208";a="766949622" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga001.jf.intel.com with ESMTP; 11 Sep 2015 03:11:03 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id E489C21088; Fri, 11 Sep 2015 13:11:00 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id DE8FF201EF; Fri, 11 Sep 2015 13:09:23 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, javier@osg.samsung.com, mchehab@osg.samsung.com, hverkuil@xs4all.nl Subject: [RFC 6/9] media: entity: Remove useless WARN_ON()'s Date: Fri, 11 Sep 2015 13:09:09 +0300 Message-Id: <1441966152-28444-7-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.0.231.g7484e3b In-Reply-To: <1441966152-28444-1-git-send-email-sakari.ailus@linux.intel.com> References: <1441966152-28444-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The checks for entity ID not reaching too high value the framework could not handle are now present in the entity registration. It's quite far-fetched this condition could happen inside the framework, so remove the WARN_ON()'s. Signed-off-by: Sakari Ailus --- drivers/media/media-entity.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index a4d6e1b..e4f0f4a 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -334,9 +334,6 @@ void media_entity_graph_walk_start(struct media_entity_graph *graph, graph->stack[graph->top].entity = NULL; media_entity_enum_init(graph->entities); - if (WARN_ON(entity->low_id >= MEDIA_ENTITY_MAX_LOW_ID)) - return; - media_entity_enum_set(graph->entities, entity); stack_push(graph, entity); } @@ -381,8 +378,6 @@ media_entity_graph_walk_next(struct media_entity_graph *graph) /* Get the entity in the other end of the link . */ next = media_entity_other(entity, link); - if (WARN_ON(entity->low_id >= MEDIA_ENTITY_MAX_LOW_ID)) - return NULL; /* Has the entity already been visited? */ if (media_entity_enum_test_and_set(graph->entities, next)) {