Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1074130rwl; Thu, 10 Aug 2023 06:11:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5l3i7ruSCjqWw3L6v9/wLZ7p2KDwsADuf0VuWwjw+uOpwS2HymnqvA21kMWW9tCW3ruQT X-Received: by 2002:a05:6a20:8f03:b0:137:7add:b7cd with SMTP id b3-20020a056a208f0300b001377addb7cdmr3521126pzk.17.1691673081223; Thu, 10 Aug 2023 06:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691673081; cv=none; d=google.com; s=arc-20160816; b=xcWXKGZK/waTuBqGQGnVTGcnpw6kcbSjYoXsdVO1ExMTGJbWHHwy+WK2mBMYEpnNiG WnuVgPlTFHZfpAucRLLjI4h1SDwqajQq8t1YdzaOWPtCgECDGasyfCyHIrg1Qm6IhI3i 9lSNuhCMZElHguF+RZwttiYH5+6T0O0zU12gonbmqofhmrNdmEXFtLV1XGr8XZhf60dh Kjtm6OqHQVMoW6mK1FWRtm/PqcxIYtnmeY00JXIFQi+tmbt3llL5T4TYLxbAZswLWrb4 aamlkoWrO1s0H1aag44WpbXZ0yVxlgg0KrRjw8Y2P97iyn8ux7BnrcuTvZxXBLFOiNOD HEtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NCTwr/RVCGoszSXddEUdfx1O0WifeiqiEgEcr9ECasQ=; fh=U78sclg0Y4Gxw/OVnaUghVFQGh/K/BlwQoZ5+9IUuFc=; b=QomLtluYXf6YRiJIFYGGuUsQrwQFspWkjBXNqYqquBtKxCIk0DUHp5P8NwQkSYcIlY nlV5MxfHWKu/kRJkKsQJYR/WAyj4Dt4l/td/hpMyZfli6mFZL8zOhBngEO9VU+ZoBhIE hJUNZ136QJqb6dB7AAd22c/qHTs9sTTyDr8RXBvwtACd0q7mqd7FXFQSKRz0TOlMjkSG IFDWizeGD1xYa1fiiDOCdNa6xrQsR2Kq0mJ3z8x6R0+hD3ylbXdWOBmR3B63D3CUnKqr DIMDMkDnNmi7K1+dx/NkWirCarWlcZUZKGH8zL4oEaTgHDgTxp/pGjJuHIvoeeP/bCzh OCMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IIHGWbSZ; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bz1-20020a056a02060100b00563e28e517fsi1702488pgb.195.2023.08.10.06.11.06; Thu, 10 Aug 2023 06:11:21 -0700 (PDT) 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=@linaro.org header.s=google header.b=IIHGWbSZ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235222AbjHJLdJ (ORCPT + 99 others); Thu, 10 Aug 2023 07:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235228AbjHJLdG (ORCPT ); Thu, 10 Aug 2023 07:33:06 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BDEB2694 for ; Thu, 10 Aug 2023 04:33:06 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3fe1fc8768aso7267455e9.1 for ; Thu, 10 Aug 2023 04:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691667185; x=1692271985; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NCTwr/RVCGoszSXddEUdfx1O0WifeiqiEgEcr9ECasQ=; b=IIHGWbSZ1ejCYiSRvqGh4bfzAois9X59DkIZVAKv14+kXyl2KDFmmEjo4vXZYjkw2k 0ZwchPRpqzPnvNH6rRdm1WH6fOyEtC7l4jFjGmzgrBhECAh68++mZU3ho8g7fos8hnlW 2yb1Y9A2aQCTlgx57GtTMuIjuzLlY1ZG9fTFI0spKWajE7tbDGESP/C3EsWLj9swEUzF T172l/DHuQAqfIuD277B3oDhJEh78nPSdVBoZtjHBAaB52Y1d9nmxoAqKxejmJRN/AcO eordFPLHl5hn9i7ulD5c3yGSJVwPIZxNGkn12WFvF5GLlM7GilhhFiPg8ikjZUKjsALt K+nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691667185; x=1692271985; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NCTwr/RVCGoszSXddEUdfx1O0WifeiqiEgEcr9ECasQ=; b=AnepmEeVDePjRluE25vrYjle5R3pOezLhM4hwzFTWEQr5VPjNKLsLle3YYccUvQbdM 4ecRkRAeF5SnyHODX6pBcceg5x85j0XIeOKZ/rcZvtFTDEmdVGp8aay2GeANg26ZZtTK wX13Hhd8vOOVWta2bBUbqwuLQjKhzkads4OF2BTUKCHPPdwxkGkjPotjLh49iis2gMII N+CpcQiy8ztUMNXQIruuFZL8hoAneRrB0q/FqDArif7UHq5zKWQfYhFfKrxhJ5aNyhTK Kjq9QvN4cmjFNj1d3Xaes21lSxRhS/kD4xb0up55Ex/vIviiCnE5BM17VPz3LTtnvKp/ dHVA== X-Gm-Message-State: AOJu0YxUbb9BM6Rh95q7OGo3Ju/Ypq4Hyi2BdGx9atiubamT2M7NdwE4 /dJ1Ih1C2/EYPvBOBW4+hbl7hQ== X-Received: by 2002:a5d:4683:0:b0:317:5182:7b55 with SMTP id u3-20020a5d4683000000b0031751827b55mr1925007wrq.42.1691667184827; Thu, 10 Aug 2023 04:33:04 -0700 (PDT) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id n11-20020a5d6b8b000000b0031417b0d338sm1868735wrx.87.2023.08.10.04.33.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Aug 2023 04:33:04 -0700 (PDT) Message-ID: Date: Thu, 10 Aug 2023 12:33:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2 4/4] venus: hfi_parser: Add check to keep the number of codecs within range Content-Language: en-US To: Vikash Garodia , stanimir.k.varbanov@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, hans.verkuil@cisco.com, tfiga@chromium.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <1691634304-2158-1-git-send-email-quic_vgarodia@quicinc.com> <1691634304-2158-5-git-send-email-quic_vgarodia@quicinc.com> From: Bryan O'Donoghue In-Reply-To: <1691634304-2158-5-git-send-email-quic_vgarodia@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 10/08/2023 03:25, Vikash Garodia wrote: > + if (hweight_long(core->dec_codecs) + hweight_long(core->enc_codecs) > MAX_CODEC_NUM) > + return; > + Shouldn't this be >= ? struct hfi_plat_caps caps[MAX_CODEC_NUM]; --- bod