From patchwork Tue May 7 13:18:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657010 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (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 EC7AE16EC14 for ; Tue, 7 May 2024 13:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087926; cv=none; b=WB7opHx0PMs5SRwUdCJXIAOcknIqp3n6TwZUb+fVnNlALtCHWcY9TkbpC3LkF47/dKHfg2YU9xol5IW8X+4uFFnu3uY6Um7yzJCanXt23JwYwvM94M/NU5OumOth/blQKZiXJwYowMjqlU+HoBX3EB7oWBY+CoCfKtFgB0iFmSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087926; c=relaxed/simple; bh=yspSc0vXW80bDStJJU6njW8ROGAmYm1HyjTlHpef53U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uNuyP+AWNKkbFKoU6iSTPzFJWzppy3obJlHUxo5yH1egRyfeKuZNnDePD0sT4Wi0RanAk7+93CLpqg0PqPsXO3R67gtmpbQOejDm9KJh8KJ2tqm22vUIZEu4zu3piM+LfRJos8CCC5HPRlNQCwvsKxT5U8IDgSutkxTgMA6ayng= 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=I65H6rof; arc=none smtp.client-ip=209.85.219.42 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="I65H6rof" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-69b50b8239fso29891486d6.0 for ; Tue, 07 May 2024 06:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715087923; x=1715692723; 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=7NkWJe8JlogUB1KQ6tzpQTV71nluZthbO4z82dt8idE=; b=I65H6rofeep41/6v6/LZuouHXo+dQExIclgd2rGra9OW1eOnPYVVEv/Rik8spS+1+c IWzHOTuICIyl5VcEPSF3ctMSYrkEt4IA8EN/qRKYvxocv3l7hQbP/D8mIsK4yxSHdW8S 1J4qwjQhDcZMoYD2dLjqaSbb2dImNFlxQ+aAc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715087923; x=1715692723; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7NkWJe8JlogUB1KQ6tzpQTV71nluZthbO4z82dt8idE=; b=eCx20DAVCvIwlP/Xo5RsvNccX+L2Wgv50TPvXvWwLq+2hGLzRtofZRD7dzddRkwehK ocqQQGydJvIgofiIhyz18zuWa2V8laX2SPDe1ycTaQDer/0uet+xntfVJXx8muVmblr9 /jVLw7VGhx6YSRWGtR8+/YvUKaK4L1HTNLkci7urTomMseruMnxz5PVKo5wV/1xq9NzM xT2sjsXK6tWJ6y/QOUZa0d12T3+c+238c0RC80ZnwHH7h0fzjfnys5sfit22ApSY5L7G PLd7p6sH6d3bK3UiXon0vns3zGA5mZwu80aiCz9PupuSwi5WspHr1iDweFo84Gbu07nZ ILUg== X-Gm-Message-State: AOJu0YxtKPwUrfqkaI2tkbA7zIaDcLI6JWHKCdtmt6RhM87m8cu2JRRJ JGfvWRB9ZRPn6tAsHmxsLaCWDT3AUvakO1QKIJfYKYYOOAZXfB0NwYK23TyoHA== X-Google-Smtp-Source: AGHT+IHtK11JNQ0Mp4ZynJH1X6U9hIM5Ax6eZry5/k41CUicJOL6ws6WrCLsSXzFe5ZsTI8+M4i8kQ== X-Received: by 2002:a05:6214:288:b0:6a0:f057:402f with SMTP id 6a1803df08f44-6a14608b428mr41532076d6.32.1715087922869; Tue, 07 May 2024 06:18:42 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id t15-20020a05621405cf00b006a0d19c3139sm4655105qvz.118.2024.05.07.06.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:18:42 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 13:18:40 +0000 Subject: [PATCH 14/18] media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v1-14-4a421c21fd06@chromium.org> References: <20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v1-0-4a421c21fd06@chromium.org> To: Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab , Laurent Pinchart , Michal Simek , Andy Walls , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 The single element array data[1] is never used. Replace it whit a padding field of the same size. This fixes the following cocci error: drivers/media/platform/qcom/venus/hfi_cmds.h:163:5-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/hfi_cmds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h index e1dd0ea2be1a..15271b3f2b49 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -160,7 +160,7 @@ struct hfi_session_empty_buffer_uncompressed_plane0_pkt { u32 input_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 padding; }; struct hfi_session_fill_buffer_pkt {