From patchwork Tue May 7 13:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657049 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 A904AC10F1A for ; Tue, 7 May 2024 13:23:20 +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=t0grvpGCTC4yCBEENJxAX6sjSiO3dIpCfA6xuJh4mQg=; b=Lc2VA3/IQmD/t/ QIwdRbn5bzZgm5OoMM6EoX2sWYQfs9i2FrtwJHr5r2DtDs9wF6DLUG531GE2tnnKRU7ziL0uZL2g8 Q9z0llJpYG2I0FYCzb84dahH3+b3OsJzK21qBZZhM1PZ2LoYiigDFqUde7q0QGgK3/KFWLepDufa5 nSwmOnJhRRxPPhYKKnzGrQUGsJ6EFOzfwQ4WRYRKUkK+JnjPzumqHJBbBQ89PpyJFACfGUGXSaSGu ETMnwRrSlPLksNwNTlVTgVxUqJ0FrWS/lrpvCZO140mAWKIS/7FNBNeyTHPOA0LBdFbfQtPS+5/9Y SHTqNB+WH7up0Wmey9Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kme-0000000BCw7-30lg; Tue, 07 May 2024 13:23:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Kib-0000000BA1M-0xpk for linux-arm-kernel@bombadil.infradead.org; Tue, 07 May 2024 13:18:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Cc:To:In-Reply-To:References:Message-Id :Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender :Reply-To:Content-ID:Content-Description; bh=ksOWhtvDjU4SOAc5LYb/tmHPugkENGAwplW75xl0q6I=; b=lDuGjTbSfimCONoQpCiWRI7ud5 Vrd6eelIxbGE42l5ryGHZFUZayZQbkFIIV8kpb3+BwHdk+YtV6rKlwISRjszU768597y4hmE6gHFg yr7nAhhdt3KgbeFJVK91LTVOUAnr6RiuGy5Q/T0DC1BAx4JOJbbzL2i70I/0lMUHsEsndlTPSrYvY lwaPlxEFefLAmJbvJrEZFE0NZqL6qsASUZKnjJCA4wmAZlTbdBWSRjHvJ+Z+VTPDruUk49v6t2nCN S846QLfWvFcYUKrV0+vkgmUlrZ/G5yqDl010BT6FHW5njC8kNl2ZGPGW4Mh0nay8kV8EAZe3gheil tOsdnkGg==; Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4KiX-0000000DIVR-41l1 for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 13:18:52 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-43b06b803c4so21011681cf.1 for ; Tue, 07 May 2024 06:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715087924; x=1715692724; 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=ksOWhtvDjU4SOAc5LYb/tmHPugkENGAwplW75xl0q6I=; b=dzR6T6NFNGO2tbjdl8CJEl5CISCvQXRMlOPBU98JfP+C1ofvcbuZCHI3MgBw8Cb4Rz eK4SZg5dANIEHbaWgAll4VHD0IDD7G2K11pbJbu3xDGxOHcBuIuiGW57PUnMwv7xd0DL ZxeKZ3nRY6cQOJVcIcG12p+ErWKfjirSXIp/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715087924; x=1715692724; 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=ksOWhtvDjU4SOAc5LYb/tmHPugkENGAwplW75xl0q6I=; b=wxjV31plYH8cvbVwJb0IQ+0vVlViRXu3CdOlC/tWeMYv1xrSBMVmC0SqqmABCqZSZn G5OG8gQlJsFdaKJN701mmv4kgE/3toT8CkWD8EzEVNzPSwqjCfr6mjbKK4SgZggJ1Fy6 XNAAeDm5Fe+YiK3Lp6EPgOJMhKuVsoRz8qa6/qLBURo8EeJWullA+gOvs0nqWxfhVqbP WEY27ldbEY/FU+cG/5IX/+6S+qFwqNGR8QJ0M1d22TMaoPvU3A2eCvzN1XC8kxd6k6Pt bu0J6ETFRTwYQwup9Th4XXj9FKCRiapMv891LfH2BovAyT8Iou/Khth1tBkEdXCes42Q xsHQ== X-Forwarded-Encrypted: i=1; AJvYcCV1s/IBR4yS9Nlz8QNql8W3DHAapqNRFM59E+mzYgoAp20mqCFH6sOBnGUaumV0BCgaqIU5gyb6+l5SYBC96zB3AQ6IdIA2M28SHoLWX0rGigwRK7o= X-Gm-Message-State: AOJu0Yw48dfLBi2JnJe3lX55iYskEtARGR2sn6W+Xb4CIgaGF4a13qHz 74i1DSmidypxuWpkFWaFKpwusfHzpVxILQVtBoUmY870XfFMFrQiGP0smbF9CA== X-Google-Smtp-Source: AGHT+IGtSin+RqjeeAuWjhc+2Qu533gps/bRqdwUKUS9So7G1IUcL44UetlZwIWAlGuPmz38aWSKJQ== X-Received: by 2002:a05:6214:d63:b0:6a0:c117:372e with SMTP id 3-20020a0562140d6300b006a0c117372emr15802826qvs.12.1715087924051; Tue, 07 May 2024 06:18:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:18:43 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 13:18:41 +0000 Subject: [PATCH 15/18] media: venus: Refactor hfi_session_empty_buffer_compressed_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v1-15-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_141850_068630_89C57AA1 X-CRM114-Status: GOOD ( 11.37 ) 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 with a padding field of the same size. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_cmds.h:146: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 15271b3f2b49..02e9a073d0c1 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.h +++ b/drivers/media/platform/qcom/venus/hfi_cmds.h @@ -143,7 +143,7 @@ struct hfi_session_empty_buffer_compressed_pkt { u32 input_tag; u32 packet_buffer; u32 extradata_buffer; - u32 data[1]; + u32 padding; }; struct hfi_session_empty_buffer_uncompressed_plane0_pkt {