Message ID | 20230419084817.481136-1-d-gole@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp242206vqo; Wed, 19 Apr 2023 02:22:18 -0700 (PDT) X-Google-Smtp-Source: AKy350ZWkZRmj0A4PcHv9lqa9jUpVyqZYuz6BQLf8urDSYKQ5kOeGRS/ouSX1g9xKuzji60mFcxL X-Received: by 2002:a05:6808:1923:b0:38d:ec65:aa85 with SMTP id bf35-20020a056808192300b0038dec65aa85mr2920550oib.19.1681896137859; Wed, 19 Apr 2023 02:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681896137; cv=none; d=google.com; s=arc-20160816; b=w1iIGd9YiJw/r5tsA8Rq+t8nMX8o0MxJTDldH6Y0hG3VC7JnJC2EC938GHn0HIFWO4 qaRH24GHsBrwqX2GRlB7M+21A80wPUKpWvfGHVl8ZKE7blZcoEcsnrjaGM+JLeW/LSdI tMNi89KllMqXtE8UyAZ2LjnS/WLCDCcjNC+gxau9uyVxWEYHqjF9ekvJ4F/oK39L/nLk /MmUkJs0TcX+GCY1bbsxsT32Ddo9MdAcdhjkByxcJZtwS+z1h0d5cIxDAbs62n/amxOV E0obgR97oxVB1OtWA5Qi7YnGfZQRrr99/f7a1San0J3OkkBIPz0k61PfPOB706M1feYP Wyqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XbEtFK+H4/7qsl0ppFWnJWa8nE2+A+lGhJsRSLRMsZI=; b=YcismkIJY038aVSEoLBlewCzkMGXaHJVI8h5e7v52eIpT/0BrqEDRxDa55Xs6NiIGi qVQ9LhceQcNGiiKmEHu6x3amcnUgnRD8CeUNSgaoPJ8jMoaOO1HkHdo2yMedmHk0ysD4 qMMWMAak6Wh9HvplVXfAxCgzQhHUfHxlonN+mEJfnYAHj2hgDBVD4Ib/m+C0594Nt181 IHI3X+fcSevUXAb5rKEETQRAGyR3wBpAkIZVq+F3w8MA3Q5RaLH+EqonmI3TEaAxGQ1t ycQ8DfWgJJlem+uHDWa3mHEeVOhPwHF07yFQ+CUMZbfCoR4mSycud7zJNc8xDdJhoFV8 Mv9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X05IcQo6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r127-20020acac185000000b003891616c990si4812075oif.70.2023.04.19.02.22.04; Wed, 19 Apr 2023 02:22:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X05IcQo6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232416AbjDSItO (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 19 Apr 2023 04:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231844AbjDSItL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Apr 2023 04:49:11 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B3356A67; Wed, 19 Apr 2023 01:48:39 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33J8mQJf027445; Wed, 19 Apr 2023 03:48:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681894106; bh=XbEtFK+H4/7qsl0ppFWnJWa8nE2+A+lGhJsRSLRMsZI=; h=From:To:CC:Subject:Date; b=X05IcQo6rJxC5jzIkoyxF7Wn06nh6hBy4LmgeHEcSJirXvHEpHNT4lt5eYBYaYRT1 D8o2fH8ZeTO1s/P9C3EvcIK2Km4M2GQaJfNJ8Hlv9KNb2duHNQzeERYrktso6cJ/fX wYxUmTaW88w1YDhmDWpVcbDOfIjw7PqKZIH7oOWY= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33J8mQDl005205 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 19 Apr 2023 03:48:26 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 19 Apr 2023 03:48:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 19 Apr 2023 03:48:25 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33J8mOuo068330; Wed, 19 Apr 2023 03:48:25 -0500 From: Dhruva Gole <d-gole@ti.com> To: Mark Brown <broonie@kernel.org> CC: Dhruva Gole <d-gole@ti.com>, Vaishnav Achath <vaishnav.a@ti.com>, Vignesh <vigneshr@ti.com>, Apurva Nandan <a-nandan@ti.com>, <linux-arm-kernel@lists.infradead.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH V2] spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS Date: Wed, 19 Apr 2023 14:18:17 +0530 Message-ID: <20230419084817.481136-1-d-gole@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763595924604116667?= X-GMAIL-MSGID: =?utf-8?q?1763595924604116667?= |
Series |
[V2] spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS
|
|
Commit Message
Dhruva Gole
April 19, 2023, 8:48 a.m. UTC
Using this macro makes the code more readable.
It also inits the members of dev_pm_ops in the following manner
without us explicitly needing to:
.suspend = cqspi_suspend, \
.resume = cqspi_resume, \
.freeze = cqspi_suspend, \
.thaw = cqspi_resume, \
.poweroff = cqspi_suspend, \
.restore = cqspi_resume
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
Address comments from previously posted patch:
https://patchwork.kernel.org/project/spi-devel-general/patch/20230417091027.966146-2-d-gole@ti.com/
drivers/spi/spi-cadence-quadspi.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
Comments
Hi Dhruva, kernel test robot noticed the following build errors: [auto build test ERROR on next-20230418] [also build test ERROR on linus/master v6.3-rc7] [cannot apply to broonie-spi/for-next v6.3-rc7 v6.3-rc6 v6.3-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Dhruva-Gole/spi-cadence-quadspi-use-macro-DEFINE_SIMPLE_DEV_PM_OPS/20230419-165052 patch link: https://lore.kernel.org/r/20230419084817.481136-1-d-gole%40ti.com patch subject: [PATCH V2] spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230419/202304191900.2fARFQW9-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/83ce1615dd395c8034756cc6aa97b38c16c0b07d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Dhruva-Gole/spi-cadence-quadspi-use-macro-DEFINE_SIMPLE_DEV_PM_OPS/20230419-165052 git checkout 83ce1615dd395c8034756cc6aa97b38c16c0b07d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202304191900.2fARFQW9-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/spi/spi-cadence-quadspi.c:1918:24: error: 'cqspi_dev_pm_ops' undeclared here (not in a function); did you mean 'cqspi_mem_ops'? 1918 | .pm = &cqspi_dev_pm_ops, | ^~~~~~~~~~~~~~~~ | cqspi_mem_ops vim +1918 drivers/spi/spi-cadence-quadspi.c 1912 1913 static struct platform_driver cqspi_platform_driver = { 1914 .probe = cqspi_probe, 1915 .remove_new = cqspi_remove, 1916 .driver = { 1917 .name = CQSPI_NAME, > 1918 .pm = &cqspi_dev_pm_ops, 1919 .of_match_table = cqspi_dt_ids, 1920 }, 1921 }; 1922
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 79ab7e309644..922026bb9380 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1829,12 +1829,7 @@ static int cqspi_resume(struct device *dev) return 0; } -static const struct dev_pm_ops cqspi__dev_pm_ops = { - .suspend = cqspi_suspend, - .resume = cqspi_resume, -}; - -#define CQSPI_DEV_PM_OPS (&cqspi__dev_pm_ops) +static DEFINE_SIMPLE_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_suspend, cqspi_resume); #else #define CQSPI_DEV_PM_OPS NULL #endif @@ -1912,7 +1907,7 @@ static struct platform_driver cqspi_platform_driver = { .remove_new = cqspi_remove, .driver = { .name = CQSPI_NAME, - .pm = CQSPI_DEV_PM_OPS, + .pm = &cqspi_dev_pm_ops, .of_match_table = cqspi_dt_ids, }, };