From patchwork Tue May 7 16:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657472 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 BDCC6C10F1A for ; Tue, 7 May 2024 16:28:26 +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=tQA4hzXjLWQ3yp m+j9uvjNoJB999V2Hqsi1JvtGrA5BmbVViW3v1bM87nwx+J6bAr/t29NtnF2aOsIw1jdiy3oB02Wu 2MU6Cteeowiu7UlQXzFSjinmM7A8ReP6eTWo1ltTX2vDjfituG7kZRTA7K/VpipmZ0lOUeTTREza2 3neItCDGWgb/YkEVdQSuCOfMbfAh52AzN5EUxxiKMUQCVxmNf4/T4d7vT+Mu0m9jaXJkys8SgP0jw WomjGjpn6/1ByZZvQXgWhrI2oozbYEpfGIDMFni3OUdvRsBmeib77+viPsvaLptW0fBGf1T/uFQ5Z 9/Z2MPMRzrjE7GT03y1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nfj-0000000ByHC-166C; Tue, 07 May 2024 16:28:07 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nf6-0000000BxiX-1mOD for linux-arm-kernel@bombadil.infradead.org; Tue, 07 May 2024 16:27:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=rVR4c/8cagnspzuxjXdCc/q8B9 B5cRTiibUfArrzTvR3wqOZskNBQJRHjjd8yjHNJuB3ZbKZEHO2SnxJkN8YizlNpmLkq461vA1cbAU EFOZOCPWR0a+oohyaYsxpFZoxN3+44YD61GCmMnuj+T1F9Tu/yHF8/NU3Y06gUJh1nowVKp65AsHJ ypbGutuwV/zArbGT5HjYpBdnr/lC0zusteKab49jc9r0LedhSWIf5Q9aO5G04KnOBpiJqQrCQKbKj K1y70ATPz+N0WWi5KTxHydlfZgwx2+hKm8A5FG+UfqKv4DbcPLAE9zelKfpPQDBtg6ui4NDxQZ8V1 gVzelC7g==; Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nf2-00000002AZG-3K6v for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:27 +0000 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3c97a4857a8so603475b6e.2 for ; Tue, 07 May 2024 09:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099243; x=1715704043; 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=RLmu+a9FmhyjgQovB2QVNRcUqaUorw4R7JkXPDHAqWFS4eaJGfR3qZQ9F+OFK9z3cX KfA0Z2L0CacuwIHr42hblm+h0j49EGw4U5mN//lZjoAMj5LB9pohDphgxj56jHtZkEhf q7oDcCNiYm01nZd5Oxt1kpiVNU4wZIYGQ7dFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099243; x=1715704043; 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=BXqKeVUIqJp7cVZLr1sndurwpzG7a2AjnNNQ/EvBiBT7xFjafLis02rdyyPgBS+QBj vu2uQ8/NyTKqVv7GMIYBUIVNR11eOHS1yfwaKUAPa9jPlbE4CCKelzChkpXEdiKhC9Dy aMQmJ6r4mKR4qCSE5JpYgroDKSRsT6nx77YjYdB3CfgcU/7ub432fQSpkZAQTOqHfYAo 1x61N7hAIgmkxIphiYfRuyks1kZ9kz5x3F7gEO1YXFTmIhRQa/wQ8iLU2hZzwwkhcQXj icTopQFV2T1W5CMwG4Jk3cCIFd26qKeqbeo91k302oMSf0DtxYgxMkB1rHks7wSOZaka O9xA== X-Forwarded-Encrypted: i=1; AJvYcCUtbiuHPTO0cNYgLUZTKAjGRTW8cyFP9058bwuEqfi7FVBCi6BV1PwbWuACsEx1ByeDV/DRCeWEFf1GWk/Orv7XQL+rueWRAzbed9Qnwj4ATM6rtS0= X-Gm-Message-State: AOJu0YwjaTw5UonKh08e+D36RVyA6Tj6ZAAcDyFRvGDeb9pTmalu+S8w ka0nrSidv68uInqD0SVp6ivKc7ESE2UASNhHMRhfX27KTn1AWh+mHKTjOcBBvA== X-Google-Smtp-Source: AGHT+IHvsozzVLWdoiBjQEoTd85TRkr6VfUZ3BRsJ3jAW62XAs6ZO3NhOM6uPqcyccfc0QM2jKHKrQ== X-Received: by 2002:a05:6870:c392:b0:23f:eea9:ae74 with SMTP id 586e51a60fabf-2409915a7e1mr57362fac.46.1715099242010; Tue, 07 May 2024 09:27:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:21 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:20 +0000 Subject: [PATCH v2 15/18] media: venus: Refactor hfi_session_empty_buffer_compressed_pkt MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-15-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_172725_138525_9348D6F5 X-CRM114-Status: GOOD ( 12.84 ) 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 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 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 {