Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4033071pxk; Tue, 22 Sep 2020 08:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHV/5zB/5FdohIuXQ15DYypd9/bTQ5liVDKtHmkiWfwzbWt6o9W2Wt8qdgakRcCLfJjNwy X-Received: by 2002:a50:9b5e:: with SMTP id a30mr4489539edj.49.1600789452106; Tue, 22 Sep 2020 08:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600789452; cv=none; d=google.com; s=arc-20160816; b=zMzT5WdHauJCZk6/EB9jNUdhTZAwWvJyFq/rCveusC+UFX1B6zV4tZs+Riggfjdjl2 Lkd/bbQRrTax3/tdG4zD8AWZ3R9xOxakmViLc4SJtWAaOkYI2kOn0xG6t5j6sFlMpEsl F7nGbyu4+a62aImPuyBMt03QB6l03bXugt2Wm2nWi07XiddcEoP2qhNkw6z05vLSrr2h ApBuYgDWwdxon68cNsM7yurXd9BkQGwdSKK2RI2uMyrpwcg6SNpZIuQCNws9ejGacWGs YxUgH6fiJR1ra7a7HsSNVBlOZj2YQoAjvGqebpZRj7OoNPw3eexUBXqddLphJ90ZpRi9 QHpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5zqe84Nk1UowCxWHEiI4DgdqPuTuGGYYmgeHmTBq0fk=; b=O+BT9WWia+NDl71Nok3Hz1qkd60wewPsSmfD8dS7tkOhpw7/+8XDh0Cq2zxjYebsr1 eh5+hzBVP+KrWE8yH1aMOxjPbb9D0O8VISXfIm6xlzKtmlphqtsGElMnzCICtDyISCyf 08Hmo8lIt1TMFZd/3vzZ2LK+MSN1SY0HwJGpZ+FMVXtjwoibpOlNtnOt2HwbOKCEaDZ9 5FdrNmkEt0aSuesVFBZrK0ti/dj92l4fRTfxL443wm8mBEu7YDYCLs6iSSChOUm6ZtHC fyKpf9T3igtrrgYN3XjHMhOpEG+ClSPfitWF/eACU+PiGCmbl+J5V4sybUL/P9lILZ7W Jhsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uHadmq3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me14si10756205ejb.397.2020.09.22.08.43.47; Tue, 22 Sep 2020 08:44:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uHadmq3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbgIVPmr (ORCPT + 99 others); Tue, 22 Sep 2020 11:42:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbgIVPmq (ORCPT ); Tue, 22 Sep 2020 11:42:46 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD70C061755 for ; Tue, 22 Sep 2020 08:42:46 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id a17so17589393wrn.6 for ; Tue, 22 Sep 2020 08:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5zqe84Nk1UowCxWHEiI4DgdqPuTuGGYYmgeHmTBq0fk=; b=uHadmq3Kz2/+CUFAUGs/3cB8L1OaAkv/I+ZV8ZYzgFHRz2FsDq65zy5S8iqf3cN4jq 8h9cAwvHa8idmrrH4ZpHw1qPEGpcxVIHNCr9NuY1vRhvhNLIJ9lNCMc5DviJQy8oqsEb NnR1rL3ma/9uNi9Hopsfs7oqbz7Grs20FVqgFW9MP9ofBiFG7xBQVGzLAVNu8oAXq9PM 7jk9wJrr4275SyylH/FxyBzL9A6nhdiQ8VXpM8/xky2R8GqWrHPVZ1KjbxF5JEVsKROb VUJTVVwj1zfHyeWUk3mGkDKhWSQXET8j28VgkEsnu9DXm0ba1gLO0Y2z3t9fmfygxOHJ 49TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5zqe84Nk1UowCxWHEiI4DgdqPuTuGGYYmgeHmTBq0fk=; b=YwnfrYaUf10bJ1EfYKWIm+Ei2SkCiCqeWrr7hT+HJ04Jc31XQiVVkLEvldGHnG3ZcY cKYw7d+2XQUGXLLGRceOyiVJ71xfuh7WkCUGpb7quPf5e0dtWDPZ5Z1TGFaleYqXd56y B49D6VyskJy2V1AM3O7N0pB4r9CkK1+WUvdNuheI8vvanzQ2SVd052zNFL5xehx2HJob +fAbP2Y9STvIJNBCS5XFKi7khX+ErWdt0FXGUifd13Fxg80+yeoqUIJ78QWDVoZKsHR9 5aTNIwFpCJ42+OAeKu4LznXbbzbWdWTWVkLSk7pYtoT5xLWl0kdp5lJhP56xad5gvEXG Vu0A== X-Gm-Message-State: AOAM5334hyBdMciiNnGOo1qsvxyYKAqma59n0UnL6mm0syjts+FwBWw0 oXGPpvwIeOjNdoST+MddMfILZQpHmGuY33nS0rc= X-Received: by 2002:adf:fc0a:: with SMTP id i10mr6081863wrr.111.1600789365196; Tue, 22 Sep 2020 08:42:45 -0700 (PDT) MIME-Version: 1.0 References: <20200922021106.24733-1-bernard@vivo.com> In-Reply-To: <20200922021106.24733-1-bernard@vivo.com> From: Alex Deucher Date: Tue, 22 Sep 2020 11:42:34 -0400 Message-ID: Subject: Re: [PATCH v2] drm/amd/display: optimize code runtime a bit To: Bernard Zhao Cc: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Rodrigo Siqueira , Jun Lei , Aric Cyr , Wenjing Liu , Brandon Syu , Michael Strauss , abdoulaye berthe , Martin Leung , amd-gfx list , Maling list - DRI developers , LKML , opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Tue, Sep 22, 2020 at 3:52 AM Bernard Zhao wrote: > > In the function dal_ddc_service_query_ddc_data, > get rid of dal_ddc_i2c_payloads_destroy, call > dal_vector_destruct() directly. > This change is to make the code run a bit fast. > > Signed-off-by: Bernard Zhao > Changes since V1: > *get rid of dal_ddc_i2c_payloads_destroy, call > dal_vector_destruct() directly. > > Link for V1: > *https://lore.kernel.org/patchwork/patch/1309014/ > --- > drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c > index b984eecca58b..dec12de37642 100644 > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c > @@ -148,14 +148,6 @@ static uint32_t dal_ddc_i2c_payloads_get_count(struct i2c_payloads *p) > return p->payloads.count; > } > > -static void dal_ddc_i2c_payloads_destroy(struct i2c_payloads *p) > -{ > - if (!p) > - return; > - > - dal_vector_destruct(&p->payloads); > -} > - > #define DDC_MIN(a, b) (((a) < (b)) ? (a) : (b)) > > void dal_ddc_i2c_payloads_add( > @@ -582,7 +574,7 @@ bool dal_ddc_service_query_ddc_data( > ddc->link, > &command); > > - dal_ddc_i2c_payloads_destroy(&payloads); > + dal_vector_destruct(&payloads.payloads); > } > > return success; > -- > 2.28.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel