Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp944297ybg; Wed, 29 Jul 2020 01:35:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWVcSOcEK1pWZHcMYUyQY51xRjViT+kimq9oB+m2OAtkW+YeyGS5jOD5bIGOdbIhvKfYbq X-Received: by 2002:a05:6402:150e:: with SMTP id f14mr17600213edw.39.1596011726384; Wed, 29 Jul 2020 01:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596011726; cv=none; d=google.com; s=arc-20160816; b=fXhH1SHQ2R/JA5ZcF9bkHaENHXgEUgBoHD85+ZWUes/r6JTY71BDgKSQ++w0JHKxYU Ls3PRF/FkESWbfGh3nR9XQDwOOdeJf725vkWHd/KUAgfWB07NnedKi8JDPcrMgsAvL5A uh7z3NQ1KhU+GDqE+dwEePcozi6AcUIeLm0rN2giJaBLWf5CJ0z98i+5H7Sl6G+Hrvte YMw2ipMFdF/vLugKOqcqa7jRiy2x+CiVmc1UypUtlfBZXdbXBZwv9me+Puk6djoky2yD K4e5HWmX2qH9/zwrqTWoUQDCP+HqS4YsMHqgN+L5cZtHNCUxYseL8QYm/h5GEEsWsOn9 2ObA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=9/H2oUKiP+sDMKWMGdgi7/PQRowMu6wRmVzbyHtY3dI=; b=ECJicYYYrM7V6v+YyS0hK2kdlih5uygq002T0iIB1eCe7S2/qz8Zd1lGx5jCXAKCnh PXRS/pUHLdcTCERtbHd7JIxOkbK3U9SlX/vxd+mx+pjOg0I21Qe2tr02HMP1rjPMJioQ TW/On0a0O2JjeWU5gO9Mm3aDw5EhkIQnh/UzY18a9o7/PsfF7lsZYJ7zvW9h4x7SqjaN A/IkEdiV/3aLTk/LgnzZym2KWItjGwalHZjAWVVn+BwpZ1xYXBgU9udm5d4ds9LY0pXz 87G1OZn3u5tLzKA61GUX/s93fhP04C9XqUTyOX61t14DpLhozFZI0Ki9lR5MW9TyJtD5 0d5A== 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 t26si693341ejb.695.2020.07.29.01.35.03; Wed, 29 Jul 2020 01:35:26 -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 S1727824AbgG2IeW (ORCPT + 99 others); Wed, 29 Jul 2020 04:34:22 -0400 Received: from mga11.intel.com ([192.55.52.93]:14119 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgG2IeW (ORCPT ); Wed, 29 Jul 2020 04:34:22 -0400 IronPort-SDR: /+XJbQt/T6tcFpCeWg+5/d4dHC8NcwjkdX1TUeObzaWLJN4bH+zftm8OnzUed8fCBpEyeD0oKG 2q/Y0TrQCKbw== X-IronPort-AV: E=McAfee;i="6000,8403,9696"; a="149222005" X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="149222005" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 01:34:22 -0700 IronPort-SDR: cFBSlrGGkxa6jxqb+55m7agHATOc8LcEqIQlJNuSctxMrRbTYWYzc9VeSPrVATEVjPbTnrUsxK psHxcvAvnoxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,409,1589266800"; d="scan'208";a="330331689" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga007.jf.intel.com with ESMTP; 29 Jul 2020 01:34:20 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1k0hXX-004eYT-Lu; Wed, 29 Jul 2020 11:34:19 +0300 Date: Wed, 29 Jul 2020 11:34:19 +0300 From: Andy Shevchenko To: Maxim Kochetkov Cc: bigunclemax@gmail.com, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set Message-ID: <20200729083419.GM3703480@smile.fi.intel.com> References: <20200729075908.10463-1-fido_max@inbox.ru> <20200729082128.GJ3703480@smile.fi.intel.com> <5bfad7df-ee64-f94a-003b-06320b9fad0f@inbox.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bfad7df-ee64-f94a-003b-06320b9fad0f@inbox.ru> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 11:26:51AM +0300, Maxim Kochetkov wrote: > In case of CONFIG_PM is not set: > > static inline int __pm_runtime_suspend(struct device *dev, int rpmflags) > { > return -ENOSYS; > } > > and ads1015_read_raw failed at: > > ret = ads1015_set_power_state(data, false); > if (ret < 0) > goto release_direct; > I see. Please, elaborate all this in the commit message for v2. P.S. Avoid top postings! > 29.07.2020 11:21, Andy Shevchenko wrote: > > On Wed, Jul 29, 2020 at 10:59:07AM +0300, Maxim Kochetkov wrote: > > > To stop conversion ads1015_set_power_state function use unimplemented > > > function pm_runtime_put_autosuspend if CONFIG_PM is not set. > > > If CONFIG_PM is disabled, there is no need to start/stop conversion. > > > Fix it by adding return 0 function variant if CONFIG_PM is not set. > > > > I'm wondering if you check the real code (assembly) for any difference. > > > > All calls AFAICS are statically defined in !CONFIG_PM case and compiler/linker > > should be clever enough to drop this completely. Isn't it the case? > > -- With Best Regards, Andy Shevchenko