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 11EC6C433FE for ; Tue, 18 Oct 2022 12:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbiJRMXv (ORCPT ); Tue, 18 Oct 2022 08:23:51 -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-spi@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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BFFEC433FE for ; Tue, 18 Oct 2022 12:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LWb3FHy20luVCRufG6POT4iWz2F+cyvDq57B6IN3yCI=; b=OomMMx8iC+/Xql XUEc9T7ybXMSnxXrfY0nIbpVOz3jhSSPUri9QcF/bPVX1/GoHTVpAdBAegK+lgJNEfnOAQeVLdG3L 3xXMPAoxxMeJN2kEphfcs9BjnHQh5Li4PBuKo5AS/pap55Mdy63FW2W9kopXag8CkhpqdGjBBoUlJ L6gW6fMxfZBhLtfyX7Tauxz+Q5rNnXfb7pwBI8Icig/kyO+mpJ5SwtX9pGiWfv009PaZ9cPo+ctH9 slstNuFFu0QcPjCoLM8+ClEoA59JUHWBT24kl4HgHXwTci0icRxdA0z4KTN7SRts6PZ/8fVIPgf9f b/epzs/Sue5tjR4HdQAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okldO-006apl-V8; Tue, 18 Oct 2022 12:23:51 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okldM-006apD-J2 for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 12:23:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666095828; x=1697631828; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1Bqc3BUNVg21trt++6fEDZWARJxHdRb9XbV3KjHO0Mo=; b=c1Usx24SGFA2HgstQArYaTk2jU3MczHsMYTxGxSlkRweJjkb69FeIk/A 6x5Cd4OdqwS9OuAlp92nxRB7TzS05Mf8W3A0o5R0RcNZeRIVLM5apfIof sGcYBantbBERhSl83aSoFeqN3wRdiG39Do2kVFo/YX/8VOJd6aJ8ierMR rNS3UUbr3KxARe96wMAXAjkjGNMFONkITwYIGBeg41XL8t3gQRPdtkTLu xB0i6y/9sdqj8J1/wcoQeF0zp1TJwGy+NHYhz1kNSzwGqIkV2Md8OrfeU 4lC3n/pYZ3PND9usvnxB+TQb44Sm/Kw+HjllBdvqmLlGZNbyg/LFHevxX A==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="303700358" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="303700358" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 05:23:47 -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-Disposition: inline In-Reply-To: <20221018101452.0000001c@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_052348_661781_53FB7736 X-CRM114-Status: GOOD ( 18.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel