From patchwork Tue May 7 16:27:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657473 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 128DAC25B5F for ; Tue, 7 May 2024 16:28:29 +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=IVa5QhugHk8RKpbCNnzp0FkqGubqWd6vDvaRKuCi8Fs=; b=VB97TIwZdcj1AL s8Q+h2uTtFMovd59KUevaVQawe90SYI0MCnR1AjM+MtPe83V6wOxo+DiCPnzt/naVjQQRWGi4zGn2 99S6WnNns64fmSdG4wdlnjeeDgAaXOJg374caqLV9cKAlAvYz9ypW4jRXu9Q3QKLV/mI7g2elPa8X vvphMiafAEUPppQKCoRn3zZYFZwp+f069jG10UeFqCNhuJ0pJruJLhjpnp7FRj5LIBRRCu3KImKF2 591xVm57Oqu1DkyO4ler3YEw0ThxTc5qw5+ykqExNCyRNJgYm3qebEzERjGPQtlNnXplQHHBwPw9A 4IGg5oOuwtghGxzhoMmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nfk-0000000ByJ1-2e3y; Tue, 07 May 2024 16:28:08 +0000 Received: from mail-qt1-f171.google.com ([209.85.160.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nf1-0000000BxdA-3zdP for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:28 +0000 Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-4349685c845so19822281cf.0 for ; Tue, 07 May 2024 09:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099241; x=1715704041; 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=7NkWJe8JlogUB1KQ6tzpQTV71nluZthbO4z82dt8idE=; b=P9Le47vIq/l0DAPgYP3aJ0ZnbjyOZZ/h4RwaqmLY2mpsW21SOq4OAx/sdyMWwrXv/U LsNaGFEwTzQux4ZsI5gzDGoEtv3iw8rUSx9l0+NIj2oXMBSNUsk4GQH39U2ReccKBZ3S bzCKnTXQQkwG++tHBmJNjNDQgRA/r72SmIlV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099241; x=1715704041; 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=osPkXvjZpC52yPxkKWg7CtT79lXtutccGZTimvr0GoBos2Ri3drLkEdE1uIxWXdXsy OIREj/X40dfRqURIOF0sQwdqa7EgrfE7kdcXJNI/7sYF3vIOTFvWXJr58RHpS21J5H3y dWeCqOH2haOF9pKtmZukOl4q8pRoZlo0tXH+5fCR/BFYMnxqNjN7dMqW6RCCoCv6rvTb FrcU115Tz9WFfpB5KO9kBdBgUGNA/3Fo6qsBXR5/PWX0/1iHVRj0bskM0XIn71eNIYB8 5LACkY1MpQJ7NdQeP/PFGo8VJyRnhh7TEMv+1dN2n6uTqPY6DtE83I1hLK4ZuYl1Ei9B z/eA== X-Forwarded-Encrypted: i=1; AJvYcCXkDZVKoEa6ui4xcKqvENsjAYQHAknP2GIoz7TK06xMLdOTLw72VlTzs5FctvuiEQWCDlGDR9OUwUlFoPon1euwsrncNGgsnP50RvddemYZDBa9CME= X-Gm-Message-State: AOJu0YylzA6FS1lz6HjubM+L83grzxsUr8ZFOkkCkrWCW30xDeFeThQy hksydG+cqbMfKlGkhOe4v1cKS5uXescZIuR304D5ICEUgTPUdzmb4uXTYJKw9A== X-Google-Smtp-Source: AGHT+IGy63ktMUcef0pl0O/LB4NVLwAUnrH80knXHLAZJvTEQKiy8Aq4N4cNRIawlD7kkWl28ecX+w== X-Received: by 2002:a05:622a:1650:b0:43a:f441:b3ac with SMTP id d75a77b69052e-43dbf4e70d5mr2464831cf.32.1715099241340; Tue, 07 May 2024 09:27:21 -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 hf23-20020a05622a609700b0043d1fc9b7d9sm4160597qtb.48.2024.05.07.09.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:20 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:19 +0000 Subject: [PATCH v2 14/18] media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-14-7aea262cf065@chromium.org> References: <20240507-cocci-flexarray-v2-0-7aea262cf065@chromium.org> In-Reply-To: <20240507-cocci-flexarray-v2-0-7aea262cf065@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-20240507_092724_131465_0FC17F2C X-CRM114-Status: GOOD ( 12.87 ) 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 Reviewed-by: Bryan O'Donoghue --- 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 {