From patchwork Tue May 7 16:27:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13657476 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 EFB6BC10F1A for ; Tue, 7 May 2024 16:28:43 +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=y+y2ZDUvltj1ZCT1ojJHtresOj6mldQyxz3PcjlJeCY=; b=E2CFl5Uyfsru59 VFiCZdv8BMhGZHa+BwLitXsh/Mj25gDwFmWL0vlatLJUDB2ASFZsXvU3dW//JoutJhtYWcDSwxvCJ a2GT/hh3fhnJWbbf8oEAVLbizD3DXJOiWS5FPiNlV/oYAYN8DTVLJk+2lLiK2FxWwKrnaKdu/YGeu kEXQ9wwxZReoJUbi404EyTr3wEBCKodcfOn8qNP4usqt3O37BSYR1ZA5lDwFY/Tg3kztKzxKyvpCe NrHZkSYN0lIywWGAR0Mgj3FJN4rHXbbBjUPUekvN8cZCwUPkVX/CmsuSnqLnie8hA0Q9kUbs3IzR0 RpWGJh0uZZkYpj51mZjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Ng5-0000000BycF-3Qg7; Tue, 07 May 2024 16:28:29 +0000 Received: from mail-qt1-f170.google.com ([209.85.160.170]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Nf5-0000000Bxgz-3oZS for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 16:27:32 +0000 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-43b06b803c4so22430941cf.1 for ; Tue, 07 May 2024 09:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715099245; x=1715704045; 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=24yjDTHuOCF+C8SbX9O7bVVIA87jnk99ezK2b/3Gma4=; b=iwG6FhvYiQCuDVL8kR3r3bHbvTz2BR4aWsLWc4ua0sMpOcLx5scZWf/FLVXH+r91bu pHOgsFpOQArY1OYOOAmm9JbKP66s704tI0wjGSlmvN0BvRUIJjvVwld8h/44zNVP3p0F tdCerGCBPGzmm919K0qm7bc2hnQiv4NxWFUbA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099245; x=1715704045; 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=24yjDTHuOCF+C8SbX9O7bVVIA87jnk99ezK2b/3Gma4=; b=rD4PdmN9jpbwd5WiOVELRNRVhMWRljJxczuQZQEgFtBeyobpGV8iUHftppxtYAPcKG 78oyqvzSV67D5Nmdg6n78Ecnjg40JGQWQIIqUBv9mvIt+GJG+pDgeXioHjbNebALqSFS kvFz4g6BnZwdepPOehkx7xslPz1zSrgNN6uGEh0wJwHH+Uj8R/1Q9Gcb9uCxHG2MIQB0 7myCYxQJd9MrnQXSc/wAUWliFbD4q27zDgt2xnQ7CUE8lk5hGBn51LkJX0UHVrCVj+Ai nSA+TZcOYRWzROmwjMPlN4linTz/kyVHa6IyskBL8x8Bf9FizIanQAQXBoFJK4jTDk6W dD3g== X-Forwarded-Encrypted: i=1; AJvYcCVhq/Yb9Ph3yRUv5VLZKtQeDVOrhDlBKXzfQ5u8HZZot1qZ0jfD/jJMxubg4dZAXyyo/3pRCpmdj89twwQVbWwvJOFa/+hR3L5IXBVl/KY3bRIGkWs= X-Gm-Message-State: AOJu0YxGneDn8E5vBWfiUo9OuWSbBbJc9PAAjAMPhQI+kV2GFt/Bx+i2 sF4AfM3i4r5l+38E7vq1IwgX+LRQgeyWBHnGYvntPl7xXTCJLlpVb/PfB0QtWQ== X-Google-Smtp-Source: AGHT+IFXk9TiPGkyPd47b/0bfL7TWw3sW2kfDIDAt+NnUsqL7Hhdu3EhERFFZlCigfyFh6dM5Cuiow== X-Received: by 2002:ac8:7e8b:0:b0:439:dfc7:aca4 with SMTP id d75a77b69052e-43dbf868fd7mr1746031cf.63.1715099244908; Tue, 07 May 2024 09:27:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:27:24 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 07 May 2024 16:27:23 +0000 Subject: [PATCH v2 18/18] media: venus: Refactor hfi_buffer_alloc_mode_supported MIME-Version: 1.0 Message-Id: <20240507-cocci-flexarray-v2-18-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_092728_092264_C84539BF X-CRM114-Status: GOOD ( 14.83 ) 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 Replace the old style single element array at the end of the struct with a flex array. The code does not allocate this structure, so the size change should not be a problem. This fixes the following cocci warning: drivers/media/platform/qcom/venus/hfi_helper.h:1233: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_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index dee439ea4d2e..9545c964a428 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -1230,7 +1230,7 @@ struct hfi_interlace_format_supported { struct hfi_buffer_alloc_mode_supported { u32 buffer_type; u32 num_entries; - u32 data[1]; + u32 data[]; }; struct hfi_metadata_pass_through {