Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp572634ybg; Tue, 28 Jul 2020 13:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL6Kt82pwKnwBqvCoyx44K7mIqX8gx2b22ZpJjXo8QjxCndSSoa/2JP96HW6hzc1L1KqBl X-Received: by 2002:a05:6402:1bc1:: with SMTP id ch1mr19244651edb.142.1595966893448; Tue, 28 Jul 2020 13:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595966893; cv=none; d=google.com; s=arc-20160816; b=YqoIqpjOi70hBHh3/jSaPAr3d1JPhQIK8op8MzmE6zMEEuFJJMPsLgTdxKXiEHsff4 euwmViWC6O9UGm6RI0s7TSXfTVPOPLbDljH+EEKzRQ3h7WXu+klUyhQv0pneV/H2upew I4bCP5Us9ePfEoxSwro8rYHwJ2KqNzIjqfsv6CbFmFctz+8gFhMfsbPMQ4et93oynmL6 Vs+NgTSasO+TKtBS2DqCQ8H/1EINQQ4yiIqGoSKJLlbA5SWhQOQBYEkrg75xElLiWz7j 2TG6NCxnkVR9bUuiKGvV5NEPEplQ9iDC87fq7Tuwr3bLxvRN/Mf1VB9aJJXcaleH2H0U in3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=SsNbrsyl4KypQelFZ5bAdU/KzTfJRh9JSUXG+nQXVMc=; b=smZz4idXYMAAvHIydHaPoL2GZu4ucaIVENogYf68WGVa3hhn0qgJe3UnqWkplTmzN2 hMnZMnBOh+xmibcF2ojjmoiDG8nRNXo8fnpyBLh3M1WOq3ZErjk0S0uPB42bxowrsJtN XYCWSr7rsCF6Da2HBEQHxT3YL5AcPHk8IiILV0H/66e7AOlSnP1PWdge8HFsq6YlmwYQ Bv1LL4PnJGGs85UyveRRXLJR9ldTq9I9wVLaMTZlFH2MpFsftXn68ZIt9nDhBSxyuMct zj3xj3Zmh9w17YmErtmhiOCddh6dIk2fyUZ0nK8+vWPKDUl+leqhe0n167+jkRjLLGLC w6hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VbcJ1DiA; 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 b6si8808329ejb.293.2020.07.28.13.07.51; Tue, 28 Jul 2020 13:08:13 -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=VbcJ1DiA; 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 S1729006AbgG1UEQ (ORCPT + 99 others); Tue, 28 Jul 2020 16:04:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:40684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728050AbgG1UEQ (ORCPT ); Tue, 28 Jul 2020 16:04:16 -0400 Received: from localhost (mobile-166-175-62-240.mycingular.net [166.175.62.240]) (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 2BEF22065C; Tue, 28 Jul 2020 20:04:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595966655; bh=HK9+5a3U0dOMIeI24gLVh05vN2DyqhK9yZq8rvNgwyk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=VbcJ1DiA/1z3TFiwQzadcYJoGqKMQKFyWA1TZUuqLqRlwKX7rO/akEgvZGFokCMRN iLc4KnCOvB22INR4XqzgZ79U+P8DSSsYd91wqgoXQ8UKR2Df3eTCb0c6hwoutzkPkZ ON8qZGEOWQxNKLvHnqbEdOo7ywhzhaXU+mgzxvJ0= Date: Tue, 28 Jul 2020 15:04:13 -0500 From: Bjorn Helgaas To: Vaibhav Gupta Cc: Bjorn Helgaas , Bjorn Helgaas , Vaibhav Gupta , "David S. Miller" , Jakub Kicinski , Kevin Curtis , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan Subject: Re: [PATCH v1] farsync: use generic power management Message-ID: <20200728200413.GA1857901@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728042809.91436-1-vaibhavgupta40@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 28, 2020 at 09:58:10AM +0530, Vaibhav Gupta wrote: > The .suspend() and .resume() callbacks are not defined for this driver. > Still, their power management structure follows the legacy framework. To > bring it under the generic framework, simply remove the binding of > callbacks from "struct pci_driver". FWIW, this commit log is slightly misleading because .suspend and .resume are NULL by default, so this patch actually is a complete no-op as far as code generation is concerned. This change is worthwhile because it simplifies the code a little, but it doesn't convert the driver from legacy to generic power management. This driver doesn't supply a .pm structure, so it doesn't seem to do *any* power management. > Change code indentation from space to tab in "struct pci_driver". > > Signed-off-by: Vaibhav Gupta > --- > drivers/net/wan/farsync.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c > index 7916efce7188..15dacfde6b83 100644 > --- a/drivers/net/wan/farsync.c > +++ b/drivers/net/wan/farsync.c > @@ -2636,12 +2636,10 @@ fst_remove_one(struct pci_dev *pdev) > } > > static struct pci_driver fst_driver = { > - .name = FST_NAME, > - .id_table = fst_pci_dev_id, > - .probe = fst_add_one, > - .remove = fst_remove_one, > - .suspend = NULL, > - .resume = NULL, > + .name = FST_NAME, > + .id_table = fst_pci_dev_id, > + .probe = fst_add_one, > + .remove = fst_remove_one, > }; > > static int __init > -- > 2.27.0 >