Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4973519pxu; Tue, 22 Dec 2020 05:35:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbjPQ9eXeiFwNglPC2nvG5k5tRPcpywlYohU4nbG/H3VA8ZyCTM+dnavoQ/Wfct2Z72vCV X-Received: by 2002:a50:f299:: with SMTP id f25mr20081445edm.133.1608644117286; Tue, 22 Dec 2020 05:35:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608644117; cv=none; d=google.com; s=arc-20160816; b=YqHqBL/Fm2rfGt0YSb1q1fkQ7CRAi5/b9tq6fsY0aAX180o+mSRLHkKV2J6dP28jGr mIUKdRiYG7EBLaKZ4yOZnDX9gIN2lHuMlgp/pgSUST7EAPbQ9l3Zj90KVJg93GzwDII/ nlOb8YH+a3zzAMmCd5tM49V5cPdXVQY0zXEqfnWjDVUQq6zeI1MaUNqNRRbll9wzBz/R qNNhO4fzvmuiDXMrXlEJSMGCKAXvTMagq39TPQAVDYyzNcKGn09Fr4ehGTgU+JwdyYMy oLz+PPl+hJmddYHajbjjSnVhne0LvRr0teInDm+KwJdnUiBP96BMkQ1hqsJC7I7fv4dc ioNw== 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=/DIkVduXCA//Z/v1tYO+0WYwD5TgIei34M8jATXH1nU=; b=eJOvdR//mgsiSyrX6q0BkQYVW7hBtl66HesYEYsHuchthnxUiARIsIQQMrplJt6U1/ DKnq4SCwA1mlaAnTlC4JkoFJO9iEP4OJlybGypDs/74DLcJYmpKIt4XOnuSUQtYkdqlx KXc/oJiW6Xq7tQJ2algUf6CK07IZXIvDjvK//I9b2vkX2SBcJQtUs237rbi+rkP2nBy6 KCaJQY0nT7+CBgbPToKey09xAhsJoUBKNz+2U9rwACnfEg0cJnaT/Y0QMvwMqirMhOli /A/k43iZUawTKbX/Qm8srZTaG+6ox4ztXdJEfN6mSpTzeo/bvAQbUlDGzsjblU/iacJ9 9S3w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt24si11038284ejb.248.2020.12.22.05.34.54; Tue, 22 Dec 2020 05:35:17 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbgLVNd5 (ORCPT + 99 others); Tue, 22 Dec 2020 08:33:57 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10063 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727403AbgLVNd4 (ORCPT ); Tue, 22 Dec 2020 08:33:56 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4D0chN09SrzM6q8; Tue, 22 Dec 2020 21:32:20 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Tue, 22 Dec 2020 21:33:08 +0800 From: Zheng Yongjun To: , , , CC: , Zheng Yongjun Subject: [PATCH -next] misc: use DIV_ROUND_UP macro to do calculation Date: Tue, 22 Dec 2020 21:33:44 +0800 Message-ID: <20201222133344.19753-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't open-code DIV_ROUND_UP() kernel macro. Signed-off-by: Zheng Yongjun --- drivers/misc/kgdbts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 945701bce553..cd086921a792 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -139,9 +139,8 @@ static int restart_from_top_after_write; static int sstep_state; /* Storage for the registers, in GDB format. */ -static unsigned long kgdbts_gdb_regs[(NUMREGBYTES + - sizeof(unsigned long) - 1) / - sizeof(unsigned long)]; +static unsigned long kgdbts_gdb_regs[DIV_ROUND_UP(NUMREGBYTES, + sizeof(unsigned long)i)]; static struct pt_regs kgdbts_regs; /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */ -- 2.22.0