Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp24002046rwd; Sat, 1 Jul 2023 10:41:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlHGBYkmvz8njjihk3eQGx87r+mmUcV+yZwRQo1VIq4AE/YYdQ6czZKOwtNQTwr43T+8VuQI X-Received: by 2002:a05:6a00:182a:b0:67f:d4e2:3dd7 with SMTP id y42-20020a056a00182a00b0067fd4e23dd7mr5722693pfa.21.1688233292021; Sat, 01 Jul 2023 10:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688233292; cv=none; d=google.com; s=arc-20160816; b=NidwesFgyxz8eb1cynt97DcVxHqqZTZ8XNeTl9K8EbiQqLO4UFZWFaAMie6X7u8Tb0 0KQQy6HS3avsfL6aBv6lvMDZ/DU3i2Iwdh4uGSpIORvfo+BELM05XjNdUYrsih2ITp5I x6QPVCNDFK5zRK3jYGqBaalFEi66Qey3j/BEuGFeShylk3yts2+eg1XxhurC+ei+AHFf wBcnB3DIycWnJy8mqu+W2g3OBhVRSSsqkS1ToiCEuQJQbuLnCXO6L4S57N+mDCCoR3Kz b53ZJAQ0ZA6x6VNCgnqCxKLY45HmC7akjumt6YcSROa/H9qSbzTR6xO9eJqPlIlohHwQ wnpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=4571NBy+KLXgC3NNP9MvJGcax/1A0T6sjgjtlbhs8Ks=; fh=V1zW8Pj/gMgNWT25ZOO4qkTGt2oVWUuqtm1Eggufv8Q=; b=0EywiRoV/bZ0E1H2D921J/KbG3PuFmzvL6yMmHgQechkWNtiWuBfPB3ErmwwL7H5CA Ew2VLedAEh22LhT595cG3cOqAGHmlwoFNCb7VMoWakFWHHw5W+sN7y2kBjgvfJ5vHb/o wGcQmQSJDPanMQ8GzHIkUTn3eMBtQOO8ZvrUsimDtObngoihEj0LSKEereRbFt8dIzKL IBC7ggvSu5yOyAb/o9S56zElnTsAN3hlT+VLyNLzz8uNx/VOB1542YD6ymqiuwQNpddF upG+4QTVJ4vTKpCBky+cVVn16E4ca+7zPmTagkWzMngd856zyRQcqWdUi9EhkkMQI4c4 JnPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M7Iw+flU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a056a00139600b0064f7150b45bsi15033086pfg.352.2023.07.01.10.41.18; Sat, 01 Jul 2023 10:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M7Iw+flU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbjGARQb (ORCPT + 99 others); Sat, 1 Jul 2023 13:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjGARQa (ORCPT ); Sat, 1 Jul 2023 13:16:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD9961FE8; Sat, 1 Jul 2023 10:16:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 618EB60B61; Sat, 1 Jul 2023 17:16:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B676C433C7; Sat, 1 Jul 2023 17:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688231788; bh=iuoEM5TLrGLiGT/miHKKQ7Yf7kCvrkAytDld5d1Z1KU=; h=Date:From:To:Cc:Subject:From; b=M7Iw+flUPp5hBxYi22CSg15Dxk6sCTfNhi1Ns6UslhVnTxV4UJfAMk31AKcEHYV+W gXP9A2EBaHyUNyEct6lAIu6NHMAqA0CTnWGdGlLciu+G3AEVzqsfWknSCFzYlfx1YH iDIeM+4DxecrcPM/L+6eBNJd38syWpf0dQm6ELaupvuY5Hc/SmLl6Q0pDpA5/TyUlT ZoULBheBxc/Od+xgkwuKkFv5XXeQwVlMu8ZcT7emKCbK+lkC0a/KIhlCd2go1MUVAN okDt0+zkNRAxxw4lXiaLKvNPPp7OjEyMtIt5CAm7Ij4Thqdwa9adScgjEqk8bh7S+z fxiVbjJvQFn2Q== Date: Sat, 1 Jul 2023 11:17:22 -0600 From: "Gustavo A. R. Silva" To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] media: venus: Use struct_size_t() helper in pkt_session_unset_buffers() Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prefer struct_size_t() over struct_size() when no pointer instance of the structure type is present. Signed-off-by: Gustavo A. R. Silva --- drivers/media/platform/qcom/venus/hfi_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 7f0802a5518c..3418d2dd9371 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt, pkt->extradata_size = 0; pkt->shdr.hdr.size = - struct_size((struct hfi_session_set_buffers_pkt *)0, - buffer_info, bd->num_buffers); + struct_size_t(struct hfi_session_set_buffers_pkt, + buffer_info, bd->num_buffers); } pkt->response_req = bd->response_required; -- 2.34.1