From patchwork Tue Jun 1 06:27:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 451356 Delivered-To: patch@linaro.org Received: by 2002:a02:c735:0:0:0:0:0 with SMTP id h21csp1477776jao; Mon, 31 May 2021 23:27:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2e/+ijN+6LSd8aiwUKeUEAsDzJN4XOzMRfBu6CwsJNTFta6Rtyt3CVsdQT5V4CI+f3oUK X-Received: by 2002:a17:906:4c57:: with SMTP id d23mr4101731ejw.147.1622528877898; Mon, 31 May 2021 23:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622528877; cv=none; d=google.com; s=arc-20160816; b=OniNU6hJeK5fx7oZmlCLNtFhXPDHZcccdOwF+IgV3u8Jwh1+5vZ3G6N9s0/IU8bbYf LWrh/FRmvtdzJpxa9twCvxMiK5OjVbQVQaYTIa9DnzijpicVb8KAs09rDwl5ZJmSiZrS N5n5a1hv2POK+7cXpEzSZ+kB8rMhYsqQTCfPvtSvSlAMLQTo4jJuXxXyRikdZPA669g0 hnt9ZYfPlXcVWxMP0UH5Ts+i7Rqzo02szWJnZuJSu4NhBjSsqgqeVABbXFsh/HSWPTaQ rZoeG0sKZCPtZlS6W81/7jtkwOosz0/wCBf8FS+IAEfTESKLwkyDIC1vEvAW/3YSkoWv nXYg== 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; bh=KqBh734EHi1PBFVIKEj6icSvuXCAc7YeBop7e7QRKHs=; b=E0Esk3Dj5qyZHFLzn7r2Ti/fe0AJiiR7a4PSBvPXOAJ3QZrcfs8trqTMc32PzR1k3q 253Tlk9tWSQVJVWEznDo5dOSWCGvVaHGrQVaTmRxLdmCRyraofw4kC7OBr+3xo/ghrTF 16rms7IkQqXHQL5cHgsAObPrYZi2407dXULYCjDlavdjlyM+LnW72pKoFU/LG2s6eqU2 26bC/XQJ5ijrAvrAaGiL5L9DYmMdnT2q8N4dv1JW7nMOvxCGnQ5nMqZgjR9Zyy7aARiO b40wVzKbN/IgXwV4TVSDRCaO7Yq+szeM7eWiTI7hnmxTXWM9/9hfEkiQXyBVuJnVhDOt jqbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si17079816edi.510.2021.05.31.23.27.57; Mon, 31 May 2021 23:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232955AbhFAG3a (ORCPT + 8 others); Tue, 1 Jun 2021 02:29:30 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:6102 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbhFAG33 (ORCPT ); Tue, 1 Jun 2021 02:29:29 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FvMb32HV9zYpKl; Tue, 1 Jun 2021 14:25:03 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:27:42 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:27:42 +0800 From: Zhen Lei To: "David S . Miller" , Jakub Kicinski , netdev , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code Date: Tue, 1 Jun 2021 14:27:36 +0800 Message-ID: <20210601062736.9777-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org No functional change. Signed-off-by: Zhen Lei --- drivers/net/fjes/fjes_main.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 466622664424dcd..d098b1fcf0067b1 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -90,16 +90,8 @@ static struct platform_driver fjes_driver = { }; static struct resource fjes_resource[] = { - { - .flags = IORESOURCE_MEM, - .start = 0, - .end = 0, - }, - { - .flags = IORESOURCE_IRQ, - .start = 0, - .end = 0, - }, + DEFINE_RES_MEM(0, 1), + DEFINE_RES_IRQ(0) }; static bool is_extended_socket_device(struct acpi_device *device)