Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp372258pxx; Thu, 29 Oct 2020 04:53:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU4pX+ty5CetI9v0QV1ZhGbdUer6eWmCLztPOa2a0TaLn0YOrKJwTN9VT7tqNNjtX09UIH X-Received: by 2002:a50:af21:: with SMTP id g30mr3442856edd.46.1603972387002; Thu, 29 Oct 2020 04:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603972386; cv=none; d=google.com; s=arc-20160816; b=yhz7hvoosj6zAVp8TSnF6WtdzbjhXz0hFmpEIfdKjsMPgogLAHUVxmjeoGQ1yiuOvp vh+0uty6TCXTNCZ1smkKZbWb9vX3ltfCzcVjvxk97SIuTF72ApL6R+m8aqGe7/37ruFP cCRqNXKERhPQm2paSqZe9ybi6zwEgzI1Ks0wlUQk+8weS81jNW+yd6S98ieQK7CniAZz iqsfI7Bsr+E/vsOzE6zIpFS27Xw+RNRx/ZzcEqfSmJE+/6BnwWhO0bsthKgxJgJIMK/+ zxjRpy64X6H6JOyoJAx81qL4+NcK1SIxmty3DH8T+nIPBywUkd38uLLYoL8ckCfPzQiu sg3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=3wO2ZNDLw7Qy4/99qkVLUGCJbvw9hjA4iWtxjMpOpmM=; b=UUwynlUoE78c/nVKccCIfWnXG8TmLaWQpKZbIixQ1RIhyULf8ths4QQbRqME3wLCpt i8YOHPH80/eHALFsZKx+sqD7+Zm4i3VrvDKKnYIsV/3jDQpjx2QJPVHmHnrQWoaoNZJO Vdr2+nkwltFjdH+04wCfje/MW29MKgEOSJe6n1bdSQRF9BU6/sJ0h0xE9bD7XEHi4VWQ s0t4VIInYVWUquctphSnXhs6F4OvNC5HSnoV84/Yjc19yRTxu95cnzjnb+/3mIjem9L7 Lm4iuvFKpvczTJlMX3tja0vtkqDVFcPEA1a3qH6Ea+3hDn3p8PQRIHJPD/aw6ByEHAFk GpdA== 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 ec23si1673955ejb.575.2020.10.29.04.52.43; Thu, 29 Oct 2020 04:53:06 -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 S1725858AbgJ2LvS (ORCPT + 99 others); Thu, 29 Oct 2020 07:51:18 -0400 Received: from mga06.intel.com ([134.134.136.31]:49846 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbgJ2LvS (ORCPT ); Thu, 29 Oct 2020 07:51:18 -0400 IronPort-SDR: K9KMeXBIH5LPd66nPO9XhcYnJKV+SUN2ASkaBHqd0xxkI2utglbK8Y+B+17b8KZgk7EoRt6oyF lEt1Gl4xLxcw== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="230056668" X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="230056668" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 04:51:17 -0700 IronPort-SDR: tqxmH3YvnSIkn4qOpeh65alLfLY9lyzIJi1RBwJkNeFFecjaUULXWwjFgvmUBvkxkcf89WrvZD 7ZCnddrWNkVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="425027626" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 29 Oct 2020 04:51:14 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 29 Oct 2020 13:51:13 +0200 Date: Thu, 29 Oct 2020 13:51:13 +0200 From: Heikki Krogerus To: Sakari Ailus Cc: "Rafael J. Wysocki" , Felipe Balbi , Andy Shevchenko , 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: <20201029115113.GA2288851@kuha.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201029111303.GL26150@paasikivi.fi.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, -- heikki