From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB66DC38145 for ; Thu, 8 Sep 2022 21:17:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbiIHVRc (ORCPT ); Thu, 8 Sep 2022 17:17:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbiIHVRZ (ORCPT ); Thu, 8 Sep 2022 17:17:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 098DCD21FF; Thu, 8 Sep 2022 14:17:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8AC52B822A1; Thu, 8 Sep 2022 21:17:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF8E5C433C1; Thu, 8 Sep 2022 21:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662671840; bh=v9s/sbwXbN0b5p0MQQ1FPV3KReo58HlFqg6xFDEd62M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ta+norZeD7rlC7HE94dns0X1sl0/IAkAQBZlf/o1jCc8vgo6HoI6sZJzTQIP6wPMw QpcJ3R//CiemhE0UA+Bu0E9FfjlQX/JDT6frndDixICBTK+Byc7E2G1zVp6JUcAq5i DtEkBoXf1NTEys71HyXHz3s+nMk6qI55jCFVt2BbwaEbbDErbIZpBF+epI54C/dMrE 4j5aHqlugt4xiwQDzi9lzjTvGKk8+Zj1V7/ju5anLqwVptNDAsEkHrTEDUHs6dbpD9 u0h61hVOzxxQxGAvCmg4YjNKBKFRmdEZ8PHkjCouz7cpfyQBvfePeIYChZiai0ED/q GdRhfUKzyIroA== Date: Fri, 9 Sep 2022 00:17:13 +0300 From: Jarkko Sakkinen To: linux-sgx@vger.kernel.org Cc: Haitao Huang , Vijay Dhanraj , Reinette Chatre , Dave Hansen , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , open list Subject: Re: [PATCH v2 5/5] selftests/sgx: Add SGX selftest augment_via_eaccept_long Message-ID: References: <20220905020411.17290-1-jarkko@kernel.org> <20220905020411.17290-6-jarkko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220905020411.17290-6-jarkko@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Mon, Sep 05, 2022 at 05:04:11AM +0300, Jarkko Sakkinen wrote: > + for (i = 0; i < self->encl.nr_segments; i++) { > + struct encl_segment *seg = &self->encl.segment_tbl[i]; > + > + total_size += seg->size; > + } This is actually same as: struct encl_segment *seg = &self->encl.segment_tbl[self->encl.nr_segments - 1]; total_size = seg->offset + seg->size; Should I update? BR, Jarkko