From nobody Tue Feb 10 18:21:24 2026 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F2B2D062A for ; Wed, 3 Dec 2025 08:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764752143; cv=none; b=i4u1N+E+yfKQL8Ev42iL0pplN1M9R7h1O6Yva6qPMHYsPnAtiW9fDYpTt6FknvrXRxoI7j1y36wvsb2SlEvcuxvRR0dEwPXxdDr0Rx+ByX+MKz8GarZIJTWNd9lrmgHsSrYT5pl4nLLcRkO6x3IyI61pIf0pycC1DemP3iq0JS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764752143; c=relaxed/simple; bh=3oJz3ZltYDqpWr5+uCLuJCyHQnDQ/0WypPYIDHiOHFc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TbMsnK55xk+AgHPDJqEFicjPyrS7YzanTk/XK16rSXjDcSSEoMzykKIrhXDITPVJ+zUlrJUQyo5F0obR8hOJ44VFYOwTKPD11QPVC9JWTchLQp860XZ3SXTKUsC30lL4SfOOh+4pI2+t1CCTvJI9R0flalSUOkVEx+8DpIkS0rU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=HqlZFvJU; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="HqlZFvJU" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-37b97e59520so41880131fa.2 for ; Wed, 03 Dec 2025 00:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1764752139; x=1765356939; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=l8y22R6XWDK/GOldRzQWK9Q2C3Ir5yEJKiaGjpAlLmI=; b=HqlZFvJUMBtNMJAhJwVy7XovhNQjsZYMYnevf456rShaLAG89zUNxnBFi2AEt58EqA m59umu08WtramawEKQi6cUwIW33eeMbAps24VSl+RuJjhIBAa+wePg5dafBOxr2vBEK7 W6liiX9uwkAT5I+4CbUZ8aEAPCqJkXg4telYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764752139; x=1765356939; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=l8y22R6XWDK/GOldRzQWK9Q2C3Ir5yEJKiaGjpAlLmI=; b=f3QM7bZw6kX1VhMkdLM9T4xn+Md6Kx4SatxkbutY/zkGXKEu80vUiwwU/V642kOunv lly28W8gityDJMtWPARKXtuyxdj3jaj/2sqA3OPZhCX2K16RjahMppqKuxFUYtokPYJS ZKD7rSZIWqoRylsS0Lb1Mef0mEa0ZOuDcXGNtJK0Ug7jQnn52fC6uEWREZ2qflfx5xqH WOwQwUJ7HQd6E+WmwAv1swpVjRkBMR/98ZgBi/1yqaA/V5+LUpG95rQKRiko98Tc7t4I Li6szEMzGRdiKYlqrvaxCZD6wO2c2xCm4D+Kj6ZNw0Zg5YL0pc9WLinjm5iHr8S+Ofxj 7nZQ== X-Forwarded-Encrypted: i=1; AJvYcCXLW5vJSUGWJLV/4XyMAgrdLndVh1HgePtggw/2lpBFU+3L7yL+cwsWJQ+vd/KKOX2kHtfkto+OvbRxvss=@vger.kernel.org X-Gm-Message-State: AOJu0YwkC2bOFHG5Hl8UZdgj08sQrSmhoaUAAtikA8Q9R4Hz4xKp0hin mUyxSxVSy1gjy/6qq+h8jSeJPk6hwhpPaxTMxPOp7ufgtOgIo6X5p5YjAdjRQSMvybHazEvd/uS P0W0= X-Gm-Gg: ASbGncvJ/oWj7PRBdwhHt260/fztsW/COL4gfdrmirijrlUF12SxQS4StTRu094MGqs zxoDUH9Qmh4yABThqjn6p9LTuiaTAX4ZfxhBv7WyLy4zpPsXsUA2jJ4Hr47aQstj6fMrAqQhv6a QaOHrQXKrlddVUBPdToYrnZmtdNHdSLMI2cWf9sGpTIDT5KK2N3N1ibL1Ozn9Wi8qJ6ijPFcZ+K +9u/+wp7TSR9wsSOvT97L0YTq50RelEG8Ky4yKY7+8MKJNbIC32CuC3MDI/1y64oXfCVlikQRWm f4zWgEMINbQ3iUVF8P9e6Z7XxNlxZE8Ii7He1ReR+NFHwu2oDnhilhZc44Q4ZCgwMaSrxYpEbr1 MEG8tK9CvRdFGwyZuYBNOqcU96kPc6d1xK1blURizkh3mANySscXfnZeTTlxWJYURo/kF/PP+IU LJZhBK5GVSijOO9ESku/r+nTndI+rn0pm5iRVuPAn9k8X2ZFse2bEeQRjeU8TJL5CZeHTRrQ== X-Google-Smtp-Source: AGHT+IF3xsdoMGrgPPAVSpklnW3yTghz2fpZ17/ANQgtvfY6FupWoRh+Pdfp2OA8LBXT6KUdlKgBEA== X-Received: by 2002:a05:6512:3094:b0:595:831d:22e9 with SMTP id 2adb3069b0e04-597d3efd920mr696138e87.1.1764752139058; Wed, 03 Dec 2025 00:55:39 -0800 (PST) Received: from ribalda.c.googlers.com (165.173.228.35.bc.googleusercontent.com. [35.228.173.165]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-596bfa43f3esm5315377e87.47.2025.12.03.00.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 00:55:38 -0800 (PST) From: Ricardo Ribalda Date: Wed, 03 Dec 2025 08:55:35 +0000 Subject: [PATCH 2/3] media: iris: Document difference in size during allocation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251203-warnings-6-19-v1-2-25308e136bca@chromium.org> References: <20251203-warnings-6-19-v1-0-25308e136bca@chromium.org> In-Reply-To: <20251203-warnings-6-19-v1-0-25308e136bca@chromium.org> To: Keke Li , Jacopo Mondi , Daniel Scally , Hans Verkuil , Laurent Pinchart , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: Sakari Ailus , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.14.2 As we get ready for kzalloc checking for invalid sizes, let's add documentation for the cases where the size is different but valid. This patch fixes this cocci warning: ./platform/qcom/iris/iris_hfi_gen2_command.c:1215:9-25: WARNING: casting va= lue returned by memory allocation function to (struct iris_inst *) is usele= ss. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/dri= vers/media/platform/qcom/iris/iris_hfi_gen2_command.c index f9129553209922fda548ca320494ae6ae797854c..ab91afd0597045bd876d0411b08= b5a3421b12c70 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -1212,5 +1212,13 @@ void iris_hfi_gen2_command_ops_init(struct iris_core= *core) =20 struct iris_inst *iris_hfi_gen2_get_instance(void) { - return (struct iris_inst *)kzalloc(sizeof(struct iris_inst_hfi_gen2), GFP= _KERNEL); + struct iris_inst_hfi_gen2 *out; + + /* + * The allocation is intentionally larger. The first member of + * struct iris_hfi_gen2 is struct iris_inst. + */ + out =3D kzalloc(sizeof(*out), GFP_KERNEL); + + return (struct iris_inst *)out; } --=20 2.52.0.158.g65b55ccf14-goog