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 DBD2BC4332F for ; Tue, 18 Oct 2022 12:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJRMXw (ORCPT ); Tue, 18 Oct 2022 08:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbiJRMXu (ORCPT ); Tue, 18 Oct 2022 08:23:50 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85F9175BC; Tue, 18 Oct 2022 05:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666095827; x=1697631827; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1Bqc3BUNVg21trt++6fEDZWARJxHdRb9XbV3KjHO0Mo=; b=kvbI1oe0G+NadwBoV/oNi4DQlIOjHX3fm4mY9aQnQQuykF5SPMNF5M/U jPF5QHknEhZRR5qt9MTxjSiamFkQxb/g1C8wSIVGayBeC2HWH9hQgIZgT gsuAG5d5iHfv9AhEy+SBoPehznoa33YMcAKd4grZ/raLB3rHmjlu8CVF+ J+742/zNbfRo9Tr80sXNnBMrPqScxS4i1CLVlid23eMOh9ejU5lGJorMb N1CB8+2nm+JcY6oe5a3Ogi5GiGDtUuQtC9RNpaW+c+8ewkNy0B6Ofe9HJ fvuzsAvKzdrYF+qvKlqY4pu2+fyohWpyAdPOTQxVRBkGJlEerUFQnAnRo g==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="307172601" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="307172601" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 05:23:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="659765811" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="659765811" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 18 Oct 2022 05:23:44 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1okldG-009Lxb-2g; Tue, 18 Oct 2022 15:23:42 +0300 Date: Tue, 18 Oct 2022 15:23:42 +0300 From: Andy Shevchenko To: Jonathan Cameron Cc: linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: Re: [PATCH v1 6/6] spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() Message-ID: References: <20221017171243.57078-1-andriy.shevchenko@linux.intel.com> <20221017171243.57078-6-andriy.shevchenko@linux.intel.com> <20221018101452.0000001c@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018101452.0000001c@huawei.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 Tue, Oct 18, 2022 at 10:14:52AM +0100, Jonathan Cameron wrote: > On Mon, 17 Oct 2022 20:12:43 +0300 > Andy Shevchenko wrote: > > > Cleaning up the driver to use pm_ptr() macro instead of ifdeffery > > that makes it simpler and allows the compiler to remove those functions > > if built without CONFIG_PM and CONFIG_PM_SLEEP support. > > > > Signed-off-by: Andy Shevchenko > FWIW I like these - so drive by review. > > Reviewed-by: Jonathan Cameron > > I think you could change the handling of !pm_runtime_suspended() > to use pm_runtime_force_suspend() and equivalent for resume path. > I haven't checked that closely though - just looks like a typical > usecase for those functions that are hardened against some of > the corner cases that can occur in interactions between different > forms of pm. Thanks for an advice. Wouldn't it be matter of a separate change? -- With Best Regards, Andy Shevchenko