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 D5776C433F5 for ; Tue, 8 Feb 2022 07:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235478AbiBHHwN (ORCPT ); Tue, 8 Feb 2022 02:52:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245326AbiBHHwN (ORCPT ); Tue, 8 Feb 2022 02:52:13 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96684C03FEC4; Mon, 7 Feb 2022 23:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644306732; x=1675842732; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=zSjGWEp/lad+yOmZqYzDcbgsisGuWA+cNAYLyxP20Lw=; b=XAhWITI5qrEcow3cU1PcUWoWGS7L55PvbmUO8ud2xNVCVoGSftShXyuz eg50BYITTG70YHsha3yzTAeFMCUimAdzClbFwEJxfS3/+HsDIczw3M9MK B6ySixkCgeOP2VamGrbyYhUuNpTmZr9EnzZWvC7er6iGmF0LaJePH3QX5 j4PeD86aD5j7GfTQ2cn5oyNsT8kgB59/RZBDGD/lTJWlahlwqwEt4f8Nx uCukxUM9Lv5CtF/yrxyjM1BEy2QPXpfFKJ7InHBGWlrgjsJhdn8C9CNch PHXGf36tNpm3zHxnS/7J569cPOlwuQdWmH9jHHbc2qGEpuV0p85+bT/rc g==; X-IronPort-AV: E=McAfee;i="6200,9189,10251"; a="248843415" X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="248843415" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 23:52:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="484724374" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.151]) by orsmga006.jf.intel.com with SMTP; 07 Feb 2022 23:52:06 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 08 Feb 2022 09:52:05 +0200 Date: Tue, 8 Feb 2022 09:52:05 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Hsin-Yi Wang Cc: dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Chun-Kuang Hu , devicetree@vger.kernel.org, Simon Ser , linux-kernel@vger.kernel.org, Maxime Ripard , Alex Deucher , Rob Herring , linux-mediatek@lists.infradead.org, Thomas Zimmermann , Harry Wentland , Matthias Brugger , linux-arm-kernel@lists.infradead.org Subject: Re: [Intel-gfx] [PATCH v7 1/3] gpu: drm: separate panel orientation property creating and value setting Message-ID: References: <20220208073714.1540390-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220208073714.1540390-1-hsinyi@chromium.org> X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Feb 08, 2022 at 03:37:12PM +0800, Hsin-Yi Wang wrote: > +int drm_connector_init_panel_orientation_property( > + struct drm_connector *connector) > +{ > + struct drm_device *dev = connector->dev; > + struct drm_property *prop; > + > + prop = drm_property_create_enum(dev, DRM_MODE_PROP_IMMUTABLE, > + "panel orientation", > + drm_panel_orientation_enum_list, > + ARRAY_SIZE(drm_panel_orientation_enum_list)); > + if (!prop) > + return -ENOMEM; > + > + dev->mode_config.panel_orientation_property = prop; Leak when called multiple times. I guess you could just put this into drm_connector_create_standard_properties() instead and avoid that issue entirely. -- Ville Syrjälä Intel