Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp875475pxb; Fri, 22 Apr 2022 13:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzncOYOQfy5+CS4weW7JYy4qrqUMi4aUDoh/8i9BN2LS+AA/RR0bUsZpgm/vurEyKAq0GyL X-Received: by 2002:a63:90c7:0:b0:3aa:e960:528c with SMTP id a190-20020a6390c7000000b003aae960528cmr852559pge.575.1650658296226; Fri, 22 Apr 2022 13:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650658296; cv=none; d=google.com; s=arc-20160816; b=tQL7FG03DWUYNGnDxlgs/sON5TCR6Xy5fa87N97Ux9vL0/oFxCD7hbpqJsT+rSJsF8 RHLqpKVSrcL/UnKHcg67Orgk58ppywtgyPH6ROEk9Yzej8dWRcXMJualrGZatWICuyvc nnzMpEjSH15TltIECw8WY2hEKNF7dY+cFlWCYEfPFBeQB6VbYwH8Dommpe49P8oKIdHP 7R4w5nOUib4ZVCjCkR8H17zPyFTXqDdgH5J46sWznlnKb04EPm5PpoI9P3qVqSKd1Cs7 K/z71DL4uuZ9Zqcjo3Aen4ZhLeMHbgw9MwhykZqHg5XWdVorHzHslb/L7uNAnhROfgiY SB+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=79nd/iPdqLV+axSNwBVTh85Rla2fHQ9vKLGrQW44PTg=; b=Zlg5AXCBQaQPzuQMl3M6ECYXfZdMvxbfyhyQWtK9C0M5JIiHY3KhN7PWckwmV8wsty tDMvKNcLQD8hrZnxKm4ltcX8hw+aXpjsFdxGwHAUFzaunS6CxgmEf38LHVfKMSfa+goC d3K78OdjhcrEtw87p+xcfekkGtqKhAiylL7F6NDOgSZgZBtmHVycK7tDf+CpD30t/xet KxmFE5bsAYSW5YRUSaBxE4uOseFlNGVto/vyDyQztNMnBF6xeHubcYSZE9JxA9KBjI6j 2z5P8NGrNWclSqZlIaQ78uI0MgKtnnax+oIAWhBjzdbez1nX7vwCkS3qaAsHDkvQJPdC bpPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Yk4lxSN+; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i16-20020a17090332d000b001569d19531fsi4867901plr.588.2022.04.22.13.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:11:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Yk4lxSN+; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B1E3261375; Fri, 22 Apr 2022 12:09:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387124AbiDUJBZ (ORCPT + 99 others); Thu, 21 Apr 2022 05:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347678AbiDUJBB (ORCPT ); Thu, 21 Apr 2022 05:01:01 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C1AD20F73; Thu, 21 Apr 2022 01:58:12 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 2CA781F758; Thu, 21 Apr 2022 08:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1650531491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=79nd/iPdqLV+axSNwBVTh85Rla2fHQ9vKLGrQW44PTg=; b=Yk4lxSN+NcY7N+2Qf3gj0iQqaCoIIScfxO83IHKasaMkf0YDofrDmkg4QHI/dp0sWGoLsk FLL5NZchx6u8NhOMg/QOJekPMH3yIu0yBkoQ52+BjKQSTRXGhFY2GsslsURMPAPfrRyVcM ZT6ZwL06PcRP8GgyJEFypVGxhX7bRzQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1650531491; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=79nd/iPdqLV+axSNwBVTh85Rla2fHQ9vKLGrQW44PTg=; b=qG9Vd3kZEObHG/Zp5XnJk4c7Fki7kp5xxTur9sUDzLui75D6nhG0i31hRn8N6/JldSWZbq at0BayD8U/+m7/CA== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F01332C141; Thu, 21 Apr 2022 08:58:10 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 06/10] serial: icom: use ARRAY_SIZE Date: Thu, 21 Apr 2022 10:58:04 +0200 Message-Id: <20220421085808.24152-7-jslaby@suse.cz> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220421085808.24152-1-jslaby@suse.cz> References: <20220421085808.24152-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 Signed-off-by: Jiri Slaby --- drivers/tty/serial/icom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 083c00aced07..34e716cadb28 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c @@ -47,7 +47,6 @@ #define ICOM_DRIVER_NAME "icom" #define NR_PORTS 128 -#define BAUD_TABLE_LIMIT ((sizeof(icom_acfg_baud)/sizeof(int)) - 1) static int icom_acfg_baud[] = { 300, 600, @@ -71,6 +70,7 @@ static int icom_acfg_baud[] = { 307200, 460800, }; +#define BAUD_TABLE_LIMIT (ARRAY_SIZE(icom_acfg_baud) - 1) struct icom_regs { u32 control; /* Adapter Control Register */ -- 2.36.0