Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp517444imm; Sat, 8 Sep 2018 03:40:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaYh/mOpgAw6NSxN6A68sF8jDUA656lqi8GJ7Rz2UhhP9P4kFWsNDmJbcWfkUEm4XB52sAF X-Received: by 2002:a63:b19:: with SMTP id 25-v6mr12957894pgl.301.1536403203828; Sat, 08 Sep 2018 03:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536403203; cv=none; d=google.com; s=arc-20160816; b=FxH/bQVz1uRSlMwt+6aGc/QnQcVKGYAv0jg05xIrSsX4NIrLDrExQ6cfHDrMxqIEcA YaBy0Sf2VgZoMIwro71ofARSGQn7TweYcMz/6fa4/gyNN401vrw352iolSh1L2eKwJKr xbiTOcNHJsrHUfVppFLySY0yHChOEshCqb6XQq/0Vm1qbHI/RYLofJSB30yMdeJ4BFoJ r5YCninK2A9FiC7iGZzIAdfi/Md6HPlvP++o7XwUfAmkg9cR2WgluVfAxYFkQVHwzQ0Y jHOzMORZ8c0sVR6UZRs//XNzkpcA16Gbo4dvVjA2Pp71frkvpD8LhMvxruLu2Z/w/Zzn 7XKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rafKTlU9Kly9wFa6nTouOXq1Sb0k2Uu//qzku/JN33I=; b=ysn5p9BPJgHFSYAKs3P61+/CUkWw9V+dM5Dw0yTuhf2rWxYw8miNG/hAY1hDuBIm6T uvxwvKGIlkUlDZD9m/VIk28C+UiBViflL69SDABS0gw8a3GeOJdAOF7XlE2rk4HoIGju R9e9a3fq4Q0DhJ65o7HByjVnzuh8VbPpwj9wcHJetnpOuTybV6MVELR7OMzUp+DRIcnu rDd5n1neHKUuTQ4taKEZoQu+CETvcTe6Abxrwgz8awkdRuPmrQnVGUFyMYalSISBuxAa 5ypuJl6xRpl4ZvruxAmeGaaBbFv00IVtJvIm8Fuj5MkWzrNBsWdlUFaNVucYVzZD93bX gxGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si11916594pgu.248.2018.09.08.03.39.48; Sat, 08 Sep 2018 03:40:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726862AbeIHPYD (ORCPT + 99 others); Sat, 8 Sep 2018 11:24:03 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51762 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726568AbeIHPYC (ORCPT ); Sat, 8 Sep 2018 11:24:02 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6D0781A1ECD5A; Sat, 8 Sep 2018 18:38:40 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Sat, 8 Sep 2018 18:38:39 +0800 From: zhong jiang To: , , , , CC: , Subject: [PATCH 1/2] s390: vmlogrdr: Use ARRAY_SIZE instead of reimplementing its function Date: Sat, 8 Sep 2018 18:26:27 +0800 Message-ID: <1536402388-23872-2-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1536402388-23872-1-git-send-email-zhongjiang@huawei.com> References: <1536402388-23872-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ARRAY_SIZE has implemented its function. we prefer to use the function rather than the open code. Signed-off-by: zhong jiang --- drivers/s390/char/vmlogrdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 069b9ef..58333cb 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -153,7 +153,7 @@ static void vmlogrdr_iucv_message_pending(struct iucv_path *, } }; -#define MAXMINOR (sizeof(sys_ser)/sizeof(struct vmlogrdr_priv_t)) +#define MAXMINOR ARRAY_SIZE(sys_ser) static char FENCE[] = {"EOR"}; static int vmlogrdr_major = 0; -- 1.7.12.4