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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 80004C433C1 for ; Wed, 24 Mar 2021 04:00:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CC3B619BB for ; Wed, 24 Mar 2021 04:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbhCXEAZ (ORCPT ); Wed, 24 Mar 2021 00:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhCXEAY (ORCPT ); Wed, 24 Mar 2021 00:00:24 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7781C061763 for ; Tue, 23 Mar 2021 21:00:23 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id kk2-20020a17090b4a02b02900c777aa746fso479804pjb.3 for ; Tue, 23 Mar 2021 21:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BvjxiqCyLdjZ9DE+rOSxQSIjsWumbqejyQY6hWGvjNk=; b=crP6sIAcefYbLFDARXUCZMUyNIqN1JlvND4DSJl8yHy4TTHdJEFdeIMdpABGT1HyIJ EOLjlDbC7VW3yHANayiDy3FNECnf0N8tw42pnpsZmjY5KwiRrrnoY7O5BLwjotpdHuVA XCNWRZRoXLL0k2OWAuI9KzpBleZiKJ4TbAxjxwMWZk8n5DSdVnKZlXyvP43lCKDNmxwL XYLz9HqgLiFjv9ncs45yNb/zBHbC1T5xTlDgvMmIXpwzwL0CvEIbrgSamcoUCOpNGXZi Hdf3gtvFgcU1YcxrfkVu1iRHP3bRHyRuOpg2eElzk+FEspGwVxACBJY+2X0gPlwLDvZz LEag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BvjxiqCyLdjZ9DE+rOSxQSIjsWumbqejyQY6hWGvjNk=; b=n4pWr3ULrlIFoyJG1ZdGhH3zirN5V/2CRNHtTe6YK9c+NLXC9jNmKhysJXctC4SdWs hqGXrueSsrrmAFZ0DsBgcArNWJ5/F03KOwv4Z2lao5aVOeFPwHvAdM5imT3VW5IRkPtm SQjSXvfwu0DBkwUZJtt0B+Tz6dmBPXe1QexduIzYbKUj4KYQYnEx05Gkiw0AkGkSqvSB xP4U8GZptQmxKZ6SYOGmArmYkd1a9ce4RDV+tHuNBH8Q2zTTVEcd1s/fn3hc8jkewuIv ZISJ/C+LPAiWaah0OFKS5tlL9m65Ezc1wy2B/1mfDuxJuv9TRRQYsd3NPtSClpMZWF2/ BoFg== X-Gm-Message-State: AOAM532EG6PmQYrSoZ4Wzuq2NhFuyM0+UTKRFU18DqdL5KpqOQayIBg7 JvG945ACgo/s3IjnJjffKQMZrA== X-Google-Smtp-Source: ABdhPJwI2dszTqiKaLfPxR18AlS5ErZh9EuAODw3IWfiwB4FKr8rgVC6CGU29eIHfVCARaE9zOAuIw== X-Received: by 2002:a17:90a:f489:: with SMTP id bx9mr1328740pjb.80.1616558423289; Tue, 23 Mar 2021 21:00:23 -0700 (PDT) Received: from localhost ([122.172.6.13]) by smtp.gmail.com with ESMTPSA id 14sm582900pgz.48.2021.03.23.21.00.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Mar 2021 21:00:22 -0700 (PDT) Date: Wed, 24 Mar 2021 09:30:20 +0530 From: Viresh Kumar To: Jie Deng Cc: Arnd Bergmann , Linux I2C , virtualization@lists.linux-foundation.org, Linux Kernel Mailing List , "Michael S. Tsirkin" , Wolfram Sang , Jason Wang , Wolfram Sang , Andy Shevchenko , conghui.chen@intel.com, kblaiech@mellanox.com, jarkko.nikula@linux.intel.com, Sergey Semin , Mike Rapoport , loic.poulain@linaro.org, Tali Perry , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Bjorn Andersson , yu1.wang@intel.com, shuo.a.liu@intel.com, Stefan Hajnoczi , Paolo Bonzini Subject: Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver Message-ID: <20210324040020.xazfou6wgvvh74gs@vireshk-i7> References: <226a8d5663b7bb6f5d06ede7701eedb18d1bafa1.1616493817.git.jie.deng@intel.com> <20210323072704.rgoelmq62fl2wjjf@vireshk-i7> <3a671a0a-b0d0-be1a-5463-8124ff63684d@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a671a0a-b0d0-be1a-5463-8124ff63684d@intel.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On 24-03-21, 09:17, Jie Deng wrote: > I didn't see the "struct virtio_driver" has a member "struct dev_pm_ops *pm" > > It defines its own hooks (freeze and restore) though it includes "struct > device_driver" > > which has a "struct dev_pm_ops *pm". > > I just follow other virtio drivers to directly use the hooks defined in > "struct virtio_driver". Right, I think we can't use the SIMPLE PM OPS for virtio yet, the core calls only the freeze and restore callbacks which are part of struct virtio_driver. > For this driver, Both __maybe_unused and #ifdef are OK to me. Yes, and so you should use only #ifdef here as Arnd confirmed. You shouldn't be using __maybe_unused as there is nothing confusing here related to the macros. -- viresh