Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp386898ybi; Fri, 26 Jul 2019 11:24:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTsRBNP4NSwHiDUnUHrAzh1eGO4W+ALjw2q2jewD72zd4FAX50FNd46ZCLXR6KWGNyxONC X-Received: by 2002:a17:902:b603:: with SMTP id b3mr99056602pls.9.1564165484535; Fri, 26 Jul 2019 11:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564165484; cv=none; d=google.com; s=arc-20160816; b=nv+cagkMS96vTlRhj7wAgtZ3pcaIkblBd7oy0wOKujxcGGoGbJ6cgoqqltokox7ypb ugA64kEekqMfSlqpfR5T/bydIqNHw2Mgq10+Cu2T7bwSEryadSv5nWC/J2P1ycTzegi2 wI3nCwU4QEXazAOHKOsMdXV5LryX0WLMSfRmUnjIYbt8IzrfFdqAjKrEdA+rKfKfIBCH +rgWrWd4sckNWgxricmP0cdswN6+zuGX+gtqfvUslV1Ov7vJAb2gRbU0IHlHYcFuiFXq sY0uYP9wZd0WkS1vvpSSGpXn0K2Ube0zjRJdvqBrIdI6Cn6eCCp2BbxmfX8pe/yCCZ5Y bfAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=N+gOtV06mlf3tyZJvr7+tAXtUikuXVdPkzLqZXwkuFY=; b=xvJ00mlLpFO5IhTTNhFEQeJXCTOfAGUC8M4SapqYZRvoLEEfiqaor6QeFS1O344I3e CQDm72G3/l7FCd4ckO255nCS9SRtL3ktaAAO5H3f2yALqU92SVuHaY9GvcNAU0jpB4iI Lhjky48fH1ieZhNPOgd/msQYR+oFeNowaUni7CJ36NxqmK+X2FOqLcvH1WsExqFjwMio zDEWwmn/ZWO7iyaAFEX9QR/b6gdTNtJL//PtJJTpTniYZLNiBe7pyzBJL+QiR6msNpVT WrRMsdn1MR1ZpTCEFtIpwtHd+UOV3Crdne2uG7/zpYNbOk29zAnmoJMOYobQKctDAU3r dMXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v16si20475632pjb.91.2019.07.26.11.24.22; Fri, 26 Jul 2019 11:24:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728299AbfGZO5M (ORCPT + 99 others); Fri, 26 Jul 2019 10:57:12 -0400 Received: from mga12.intel.com ([192.55.52.136]:21416 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbfGZO5I (ORCPT ); Fri, 26 Jul 2019 10:57:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 07:57:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,311,1559545200"; d="scan'208";a="322058385" Received: from msmall-mobl.amr.corp.intel.com (HELO [10.251.154.62]) ([10.251.154.62]) by orsmga004.jf.intel.com with ESMTP; 26 Jul 2019 07:57:06 -0700 Subject: Re: [alsa-devel] [RFC PATCH 33/40] soundwire: intel: Add basic power management support To: Cezary Rojewski Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-34-pierre-louis.bossart@linux.intel.com> <0e439b41-503d-7ffb-827f-422d63e439eb@intel.com> From: Pierre-Louis Bossart Message-ID: <41f71476-4205-7982-9422-5d00e55c24d3@linux.intel.com> Date: Fri, 26 Jul 2019 09:57:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <0e439b41-503d-7ffb-827f-422d63e439eb@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/26/19 5:50 AM, Cezary Rojewski wrote: > On 2019-07-26 01:40, Pierre-Louis Bossart wrote: >> +static int intel_resume(struct device *dev) >> +{ >> +    struct sdw_intel *sdw; >> +    int ret; >> + >> +    sdw = dev_get_drvdata(dev); >> + >> +    ret = intel_init(sdw); >> +    if (ret) { >> +        dev_err(dev, "%s failed: %d", __func__, ret); >> +        return ret; >> +    } >> + >> +    sdw_cdns_enable_interrupt(&sdw->cdns); >> + >> +    return ret; >> +} >> + >> +#endif > > Suggestion: the local declaration + initialization via dev_get_drvdata() > are usually combined. yes, will do. > > Given the upstream declaration of _enable_interrupt, it does return > error code/ success. Given current flow, if function gets to > _enable_interrupt call, ret is already set to 0. Returning > sdw_cds_enable_interrupt() directly would both simplify the definition > and prevent status loss. sounds good, will do, thanks!