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 A5D33C433FE for ; Mon, 17 Oct 2022 17:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbiJQRgE (ORCPT ); Mon, 17 Oct 2022 13:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbiJQRgD (ORCPT ); Mon, 17 Oct 2022 13:36:03 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A8706D54C; Mon, 17 Oct 2022 10:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666028162; x=1697564162; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/uKydgYhq3g5ftCl7FE1BcNYAbz9De0+pyZNa+RAaXk=; b=FPnmt2qvwZwiX+VmdCDd52Fwn93hnZ+9HtZp1i44Kl8LxsxpWdkRWrI9 +p1mmKoAqqJgDFlOaXtS9xfaoct5djSEHjMJVSYw4vcdpiiJnBwb3IGVS hLhJdRzgX9EHI+RSIvhN0oFgmnBJ7p/7iQfEaSVkGnrn//Sc1yt9XPRFz lTbGMoflrdB88DXMDILjBgDhLS6smf/izsxwEAzaIVILC48RKEWhMzGId AvxbHVQVm+NKo8+oEBg972fnV1r0XGVaPW0VjG+mpUH14UGnhGQGc93R1 06E28SSXn/FE/UI6FHktiNJlHrNV5VENZTKS7CxVScuWCV+thl/8ZohZJ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="307527670" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="307527670" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 10:36:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="717577923" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="717577923" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2022 10:35:59 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1okU1u-008wcS-0J; Mon, 17 Oct 2022 20:35:58 +0300 Date: Mon, 17 Oct 2022 20:35:57 +0300 From: Andy Shevchenko To: Mark Brown Cc: linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Mon, Oct 17, 2022 at 06:19:53PM +0100, Mark Brown wrote: > On Mon, Oct 17, 2022 at 08:12:43PM +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. > > Are you sure this works cleanly and doesn't suffer from similar problems > to of_match_ptr() when PM is disabled, leaving some unreferenced statics? Yes, this is the trick with PTR_IF() behind it, which is not used by OF code. -- 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 BA6C8C433FE for ; Mon, 17 Oct 2022 17:37:02 +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=ISO7GsLbgC7NyiwupTUfRn9bqkSBFvZ+tHS09wPwq8E=; b=YcvpZGDZ08il1r hKn/KBfsFrllQtrE4YES0Ek+V4KizgZQNEkAnErJOhtRvz2GHfUpW7nk8x57jqLuc2iOOY3JqSeG/ 1i9bknw3SpfWJQDD2qCohev45wvSEgWgEEizlSXJYse7qhxRilqtoTAJ+a8UgVmuF+fNHBvgDfZxj 5dRCTusZs2hD27Ub1/Pwoy3qWVNMcn9YqLUQBBWS6fGHd3RM44m1Q1Tvfeqo1a2AxcUuuRtZYsycl AfROxh041QAJfeN8yb2habyEmSrSYiXWSk+OUoVlNiVv/Uagmd2ern4ayS5eUdj8ri9srTfdkLML8 WgJ76++vkoL3bkMbktnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okU23-00E2YD-LE; Mon, 17 Oct 2022 17:36:07 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okU20-00E2X2-OD for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 17:36:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666028164; x=1697564164; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/uKydgYhq3g5ftCl7FE1BcNYAbz9De0+pyZNa+RAaXk=; b=fPOYZi0bSP2zkC8J4ordglFr78OtC5i++xhZyTqGJ/NSwwoKqGIGdGrs /HeyFy1pQLzedAJCjcxVZOTwBrlzXY/6IuTRQ0AJRFFCyHCfxW1deemmG ICSBVQ2dnJ/s+q08NCfF/j+WbNi007bL35aRCLstZgPms2xfMYg0eJjQ/ XDiyUF/EmYNbCJCy52XxYJZ4OjrTkWQK32e+8dk7BCiT2AWFErr/SvHes 2RGTkFWKR7j0Mtq5Ihcj0g5psYJpsZF/CwDY6yudnb1U08lGY5uYw5IEA KH5i5/JcP5G7lGirSuzxlAhcKpc23J7V2y58JuOecKNCVBBWh3HA2S023 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="285591130" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="285591130" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 10:36:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="717577923" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="717577923" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2022 10:35:59 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1okU1u-008wcS-0J; Mon, 17 Oct 2022 20:35:58 +0300 Date: Mon, 17 Oct 2022 20:35:57 +0300 From: Andy Shevchenko To: Mark Brown Cc: linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20221017_103604_826258_BD826BC8 X-CRM114-Status: GOOD ( 14.27 ) 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 Mon, Oct 17, 2022 at 06:19:53PM +0100, Mark Brown wrote: > On Mon, Oct 17, 2022 at 08:12:43PM +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. > > Are you sure this works cleanly and doesn't suffer from similar problems > to of_match_ptr() when PM is disabled, leaving some unreferenced statics? Yes, this is the trick with PTR_IF() behind it, which is not used by OF code. -- 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