Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1147588pxj; Sat, 29 May 2021 04:51:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzufyavfTBaYumii5s4Qh5PCHrp55aSXLcMhpW5Tni9c9H9DqtA/CvAvZDm9gpjc9o1gKFV X-Received: by 2002:a05:6e02:11a8:: with SMTP id 8mr11277216ilj.212.1622289095346; Sat, 29 May 2021 04:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622289095; cv=none; d=google.com; s=arc-20160816; b=def1dI3qbGiAO+0gFmWv7yRTtOVQKa9HVOvwN4PWhK9NmLY6j2xxmhN0+5KJg2Xuty 75wCBBJekkQHSV2fGGL/0GxUtsZs7AVE+do2SAk0AAvwVnJEAXVyGmya12JClgMfTJWR 2eRxv6w2QR8Ne2NUO5xrRDKBvDF7lu9HkwB1FWcRljPCF6S4Zb56DEodEewTcyJ/K+Y7 n9+z6RMyRKwoVu+kzZ4uwmNDDC9Ze6/fmdIr70MtIvhgdp0bIcIyr9tnrQrKdqeBNlEh KpJQl7lJdnwFew+LoLooZC15PQx/TB/KNgcqdFjRL4V/a2AyR1aLxzbmMxhp+LDAtDqZ RmDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=RJ1P7MTHRpNwsPTl34cOkRP79+LsFqXn1rGTGjnEUMs=; b=t5w0u8AZxik9L/AAniNa+g3+bFL1qXFBQfCemZZn5Xj95J437TWEXZsJpmpLWRy1OT rl0Km6hJLtn7AbF/MCpqrQvLWEG31ZR1IEFDXc8ZaGZh7h/P8it9BRxoFN+ggPrZzDqj OROoTp40QkX3NwlV8HXEUJWe3cNViOgjH7MzKiXiYDbAgw1RoW3EBHoyyl7HpKP08Gsz yMqZAQblk5TxuRzlvtPRVm0qnh6Fzp4ADvXZcO+T8MsrLijvbvQdEMrzAbauGwiN1073 jrNRPQMFCd18aBaGNEqI7GMOOQaUzi4eaKBbQYhx8jN+wn/7Qdlez71wCPwBkLknXtnk I3aw== 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; 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 c15si2275239iln.17.2021.05.29.04.51.21; Sat, 29 May 2021 04:51:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbhE2Lrn (ORCPT + 99 others); Sat, 29 May 2021 07:47:43 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2538 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbhE2Lrn (ORCPT ); Sat, 29 May 2021 07:47:43 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Fsfnj4Nq1zYrfs; Sat, 29 May 2021 19:43:21 +0800 (CST) Received: from dggema769-chm.china.huawei.com (10.1.198.211) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sat, 29 May 2021 19:46:03 +0800 Received: from localhost (10.174.179.215) by dggema769-chm.china.huawei.com (10.1.198.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 29 May 2021 19:46:02 +0800 From: YueHaibing To: , CC: , , YueHaibing Subject: [PATCH net-next] pktgen: Use BIT(x) macro Date: Sat, 29 May 2021 19:45:59 +0800 Message-ID: <20210529114559.24604-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggema769-chm.china.huawei.com (10.1.198.211) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BIT(x) improves readability and safety with respect to shifts. Signed-off-by: YueHaibing --- net/core/pktgen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 3fba429f1f57..2915153458aa 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -218,10 +218,10 @@ static char *pkt_flag_names[] = { #define NR_PKT_FLAGS ARRAY_SIZE(pkt_flag_names) /* Thread control flag bits */ -#define T_STOP (1<<0) /* Stop run */ -#define T_RUN (1<<1) /* Start run */ -#define T_REMDEVALL (1<<2) /* Remove all devs */ -#define T_REMDEV (1<<3) /* Remove one dev */ +#define T_STOP BIT(0) /* Stop run */ +#define T_RUN BIT(1) /* Start run */ +#define T_REMDEVALL BIT(2) /* Remove all devs */ +#define T_REMDEV BIT(3) /* Remove one dev */ /* Xmit modes */ #define M_START_XMIT 0 /* Default normal TX */ -- 2.17.1