From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v3 4/4] drm/i915: rename i915_init_power_well to i915_init_power_domains Date: Sun, 27 Oct 2013 13:44:17 +0100 Message-ID: <20131027124417.GC18189@phenom.ffwll.local> References: <1382464076-5030-1-git-send-email-imre.deak@intel.com> <1382711810-25881-1-git-send-email-imre.deak@intel.com> <1382711810-25881-5-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id DD3A4E65A2 for ; Sun, 27 Oct 2013 05:43:50 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id c1so2872477eek.5 for ; Sun, 27 Oct 2013 05:43:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Fri, Oct 25, 2013 at 06:10:31PM -0200, Paulo Zanoni wrote: > 2013/10/25 Imre Deak : > > Similarly rename the other related functions in the power domain > > interface. > > > > Higher level driver code calling these functions knows only about power > > domains, not the underlying power wells which may be different on > > different platforms. Also these functions really init/cleanup/resume > > power domains and only through that all related power wells, so rename > > them accordingly. > > > > Signed-off-by: Imre Deak > > I agree with the "_domains" rename, I think it's an improvement, but > since you're already renaming things, I have to drop my bikeshed: we > have intel_init_power_{well,domains} and > i915_init_power_{well,domains}. IMHO this is really super annoyingly > confusing, because they sound like they do the same thing. I know it's > not your fault, but while you're at it, could you please propose names > to unconfuse this? > > i915_init_power_well takes care of initializing the structs and > pointers, while intel_init_power_well is the only one that touches > hardware. A possible suggestion: > > - i915_init_power_well becomes intel_init_power_domains (just because > I don't like the "i915_" prefix, since the PM code uses "intel_" for > everything). > - i915_remove_power_well becomes intel_remove_power_domains (to match > the one above) > - intel_init_power_well becomes intel_init_power_domains_hardware or > intel_init_power_wells (since on the HW these things are actually > called "power wells") or intel_init_hw_power_wells (to combine both > suggestions) The pattern we have thus far is $prefix_$block_init and $prefix_$block_init_hw. Occasionally the $block is at the end, but for cases where we have both an init and an init_hw function I think putting the init[_hw] at the end to make it stick out more is better. Just my 2 bikesheds ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch