Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp87051rdb; Thu, 21 Dec 2023 03:43:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWq0I3cnlX8W3I3jyZgT0ZZZSQpbeNYLfF25quTbIom2o84UfX8gWtNbEN4ggjCI5DhxJx X-Received: by 2002:a05:6e02:1bed:b0:35f:b7a3:5dc2 with SMTP id y13-20020a056e021bed00b0035fb7a35dc2mr7094749ilv.50.1703159014572; Thu, 21 Dec 2023 03:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703159014; cv=none; d=google.com; s=arc-20160816; b=LMpUCEUimO5+xas4hlgSNztkYTHCBJLcqBXL6z0zJJCt33wWc1mi0dyQSqcZT46fxJ 8lOIA7/PbKMzDjjP9LD1P7XjeK8YjTN5VHrukl49nDA3z2IgQDj9Ffx44cGRpH+3LEeF I+voBIMuamW05c2K81vOk0DfaawIabJvI+qzVgFwd8x0ga7Z76VKHMgO8P60XkfiU+ne cb2Ow1BkfTpan5jZH+yu69mxqK/txfvI/D04CkZlcgBzTBpnT14iUtG5fPTY7RNm7fo0 8ShhQ4ZehwLVQHMIl/XKBvXfj0NY7cbR3tGDH1Mj0pUv2iaKrK5YduVgMU7RzcFcg7/7 DpCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=5ckfHbZJFmTEToWPxrYdh/ObQfZICtz/wROl02i/yIA=; fh=tZiZt/Ooeh6jW77/lagalbpSfanXJIEJYIWMdG0FQ2g=; b=0961ByohccHFtWzBx9pzIYFbP3GIhUioIKRuLh/iqaea0bjO5B8mHA4Q0wiHpTkhDU in6w87nYS9UfKx/jvozYVo+/v39lVvFw+Xs/rhSenK0qVt5JUN2oJeEIxnm93MRLcAc5 arAFFO124DDq1lpeEHI7ufJXgmImoL95MYcz49O5xu4LCJAu2refk6qqvnepwITb3w77 bnnW9DaX3OfClr1wUnqVOlUksgbh0asR4/6BjK27elt+TJmDICW7LQ22wTHywtcl04Wf M/68QKDI/OdPXJKSM7sYIBnx2/YY2/4O7MUbKPvWnCQa9myFRC09ZOyyb8mFyb/qnZO5 kKHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=p0qj3aYa; spf=pass (google.com: domain of linux-kernel+bounces-8300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x5-20020a170902ea8500b001d3f295a51dsi1340634plb.566.2023.12.21.03.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 03:43:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=p0qj3aYa; spf=pass (google.com: domain of linux-kernel+bounces-8300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 922A8B21A4B for ; Thu, 21 Dec 2023 11:43:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 127356EB44; Thu, 21 Dec 2023 11:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="p0qj3aYa" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0003C6BB47; Thu, 21 Dec 2023 11:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703158989; bh=sBcVhTPX0KzScwCba4WSn6p7nU4vpZvw5YuVMBcWBiI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=p0qj3aYadHaObYFgJ2vmkd7YL0aKtYQn2VGHuLDLMP4mDbmINeIPiy6mK5vCbP+BY up+B1qook3kf5upNHyLxnVxl3sGgCsL6XnwFrfrk2252JvuYfRqtTr1YTzxzNvfH/F Ie2zci91+urTkSa/yIttc6HEDUQwU+mL2C49m2z6JzAxxEF4XWK59FymGvOgsZD1ax nmEmBZL0IiULWlC9gcH5is/mzRk/orFlm5eQc8N9IU4mxieYw6iXzplTbxtDq5D6ME CnJGLUES6MSBM20ns5PGXdkHfcfT8NyuRL/Dgwm13CRannr33c/lrLYqC8lcxwybcu DOw+IWzDDd0TA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5EF593781FFE; Thu, 21 Dec 2023 11:43:08 +0000 (UTC) Message-ID: Date: Thu, 21 Dec 2023 12:43:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/4] media: mediatek: vcodec: Only free buffer VA that is not NULL Content-Language: en-US To: Fei Shao , Hans Verkuil Cc: Andrew-CT Chen , Matthias Brugger , Mauro Carvalho Chehab , Nicolas Dufresne , Tiffany Lin , Xiaoyong Lu , Yunfei Dong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org References: <20231221092226.1395427-1-fshao@chromium.org> <20231221092226.1395427-4-fshao@chromium.org> From: AngeloGioacchino Del Regno In-Reply-To: <20231221092226.1395427-4-fshao@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 21/12/23 10:17, Fei Shao ha scritto: > In the MediaTek vcodec driver, while mtk_vcodec_mem_free() is mostly > called only when the buffer to free exists, there are some instances > that didn't do the check and triggered warnings in practice. > > We believe those checks were forgotten unintentionally. Add the checks > back to fix the warnings. > > Signed-off-by: Fei Shao Reviewed-by: AngeloGioacchino Del Regno