Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4032416ybl; Mon, 3 Feb 2020 11:12:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxB+yFaP6zpu60C5ajF/NP7FIDKZioPy5pZ7iAK2FPBwyBzczgv8cM5hiq1f8XSgFj0b3+x X-Received: by 2002:a9d:12a8:: with SMTP id g37mr19346451otg.261.1580757164350; Mon, 03 Feb 2020 11:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580757164; cv=none; d=google.com; s=arc-20160816; b=GDrlRctDNGxk10otlqMuEXvfSEHp/JEfFJTVbDmzbHlQZAga21sWWGD7s2iyeTTTIK apj8lympmHW+GD/wog705IBWxBh6fI46jEhnvUs4GdmeUXDN9Q1zcl43ROJ/Mcqy3aqp VgLdVCif5afzd73207vh02rDHNaZkIZlLi25s1DTY0mzwhvKD0H+yiCi4PvoSzpsrS3c sQy7LywkUa4sDnagww4Y6PMjoZ7tJmqB2wzkHdkvvhLK/PuenMYNySLQGRf7XZatN8hl h3O0dgLHBf0Jt10DAODVMZxYftNgsQWrNr66pbrKrEgnJkqdfBs8+AqhXDjrFlV9cdsA YrLQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Tmm9D5m0dKX3CtTXrWwya0smoSFTIyMTj23uzqOJPP0=; b=BU/ub6mK+DhOIUeyjrfnM0D8xl8OnnHU1E/S/GgfzW+iglHAcPoqFvlMKukygHeE0A jMyUyD3/tR7NI+rlpcXF0oK9siJXLU2zFOWU+0TlbWYeLIhYgW6PTEofOIn60ucjj+g9 d+Z+OmudMCHP0VLRZgPP+fS19P2UjKY+DxHmd67jSbK+pOezIqglnjlya+/S9L54yqN+ DT1xJmUmv7V8L8pJpVFhiESH8iZdaOgqMJJZVM47dBR9em5rJ/tTmsAp6sfuSXBW7Ny4 BnEvIY2eSRTK4Z+6ZC5QrLi91Z2tPerg8Js1IyEBBsxXWvfYfQSPAIIz9PF8lRKsD0LS Pa0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oE5qAGil; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si9795930otr.284.2020.02.03.11.12.31; Mon, 03 Feb 2020 11:12:44 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=oE5qAGil; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729117AbgBCSM1 (ORCPT + 98 others); Mon, 3 Feb 2020 13:12:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:60398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728923AbgBCSM1 (ORCPT ); Mon, 3 Feb 2020 13:12:27 -0500 Received: from cakuba.hsd1.ca.comcast.net (unknown [199.201.64.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A13E20838; Mon, 3 Feb 2020 18:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580753546; bh=tH6dP23ZG3e+YLC5mCuex7PfxrZNkerudkAeVfo+pl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oE5qAGilLaW9mCzANqQgSJ3jBpU6l2B5z5t/ca7onBU+OrshiNGwRDwhJEEByv42z 54+KEShdG/OzwcosnBauKyLCVxBgWufiyXvrTGj3sbX7YDuOoFUAA9BHUlLf1fiytH krWRFSQtXgsK36yDnRWnJE3jidGeQImbAbtUCVNU= Date: Mon, 3 Feb 2020 10:12:25 -0800 From: Jakub Kicinski To: Manivannan Sadhasivam Cc: gregkh@linuxfoundation.org, arnd@arndb.de, smohanad@codeaurora.org, jhugo@codeaurora.org, kvalo@codeaurora.org, bjorn.andersson@linaro.org, hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH v2 14/16] net: qrtr: Add MHI transport layer Message-ID: <20200203101225.43bd27bc@cakuba.hsd1.ca.comcast.net> In-Reply-To: <20200131135009.31477-15-manivannan.sadhasivam@linaro.org> References: <20200131135009.31477-1-manivannan.sadhasivam@linaro.org> <20200131135009.31477-15-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Jan 2020 19:20:07 +0530, Manivannan Sadhasivam wrote: > +/* From QRTR to MHI */ > +static void qcom_mhi_qrtr_ul_callback(struct mhi_device *mhi_dev, > + struct mhi_result *mhi_res) > +{ > + struct qrtr_mhi_dev *qdev = dev_get_drvdata(&mhi_dev->dev); > + struct qrtr_mhi_pkt *pkt; > + unsigned long flags; > + > + spin_lock_irqsave(&qdev->ul_lock, flags); > + pkt = list_first_entry(&qdev->ul_pkts, struct qrtr_mhi_pkt, node); > + list_del(&pkt->node); > + complete_all(&pkt->done); > + > + kref_put(&pkt->refcount, qrtr_mhi_pkt_release); Which kref_get() does this pair with? Looks like qcom_mhi_qrtr_send() will release a reference after completion, too. > + spin_unlock_irqrestore(&qdev->ul_lock, flags); > +}