From patchwork Mon May 27 21:09:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13675834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 464CCC25B74 for ; Mon, 27 May 2024 21:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QakHwLHkZhwtSDXKS+a6plqYxl98/Kq2q5cW41rEOho=; b=sURjEC86bGIsgZ fl+BFE+CjrCLEbIMUdGwV3KrXVz7EbmhKp7Drv1QgmtFudLpksuuX5jScsI2JORYi8deYtP3NJinb cG8Ul10YTvnr6JKMzqaMgUB3qQkL8A2p1qqDYSp78ZNiNaY1YNHORoqkQLQLCUyLmigT/D3ytbvRq E6u9rJ9dwUT1AjcvNszKmGhQaUfLtNzTzKrF4sM+90vi5852p81Lew2V0FvXJk69I75fSRfLZh+pC vfZX+zweswjQmPPuM3VEC12e1wsZVqmqY4rpMbPzd89vmmP0XWosDWzEK287upqixjiYofUAChaXO tosWWoo2GHPADwhg7Iow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhbJ-0000000GKlC-2rG6; Mon, 27 May 2024 21:09:49 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBhah-0000000GKDW-2MzD for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 21:09:14 +0000 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3d19dfb3dceso103417b6e.1 for ; Mon, 27 May 2024 14:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716844149; x=1717448949; darn=lists.infradead.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=l8AF3gTAgrZfiyrwKiI8Z/hJLEimNwmB5PPC7y7Y27M=; b=djf71LubIm5ho8JOa5LdY7BzTX3Dtj7j5o77c3mfmDf1F95ZLFsbZys/5s/Qp0M5Ro EjS966hcKXuxiz9ZIYeb1blCgxSVR7VNbw219LHArQO1gM+bGcupH9UI840sW7xbs8Zm xeBqQWToY5HBs4gXfchhckYZvukouUdP9b+Ps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844149; x=1717448949; 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=l8AF3gTAgrZfiyrwKiI8Z/hJLEimNwmB5PPC7y7Y27M=; b=j3YUSkyyZ5ltBi3paxq6w13YSKWUSXN9g2Qj9X0cOVEntM+sKmhrvVtahwR4C9zSyn BBwDyby0qh0JVdwF5GOUIQpGVWJjO31sawl48c7M/CFF6ezOV/hfHDjheCgdtG0PycHK bDr4WWMhYJPC2AoSFhUAClZTCRx5iMXD6LjqZekRxyBz/TvMSQac6nvyuqsJ8yGWfP+/ uXXrECNzgL4AMc+xQ8WqhEqHJq2Nkz+urTTiaLbAirTV2zSfukZodN4+yVJ3UVW3zP5V kGNI2IvuTDoi5afM9oFwmjMMf+zkG0FNkHoNm7zKogbDpIjL4vtPEQgMQg6tm/fpRstQ pTZw== X-Forwarded-Encrypted: i=1; AJvYcCX49KNqd2Pyr9VnLDRMk4wlhsd2c+vzUWknn5HNwEot+KVGN8xlTbWC4nA3F8bVkNcLrq6edgvtgPdtTEsa+A34gZYaMn1DMqWTJKzZZ4xNZWtsyoQ= X-Gm-Message-State: AOJu0Yxpbfm18U3t9FHjuCjINlCfLvHSCzgM49TcI45B1P5tnqqliVOc F8Yr1nCyjYy4XkLh/dmMfG92fKnfX9JtyBZ/7d/g0Fp5x5WBNETZJtQco9rslQ== X-Google-Smtp-Source: AGHT+IEeQdpu/L/LUu/zi1optJjNBsHcnP8vBr9A9vq3MCBulPPEkbqSZPPYk7ouE579lx7Q7UyqIg== X-Received: by 2002:a05:6808:384f:b0:3c8:4214:fe65 with SMTP id 5614622812f47-3d1a6019bf0mr15173614b6e.7.1716844149278; Mon, 27 May 2024 14:09:09 -0700 (PDT) Received: from denia.c.googlers.com (125.135.86.34.bc.googleusercontent.com. [34.86.135.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6ad850a6dc7sm9511866d6.93.2024.05.27.14.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:09:08 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 27 May 2024 21:09:04 +0000 Subject: [PATCH v3 14/18] media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt MIME-Version: 1.0 Message-Id: <20240527-cocci-flexarray-v3-14-cda09c535816@chromium.org> References: <20240527-cocci-flexarray-v3-0-cda09c535816@chromium.org> In-Reply-To: <20240527-cocci-flexarray-v3-0-cda09c535816@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240527_140911_931237_AD60A5D6 X-CRM114-Status: GOOD ( 12.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Vikash Garodia --- 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 f5708fdfb197..8768ee052adc 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 data; }; struct hfi_session_fill_buffer_pkt {