From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C8D1A0353; Sat, 9 May 2020 01:25:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CE7161D9A8; Sat, 9 May 2020 01:25:16 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 3C88D1D9A5 for ; Sat, 9 May 2020 01:25:15 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id l25so1582673pgc.5 for ; Fri, 08 May 2020 16:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+8+RwEZAo9zMqDndth8sX14y9W6ZSxWiZpzsxYFltvI=; b=Fro4nhPXgfQXeTNZu8tajVfUqS0MOBQSbGAdWKbeMPbpEhY9jjdadzlDbDiV+y3ezd mI5iqGBgtxJ2LqL8zpbp8StvduaPmRnZHRfubOz9kHF20WEFJjii55+Pm/OM2MsC4xdK ZoccPYuHK3SvtfXxNh4EJTtgRln20go2Cf5fAaUtvRZewyw05B05HoaXKw3+dLmdPqHe V1rmcrQfyIAYb7qaTC56LigPOEXocHKlXQswrBD1bQawIJ/PGEj1j64H78CQSvhwxdBb 2WVtyxGWTwMNSqnKlfKCSA2N4necq4x/GfmvY6tGTl1VO95a203uC1p+oCO0OAvk2PYB 9Ckw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+8+RwEZAo9zMqDndth8sX14y9W6ZSxWiZpzsxYFltvI=; b=CpmH7FFiTuwvllB6Ouu5vAkNffzMO/kBpq9V0wHuBbEgd2aquu4A3RiFFgvzJ/kxUl SnIv6tCjlMZpaOLMg8fnIoo4so5dfgcq/W8vdK5ojHIZWi5kGHjlzNKBHif9DChbikYB ouMv19QrKkxIW2gaFUuPMppmUaOaNE7PtRlO71LKpISI8BlraMRLaJhEgd3RxVwZ9vop z0LZVBtC8BZAfqn44bjOTCqEHWC5VrfuLCpugycWtEdLwsjQXavDqeZie2e2N78m1L7Z qsT8vEaxTW7wpE4JvbeoEwxjOeUmZG4q9hebGzE3PvTx+UuG1QGxir3pP7haLjnDpamx 218w== X-Gm-Message-State: AGi0PubbsRpTKxWVj9fLBpocHLbuNDHR/DkwSnjd5WQ2IGj73PypnBkl tkVGGA9zXKgREFCgMiXzfAKLi6rtWELFag== X-Google-Smtp-Source: APiQypJ6mjTUiKcC02zIDENYJ34HYHwZe4XbHiQt7uk/OqLjwVXeabMfevO7RxGe3K2LfrftrQVgSg== X-Received: by 2002:a63:1160:: with SMTP id 32mr4089443pgr.441.1588980313543; Fri, 08 May 2020 16:25:13 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h11sm2744117pfo.120.2020.05.08.16.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 16:25:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , pbhagavatula@caviumnetworks.com Date: Fri, 8 May 2020 16:25:05 -0700 Message-Id: <20200508232505.2275-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] eal: remove register from function parameter in headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Compiling a C++ application that includes directly or indirectly rte_common.h will cause a warning: include/rte_common.h:350:37: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] rte_combine32ms1b(register uint32_t x) C++ pickier than standard C and flags this antique usage. This is a bugfix please apply to 20.05. The register keyword is an old K&R legacy and should be removed everywhere in DPDK. For now, fix it where it hurts. Checkpatch should also be able to flag use of register keyword. Fixes: 08f683174e94 ("eal: add functions for previous power of 2 alignment") Cc: pbhagavatula@caviumnetworks.com Signed-off-by: Stephen Hemminger --- lib/librte_eal/include/rte_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 668e8b0af87d..0843ce69e7ec 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -409,7 +409,7 @@ __extension__ typedef uint64_t RTE_MARKER64[0]; * The combined value. */ static inline uint32_t -rte_combine32ms1b(register uint32_t x) +rte_combine32ms1b(uint32_t x) { x |= x >> 1; x |= x >> 2; @@ -431,7 +431,7 @@ rte_combine32ms1b(register uint32_t x) * The combined value. */ static inline uint64_t -rte_combine64ms1b(register uint64_t v) +rte_combine64ms1b(uint64_t v) { v |= v >> 1; v |= v >> 2; -- 2.20.1