Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp874496pxj; Thu, 3 Jun 2021 23:47:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Lr5IDT/4l0jDi4GSLWVp/t58hyAiC6qJG8OA1ikeuyFnnwwjNHSz0ru70p7KcImPt618 X-Received: by 2002:a05:6402:177a:: with SMTP id da26mr3219971edb.40.1622789263305; Thu, 03 Jun 2021 23:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622789263; cv=none; d=google.com; s=arc-20160816; b=1JovCEcGLa4J98JlRnlR08I2ZjVEORYlnKsCeGMIZVt3NJYRokHY1NsbNjHUZ8SD87 TbgpO9ipcscVblfMJk3nGgPzgcHM9dH9YQlcNzyCngKEcu/cswiNDQjPpZeP2NrMDWs+ uYsHDNp4d7TxXpj70ElzWwA5HGBVNOLGjiUD+a6ZjZQomiEWvi7Wa4QXlJ+i0zPDrmrM oUvWkpsPvU0nuKm/JLhOkQjA1/+uzIz2Nwt8rOng2wd0ODToemQrLeOTOE1AEmMNLJi6 KVxXBwEhpxo34AFrQuRefL55TomwNlw7wtqcoLtGNq6wGQ3Yf6qzebtrlIEB64yDcgmb nICg== 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=PKdV4v61pNy3EDpnyZvwHBdxh8RRqfiLDQaXIuC1n8U=; b=ed4hJaDRrYUsSVzCGpGFnjYN/iZFVMHSC4PuqPwICtJJWerEwojGuqTY814OgCbHJx ZgWkYUwixzRaYWQdnfjrCLZGnmn8WfJhikHj8RwSHRrg47PzKbbH4v0vfwmxwwRxBCVM hX1x9GF3icIu7tE3YSRfiK1QZ/GLguEQX3679nD+lSdSMLn+I7yk641LTwByJjvMN72n AhSNNEeLVyEl5kV+mOJace2JCsa9FY5qRM3euc5ApitNsaLUxCUmB38YBe6S5AKIgWDB oX3jQrUoERAYe2vdYlzREofL+VxnBHJDAegtFJ4lshZkBCtYyaU6sxW5VOTdkU++rBM9 4Z4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=EbMoxeE5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si2872714edt.81.2021.06.03.23.47.20; Thu, 03 Jun 2021 23:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=EbMoxeE5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229976AbhFDGsF (ORCPT + 99 others); Fri, 4 Jun 2021 02:48:05 -0400 Received: from m12-11.163.com ([220.181.12.11]:45127 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbhFDGsF (ORCPT ); Fri, 4 Jun 2021 02:48:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=PKdV4 v61pNy3EDpnyZvwHBdxh8RRqfiLDQaXIuC1n8U=; b=EbMoxeE5y4lBqaThOBxr3 MkNQDfBxdhgAjWhmrdKBSjV8TOv9VM1Yynn1Cwp6tT4mA0Osd1NO5JwUKf53p/2w j1j/lwxyWd7yIZYfuqqUQpVtg2CLs+LhZHf5m2lERAQL69ed8onYrgm4gjxbhqng SRxbAeCV1+dgcdANlcsDmg= Received: from COOL-20201222LC.ccdomain.com (unknown [218.94.48.178]) by smtp7 (Coremail) with SMTP id C8CowAB3bo4vzLlgmlN+gA--.1919S2; Fri, 04 Jun 2021 14:46:09 +0800 (CST) From: dingsenjie@163.com To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dingsenjie Subject: [PATCH] net: fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code Date: Fri, 4 Jun 2021 14:45:51 +0800 Message-Id: <20210604064551.140608-1-dingsenjie@163.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: C8CowAB3bo4vzLlgmlN+gA--.1919S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7JF4DAF4Utw1DuFW7GF4kWFg_yoW3GFg_Ca yIvanrWw1UKryjyr10kr43ZryxtF1q9rn2g347t39Y9wnrZF17Cw1UCrW7XryDWanrAFnr ZF17Zr1Yy347XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0nZ2DUUUUU== X-Originating-IP: [218.94.48.178] X-CM-SenderInfo: 5glqw25hqmxvi6rwjhhfrp/1tbiThGnyFUDJ6amagAAsr Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: dingsenjie Use macro to simplify the code. Signed-off-by: dingsenjie --- drivers/net/fjes/fjes_main.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 4666226..d098b1f 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -90,16 +90,8 @@ }; 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) -- 1.9.1