From nobody Tue Feb 10 04:33:02 2026 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 5780132C95F for ; Tue, 23 Dec 2025 10:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766484187; cv=none; b=RQO10vmefGo6Ywu67SQFjFCvmw3KqWURq6lDp7VNuOGyga5BJGn+NR2coisQgxkwR9iS3KGAn0bx05QbJ+r407nt/iAi7HHesJS0q7YI2qzQVpQagtu8T/ZMptyeI2Z0NT9zIXceKoRkjhjXJkB02p/BmHXtbKsSekqWgOQegtU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766484187; c=relaxed/simple; bh=wVdqZWqwmPY1Cu2m3fV7/xu1uBeJqysomH0AL/l4wI4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JE51VjGUzFjNKLblPZ6H5+rrK/DK8OdCtiPvbVlz6KhGosznprwVhA5T5t7Mcf+c569BXtzb0ANsZqBtn3NLOpJyhL9yzjQQ3CHmF4wG/Gn0gQcl7TvqAAIPJcQTTNzMFVZP15gWPIWLHR/e0IdWDbZgpQGGhfwu84R3bmoAHLM= 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=G3qOYndV; arc=none smtp.client-ip=209.85.167.65 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="G3qOYndV" Received: by mail-lf1-f65.google.com with SMTP id 2adb3069b0e04-59583505988so7371787e87.1 for ; Tue, 23 Dec 2025 02:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1766484180; x=1767088980; 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=GUcTnxYD+aiXPNA8mUA20oia8cBhXKH7lsGlpr1Fxss=; b=G3qOYndVuQ4s2VCSt4oVRfLSY+0xTo9uELuDc0AViedGDIsbMCW7jr0x3UAXQ6Bq8p qYgmypmfAjZkh3REqkK5mSqqXr/2Yh4QVxtV4zhYRuXbZVgLIA2YhxVV2/e97m9XR97m rChSiy4MgPcrgflJvTgy3qQoApZZlCa9ZxAQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766484181; x=1767088981; 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=GUcTnxYD+aiXPNA8mUA20oia8cBhXKH7lsGlpr1Fxss=; b=kW1o6W/uttZvqDrdyDaiFxvzByG/zC9uDcYhp7D4ccPwh5b360sMf5RYGV/08a7Qib N3w9tfukZt3RBlFFyfSspKUZ1fQFAWvM+9nY3XvQ91i+ajGvH3agAoweGwQ+SP/02YuC DpBSFNIrVDwBvjrOpAW90QsFVTLedmFPwJ6SStjJN7WCRNUMU1mmD6YKJH8dZmrQFxeG FMARNv0+ZFeIttZFQChxkwVIbBHdORwiumSTPx+v+kuE7GEYVcIvJiChP7Stal7zkvCz xJHjtE+E+7gJpsTX5mi2/6XhJPqjqSTn/EOY85/DdbgPXkaqx3weGXML3pebw/IFHeCc O2wg== X-Forwarded-Encrypted: i=1; AJvYcCVI86+m1wCipq+SYWER7jAb18Io6agjquHjFW7l+X/ESHqPqA3vh+PnxWiv6jWJ43V0al1CSraqI/GNMmY=@vger.kernel.org X-Gm-Message-State: AOJu0YwNr2r3nn3qnl+5eg+g/1MsYUT/l620ZCVxJDDm7tCIoTwvoSHe m1SORP8ktiBQc1q8Vw+ERFcf9n1p2149PI7dJC1DTf/6/R5LIDwKEsPe5qrv8QcKXg== X-Gm-Gg: AY/fxX5C5k5l2wRIM94j6q3AP9WC5Fha6ROq2oylTTYknqkhBcqXZCnmUW4jrpFniTC TraVWewzXQPStM6wOgK6R5h8r5OsZbAaDnx07v5Lpas9DZEtehiELLQyxyVeLi5E0gmEtD4CmSt F/TzelWB7pu0CF/LCI3Uk817JbFixdyWaSzn9ldaERcykMa4PVTugCDLoGgIySGv+ThWh+V+Acx kWe2+x60hejdklN6AfK/C17uZgarqnToxIiblfA3BAyfydgAplW3aO2KYXkKf5n8sFfivvr+E+l OL6TI2EkvY1snLzE49oJ70XCyRe8VK5Ls5skkSMXmRmMZv2DV8KLtyrlL739G+2MpQ/u8yss4ZI jBtVs1sZ5LyTNSDnMj7+6MjQ5RKWHztBMBD1nHlQGNsE3GML1QUfym4pKaVXckEdQzOwPAqgGd+ 0jcYtCDTaG3asF6j6w8W5YQ6nwXo/5o2E+1QBT+RqoaQl31jqbOljxYXb1B/bRtaE3E2xeCoIJp N4Mv61I X-Google-Smtp-Source: AGHT+IHUtiYy/b1w7aGEwapBzSYDcplHqB3pOohRpr+U+rLexxqRV9AwzsCeEnjx4WC+rrCtt6Cywg== X-Received: by 2002:a05:6512:2310:b0:595:90ce:df8e with SMTP id 2adb3069b0e04-59a17d042f2mr3900726e87.5.1766484180563; Tue, 23 Dec 2025 02:03:00 -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-59a185ea248sm3891990e87.43.2025.12.23.02.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 02:02:59 -0800 (PST) From: Ricardo Ribalda Date: Tue, 23 Dec 2025 10:02:57 +0000 Subject: [PATCH v3 1/2] 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: <20251223-warnings-6-19-v3-1-e8f56cb204ec@chromium.org> References: <20251223-warnings-6-19-v3-0-e8f56cb204ec@chromium.org> In-Reply-To: <20251223-warnings-6-19-v3-0-e8f56cb204ec@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 Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 7 ++++++- 1 file changed, 6 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..c120ea3594fb5d0f40d6b9a7c67= ffc28c42109f0 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,10 @@ 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 than struct iris_inst. */ + out =3D kzalloc(sizeof(*out), GFP_KERNEL); + + return &out->inst; } --=20 2.52.0.358.g0dd7633a29-goog