Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12042695ybi; Fri, 26 Jul 2019 03:52:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwH/QVB0g3pz8AiTwQ4kPFbvg+fa7z7CRDc6MRqeUub2RVYprK89BS+WbUZdUdG2CNp7RKd X-Received: by 2002:a63:c442:: with SMTP id m2mr92219495pgg.286.1564138379670; Fri, 26 Jul 2019 03:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564138379; cv=none; d=google.com; s=arc-20160816; b=TOWTrkULa5VX/xUcr5/eeZacTI2tZwR/MDxs1achu6ioJI6sJ+v3mg/3VmehlnYGsN UrwbB8tW2uq8hv0LKiu65RghIyGP9KCz9kbWG05PF1LzxvRWZ32JmmfgT5Qz5waIfdMv RItKJzKLJUtA1Cwgt2u7juM/Dmx3YbE+mpNVrB3wH8jmJRc4M4zDv7MUhQw/IWBxqsRB PQbZ9Xpy0QhiLr0DrWEdFQhcQmgdBAzwBnfCUFb6TrdUjhHId0uckU3g4qF4KnKaecjG 0V2Bjo6XKrw2i7i7NJ6P9cKFERQAPDzE/IcVleP6i7CbuK7qfyE74/cSL1RiiER+YMK3 dgkA== 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=Y5usMSzRtvZ5cCd4FfZhjl/iibYyNtAMfIJ0aIXxc30=; b=u39lvugD9LM6MWWbffjb+J1BbD0HDLjbXvdNKNaNlsOSc4zi4Bwr0KrGmKcg+IKi9j BZ3PHueIACd5oOSzS0rYlssvDHs0Rhp2PjgZMJK8ogopQMB3+tNySd8go5Hx//UV+Ave 6RUxo22dTzg73J7lqV/k2NrP5hvY+QeSSi+JVtGjaoK4oAVOQWjLIl3mu2ukrut7gKlP QJsDB6kTacYWYo+AMZ/54SuU8o/xyHtFZkiuK+nEPZ0WVjO2umn+JW70cwjGXbfp5bY6 XfI9izFGQDC1oSG1C4P7ChvK2zc5QvAtqzejT70KUKewimnzP61yHFc6RDT7d5ALF3SX b/cw== 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 h129si21506511pgc.508.2019.07.26.03.52.44; Fri, 26 Jul 2019 03:52:59 -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 S1726701AbfGZKuq (ORCPT + 99 others); Fri, 26 Jul 2019 06:50:46 -0400 Received: from mga04.intel.com ([192.55.52.120]:31843 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbfGZKuq (ORCPT ); Fri, 26 Jul 2019 06:50:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 03:50:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="175559636" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.251.89.116]) ([10.251.89.116]) by orsmga006.jf.intel.com with ESMTP; 26 Jul 2019 03:50:40 -0700 Subject: Re: [RFC PATCH 33/40] soundwire: intel: Add basic power management support To: Pierre-Louis Bossart 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> From: Cezary Rojewski Message-ID: <0e439b41-503d-7ffb-827f-422d63e439eb@intel.com> Date: Fri, 26 Jul 2019 12:50:38 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190725234032.21152-34-pierre-louis.bossart@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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.