From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A6E7C433E8 for ; Mon, 20 Jul 2020 13:31:59 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ABC222CAF for ; Mon, 20 Jul 2020 13:31:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mlq7eiz4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ABC222CAF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3F90121505; Mon, 20 Jul 2020 13:31:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZTNlgCLXrYvY; Mon, 20 Jul 2020 13:31:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id AEDA32050E; Mon, 20 Jul 2020 13:31:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AAE52C089F; Mon, 20 Jul 2020 13:31:58 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69D3AC016F for ; Mon, 20 Jul 2020 13:31:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 58F9387B39 for ; Mon, 20 Jul 2020 13:31:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EJStCbsqHkqd for ; Mon, 20 Jul 2020 13:31:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id E25B1878A8 for ; Mon, 20 Jul 2020 13:31:56 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id t11so9035143pfq.11 for ; Mon, 20 Jul 2020 06:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iRMBvN5jV5opfKEhcuX/0MlxIGyzv8/E8aHaaJydPsI=; b=Mlq7eiz4SaK0rfAqdCqjDr42hEQvoG274qJTe2zE7Mv6gC3Gna3YwLIA8xR80HqFUt t3EKQKx4iZTEo8GDJ2w/Vt/E8lI45nprBlO/xShWM/4Ra2FY4ApMIjYCje9yfOPsdLkV Xin7heyCOU1xUA1gZtkFX5xA9eMY5/WnojDItX4m5yuOlP/i0EKBFUJqX76H5gAkjRb8 Z7cS36k2kxNetPOPNMXA/0fBFjTjeST2kT1t6BUy05TdFoaMcueg/ff2+xtcBzeiiy15 UJsMQ0iAq2WDGCxmw2osbdNdwX9BIoFjPukogrEgi65tPtC+Qxf9/tM6piLQMmL3/fLg wv3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iRMBvN5jV5opfKEhcuX/0MlxIGyzv8/E8aHaaJydPsI=; b=JPmD5S/fb4xb7YqjM7dCEgvLp37Rzs8fsfX4tr6k+kMmNHIl3H+/+wNxmPUc7mnpRv 9LXAnYZIARzsaTw7BKfdJ31DMnGcacaPNetDsc+YbLoq7+pPVGv6QCJBPviPameI31cL yB1f+G7/Qewd/mRowd9fe17vhH1O5pSnAYlDaUNOwCFR2FKmSiK0KWg9Qbc+3j4WaKfZ +tvj+nT0W0/K7AByVPx95kQnT0EE7LKdN+NiA1RH82w2bzLqRQrMa/2yDWcQspqjCuxf 2/a+9oZz+bGowLFB3gjKbAW454LCkGn6FuF3CBT3z1JbMwd4C3twelBvgy4NifTm3aAs osxQ== X-Gm-Message-State: AOAM533dSoN90ZjneYmMQb7xUaRIvlRh0SpUYg0q6wPj5xHBWnghwLnb AGL0iSl59QGqY7uWCnT8WKA= X-Google-Smtp-Source: ABdhPJzVz/Bv6kxUHBnTen1OKzAHUuO66oAoJVsdPcd58bfNooMisDb7Yt+pYNjM4kUjko8g69Ta3w== X-Received: by 2002:a65:5cc7:: with SMTP id b7mr18837690pgt.445.1595251916416; Mon, 20 Jul 2020 06:31:56 -0700 (PDT) Received: from varodek.iballbatonwifi.com ([103.105.153.67]) by smtp.gmail.com with ESMTPSA id t5sm14814356pgl.38.2020.07.20.06.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:31:55 -0700 (PDT) From: Vaibhav Gupta To: Bjorn Helgaas , Bjorn Helgaas , Bjorn Helgaas , Vaibhav Gupta , Jens Axboe , Joshua Morris , Philip Kelleher , Damien Le Moal Date: Mon, 20 Jul 2020 19:00:01 +0530 Message-Id: <20200720133002.448809-3-vaibhavgupta40@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200720133002.448809-1-vaibhavgupta40@gmail.com> References: <20200720133002.448809-1-vaibhavgupta40@gmail.com> MIME-Version: 1.0 Cc: linux-block@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, Vaibhav Gupta Subject: [Linux-kernel-mentees] [PATCH v2 2/3] rsxx: use generic power management X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver has not defined .resume(), hence define it as NULL. Change function parameter in both .suspend() to "struct device*" type and mark the parameter as "__attribute__((unused)) " as the function body is empty. Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/block/rsxx/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c index 10f6368117d8..866153fd380a 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -1030,12 +1030,15 @@ static void rsxx_pci_remove(struct pci_dev *dev) kfree(card); } -static int rsxx_pci_suspend(struct pci_dev *dev, pm_message_t state) +static int __maybe_unused rsxx_pci_suspend( + __attribute__((unused)) struct device *dev) { /* We don't support suspend at this time. */ return -ENOSYS; } +#define rsxx_pci_resume NULL + static void rsxx_pci_shutdown(struct pci_dev *dev) { struct rsxx_cardinfo *card = pci_get_drvdata(dev); @@ -1071,12 +1074,14 @@ static const struct pci_device_id rsxx_pci_ids[] = { MODULE_DEVICE_TABLE(pci, rsxx_pci_ids); +static SIMPLE_DEV_PM_OPS(rsxx_pci_pm_ops, rsxx_pci_suspend, rsxx_pci_resume); + static struct pci_driver rsxx_pci_driver = { .name = DRIVER_NAME, .id_table = rsxx_pci_ids, .probe = rsxx_pci_probe, .remove = rsxx_pci_remove, - .suspend = rsxx_pci_suspend, + .driver.pm = &rsxx_pci_pm_ops, .shutdown = rsxx_pci_shutdown, .err_handler = &rsxx_err_handler, }; -- 2.27.0 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees