Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1621491ybt; Thu, 2 Jul 2020 09:39:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwFyguOF009nKQT2UZh4Ja3mhLsyVDcB/GehCHyYBP96J/yTqmwI2Ux9+1RQWr+uOhynVq X-Received: by 2002:a05:6402:17f6:: with SMTP id t22mr37066703edy.141.1593707946933; Thu, 02 Jul 2020 09:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593707946; cv=none; d=google.com; s=arc-20160816; b=VqVCi1Z5Mu7t+T4ycpsnnS22LaniLH7lDWDsu9+i68BJosN6BUBNvZYIlXionPAYFJ 9g2D4aQtQOcc/UoX8oQci+gU0nztEbSb0Y/L6KsCGYGWO9CUHajpNH1xp/6KYstzN5UB CQURxhlBZERElWfcUvkwByR6mF0ybjdNC0vjQ9/95XSC9XP8SqS6hEsje9oOsjP3m9Er 1cqXfQEQVEwi6xBIcvPKZtN6qdpDGsYdpvyF9wW6lwTyIZnSEmQS1gTwVMZsi0xePlbx Z1dvSbWW+nql+jQs80h0zVfAj/R2jxFWP+ppEHJXcwxr9/rweFXxS3FP1jh0164j7BMA q6gg== 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=TyfZL9cyRsNj9adffycKhZaTedmiIZ//4jRiZUg6iVQ=; b=ATKvUBHqIyEZlSem0mvSJA0glhFx5pzv1dNkVeqwL8C8TctyKF9V1m0pPh/pdM4TQe D+J01IBR3wym8UNVq00vvEPUFngju/B/svNbeNDYx4rB/X0ccRpSNeZo3PCcFE4BpqbL c+9B9eIZue0eBPNfbYBl3j8SdiZhRQxK+VEoVDHM1y6nPhccKMWrzIKZjjy8akVU0ecz JwAVuLaFiG/KkCQOPpfmUafqiz0xoooKReq4N3mOad9RsgMeBRGtplhqMWJLO6ySTU2M WsW0VJ4dNBnU3pFCZPmU+tgJCXRqox2v60XSj76MjQTY4Sx2QpWIrRS3vrgabmMMxL1h Fomg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TSOdujBy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si6089571ejs.278.2020.07.02.09.38.43; Thu, 02 Jul 2020 09:39:06 -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; dkim=pass header.i=@kernel.org header.s=default header.b=TSOdujBy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbgGBQgr (ORCPT + 99 others); Thu, 2 Jul 2020 12:36:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:50436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgGBQgr (ORCPT ); Thu, 2 Jul 2020 12:36:47 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (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 463C320720; Thu, 2 Jul 2020 16:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593707806; bh=1ydFiyyVngUAcsAU9csrnJizTY4RtX1aoV1iBzBWUlI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TSOdujByBkyI0xINU2tkk0vhYTIWtDh73W4gCqhyvEaWlGwnx+IWwIaE24ysdf1Fj 9q1Qz83OusuUWT8nFFKHu4ErPQ+0Ikb7tT7v86bvJ+PvQY1tHAAOtOh1PdxhsiaXzk wF2H/sV/ZVyDVLypv6l9e5SKv/CIGCaoCth0ZtiI= Date: Thu, 2 Jul 2020 09:36:45 -0700 From: Jakub Kicinski To: Vaibhav Gupta Cc: Bjorn Helgaas , Bjorn Helgaas , bjorn@helgaas.com, Vaibhav Gupta , "David S. Miller" , Manish Chopra , Rahul Verma , GR-Linux-NIC-Dev@marvell.com, Shahed Shaikh , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: Re: [PATCH v1 2/2] qlcninc: use generic power management Message-ID: <20200702093645.13e0018a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200702063632.289959-3-vaibhavgupta40@gmail.com> References: <20200702063632.289959-1-vaibhavgupta40@gmail.com> <20200702063632.289959-3-vaibhavgupta40@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jul 2020 12:06:32 +0530 Vaibhav Gupta wrote: > With legacy PM, drivers themselves were responsible for managing the > device's power states and takes care of register states. And they use PCI > helper functions to do it. >=20 > After upgrading to the generic structure, PCI core will take care of > required tasks and drivers should do only device-specific operations. >=20 > .suspend() calls __qlcnic_shutdown, which then calls qlcnic_82xx_shutdown; > .resume() calls __qlcnic_resume, which then calls qlcnic_82xx_resume; >=20 > Both ...82xx..() are define in > drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c and are used only in > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c. >=20 > Hence upgrade them and remove PCI function calls, like pci_save_state() a= nd > pci_enable_wake(), inside them >=20 > Compile-tested only. >=20 > Signed-off-by: Vaibhav Gupta drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c: In function =E2=80=98qlcnic= _82xx_shutdown=E2=80=99: drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:1652:6: warning: unused vari= able =E2=80=98retval=E2=80=99 [-Wunused-variable] 1652 | int retval; | ^~~~~~