Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp393567pxx; Thu, 29 Oct 2020 05:19:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyS0bhhSoCITMdyDYfJoqDuZjLEdaoQTF4JoeRJKBMzU0+tZfxnaHDr0bVgkIku0R042wq X-Received: by 2002:a05:6402:1112:: with SMTP id u18mr3086497edv.349.1603973965323; Thu, 29 Oct 2020 05:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603973965; cv=none; d=google.com; s=arc-20160816; b=ek2olImYTxCnyKwqckedxcKijZKHtB5P/KTjt4xPunLeJ6ozFYMh0me0FnMNlHVYal rQVvvc8UYKIwipZtJvWVFUfRNU7gLxkZYCd2AtdhYUHMSqfnFQdVPr1GUHvj+ovRrg9n fUjwadlOdq4iwYpCIpx+vA4oStQIl4CwvCqa44G9AwIaNf834+IyNWQtYfImbyIqO/h5 FDuNfNmARfgCnEGlX9cOzwbfyRn0DD/t49ZUCFDJqS/O+RhjiUBJFf3Fk0ICxwIPHraG kUBzwRQ8jVNytwp6kGd23qUFdbdDW5cdgiR7JuwjPf3JfuTSI0YLV3+S7oYYev8b1SrV lKAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=927anrgRV8MpObg1vilp1jiSs8kJIxuhIHcDLSM5zdw=; b=I4RQZDFSsxqxqH4yNm+yUQd/q8EGoF82V9o5imDVlnB9MD7f45+QuCIM59FtXTqilY Tt55oOj4wDANQcRMuN1SlDUKKVoV4xgS7jVkrA5Abwt1QTx3dc94Nbg3wIPjt3hOFfwj 5KVpIEna9m3Um2nhpe+dyVk0L580snIkYQiCUxFXi8d9rnVLYhFWfu8+Y/2P1UmqWGmj /FraoOPpAthawUv43a0t5cCTbKIiJv2BvYvCR5Pg9+y1s85BfJsgNg5nclgRntnULv7t cVcvPqLWJ2pDvRLJKuxjoJuJOW07t562EqadaIDA6D90NF3t7szeFY5lp+E3tb8/M5fd tKYg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si1793660edr.509.2020.10.29.05.19.00; Thu, 29 Oct 2020 05:19:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727037AbgJ2MQz (ORCPT + 99 others); Thu, 29 Oct 2020 08:16:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:4166 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726920AbgJ2MQv (ORCPT ); Thu, 29 Oct 2020 08:16:51 -0400 IronPort-SDR: wz5mbBcWt23SabdG1xsKE/ZTZYol4bi/qWwpJykGUz2AO0ElKQWEcpqr/fbrTE3BNXkYZHjGpF dOgyEWf2n8aQ== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="164922428" X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="164922428" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 05:16:51 -0700 IronPort-SDR: Vm2ehaBlGG25ky/YO68dlqYUcsyjRz18VgyXv9ZcQPVmbkRy557zgchOy5WqFrz8vkcvR3TOWN UPaUjiN71JSg== X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="323685824" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 05:16:49 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kY6sJ-001EaQ-MQ; Thu, 29 Oct 2020 14:17:51 +0200 Date: Thu, 29 Oct 2020 14:17:51 +0200 From: Andy Shevchenko To: Heikki Krogerus Cc: Sakari Ailus , "Rafael J. Wysocki" , Felipe Balbi , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCHv2 1/3] software node: Power management operations for software nodes Message-ID: <20201029121751.GK4077@smile.fi.intel.com> References: <20201029105941.63410-1-heikki.krogerus@linux.intel.com> <20201029105941.63410-2-heikki.krogerus@linux.intel.com> <20201029111303.GL26150@paasikivi.fi.intel.com> <20201029115113.GA2288851@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201029115113.GA2288851@kuha.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2020 at 01:51:13PM +0200, Heikki Krogerus wrote: > On Thu, Oct 29, 2020 at 01:13:03PM +0200, Sakari Ailus wrote: > > These functions are doing pretty much the same thing but with different > > parameters. How about implementing a macro or a few, which would take all > > the parameters as arguments and return the function to call? A few variants > > may be needed. Individual functions performing different tasks would become > > very simple. > > I would prefer to do that as the second step, if you guys don't mind. > I think this was already talked about, but maybe only internally. > Those macros should then be used also in other places where the same > steps are being executed, for example in drivers/base/power/domain.c. I agree. -- With Best Regards, Andy Shevchenko