From patchwork Sun Nov 13 19:10:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 19412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1800907wru; Sun, 13 Nov 2022 11:15:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf5b71W5hR5zoeUG+G+xmDl5+zwW/422mEWBPwljZ7dWiuTBheujc3MoP6pqIHAMiicMgJAR X-Received: by 2002:a17:907:11c7:b0:7ad:821f:a3e5 with SMTP id va7-20020a17090711c700b007ad821fa3e5mr8073306ejb.554.1668366926133; Sun, 13 Nov 2022 11:15:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668366926; cv=none; d=google.com; s=arc-20160816; b=VwojRk4u9VUPEt02QEVh9nfDmy5u/f+Fq7Mtpx8hYBZv6L1BGKzYy/qYmoLU8hnE98 DAjgJVZNzJqsj5qBOjxKRMFJ+1I2bQqqOBEgE3Bs0jQmvlPmLhmgYcnLW4SIeJe+AWPN +HAZJK8udJ6QCrV1JRkjtLR123ftYHADBoocwVa0X+8EtrFZiLata+77w0PEFBshpdvZ L2bXKw4hcPOktlLBLIE6c1+cY3++2oeqJB/HaO9ZaZTzf/KU4S/dF08nhToDvflU8C2y aoejV96DCwIlbDcxayWhKQn7ZvhJmdhlbpOvHcfdCRJpXRr4V9xE4D2dTLkn09Yrbpbt Rt/A== 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=q1J0B+p4gIizuFgj/wrTfm8wBc1ebhf9VxMr/eKb5ag=; b=lYr3Ji6e+/4mmMbc/OqDcY7+b+S5/C9nEdDYwvqaJFW35HtQKh1MMZi7L3ec/WkLTD tJVfiRuoruPz62Z6+rLVxY5UZoRWn+bIK2FwfAA7nv3I/yIHkFQbozLhMWC66edqYAK2 +41lnO/wh60ZGFRCvIMbmrQQmmUpGU6eLtbmYk40vyio+p9/IdFy5jZWF8Ohijl/c9TW mkkULBmgAhiTqezZYQhEHBquwMC+CPryG7yWpfIy1yoy4OsQ56rY2O6hT7NLbK+R93RZ mfdH6A4dIGbTtlXuzlmGo1YzXHW+olBs2ME06MUNFj5vkQ4cd+MqCHf5FdcHWp4OkyvY dvPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QBR99jOI; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ee16-20020a056402291000b00447a8836a56si5786167edb.208.2022.11.13.11.14.55; Sun, 13 Nov 2022 11:15:26 -0800 (PST) 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=@intel.com header.s=Intel header.b=QBR99jOI; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235214AbiKMTKP (ORCPT + 99 others); Sun, 13 Nov 2022 14:10:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235317AbiKMTKK (ORCPT ); Sun, 13 Nov 2022 14:10:10 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0142213D69 for ; Sun, 13 Nov 2022 11:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668366609; x=1699902609; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cXvk/lfUOGyjHOe2uztoH6XTJP4Hv46hzt35fKtKj1Q=; b=QBR99jOIrBhC1rzNueF2K3gIuEGquB2c1/OBE23laSqeBYzi32rxiw0C RCAw3avywWzzn2QDWkwqMrYteSU8w1UpobNgsYLOk5hZyjVSyeevFVSGy qs6lQbcvFh1ydJpGi1Hpbg9slgWT+PUajtr9OGshtfWThaQU6y/gIMKxZ 5ke2uQeAOsEcBS5YWGgzndGjkF9EanCbwlGRt7drDRcB0usUPb/9RIJB3 zWAEz2L4/T3Ha3mYuZa9ztnesFqi4orBSVPCm9noXoPjcKMqOfUoKE3PQ TCCxQNS4LyWZLQZZA8jOk35SoSdfJIrNcYCl5t08C/CL+FMRI8/NnG8fR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="291551679" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="291551679" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 11:10:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="743867540" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="743867540" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2022 11:10:07 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B7780F7; Sun, 13 Nov 2022 21:10:31 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Lee Jones , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , "Rafael J. Wysocki" , Greg Kroah-Hartman , kernel test robot Subject: [PATCH v1 1/1] mfd: vexpress-sysreg: Fix resource compound literal assignments Date: Sun, 13 Nov 2022 21:10:27 +0200 Message-Id: <20221113191027.2327-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749409517942059594?= X-GMAIL-MSGID: =?utf-8?q?1749409517942059594?= Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled. Fixes: 9c973ce7f9cf ("resource: Convert DEFINE_RES_NAMED() to be compound literal") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Acked-by: Sudeep Holla Acked-by: Lee Jones --- Should go via Greg's tree where ioport.h has been changed. drivers/mfd/vexpress-sysreg.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index aaf24af287dd..eab82619ec31 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -61,35 +61,27 @@ static struct mfd_cell vexpress_sysreg_cells[] = { .name = "basic-mmio-gpio", .of_compatible = "arm,vexpress-sysreg,sys_led", .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"), - }, + .resources = &DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"), .platform_data = &vexpress_sysreg_sys_led_pdata, .pdata_size = sizeof(vexpress_sysreg_sys_led_pdata), }, { .name = "basic-mmio-gpio", .of_compatible = "arm,vexpress-sysreg,sys_mci", .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"), - }, + .resources = &DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"), .platform_data = &vexpress_sysreg_sys_mci_pdata, .pdata_size = sizeof(vexpress_sysreg_sys_mci_pdata), }, { .name = "basic-mmio-gpio", .of_compatible = "arm,vexpress-sysreg,sys_flash", .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"), - }, + .resources = &DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"), .platform_data = &vexpress_sysreg_sys_flash_pdata, .pdata_size = sizeof(vexpress_sysreg_sys_flash_pdata), }, { .name = "vexpress-syscfg", .num_resources = 1, - .resources = (struct resource []) { - DEFINE_RES_MEM(SYS_MISC, 0x4c), - }, + .resources = &DEFINE_RES_MEM(SYS_MISC, 0x4c), } };