From patchwork Fri Aug 31 19:44:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Stoppa X-Patchwork-Id: 10584393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67166112B for ; Fri, 31 Aug 2018 19:44:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4906D2C856 for ; Fri, 31 Aug 2018 19:44:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CB2C2C86B; Fri, 31 Aug 2018 19:44:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D9192C856 for ; Fri, 31 Aug 2018 19:44:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E25B6B589F; Fri, 31 Aug 2018 15:44:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 991926B58A0; Fri, 31 Aug 2018 15:44:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A8366B58A1; Fri, 31 Aug 2018 15:44:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by kanga.kvack.org (Postfix) with ESMTP id 1822C6B589F for ; Fri, 31 Aug 2018 15:44:35 -0400 (EDT) Received: by mail-lj1-f199.google.com with SMTP id q13-v6so2262444ljj.4 for ; Fri, 31 Aug 2018 12:44:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=F9DaonvEapl6YnvqzHacv5ImpGQxDeye4uIerD81AMI=; b=jqxgl0PV0yK8tRDxjOkPvmQdyvqw88zfzWqYsqyyk0PlKyyJUb6rX7KYvPaGvj9y5B E22r8mWBd5VlC1RfCHw23vTTLN9FgPdTHB4o8TcC4Do5GaRwKxw/aMxm0X1jfz1gh2VQ QMRqrJNbzWY/x/6vC0fKsUdwYEQWW5juoi4X9NHxR07spONfe6tbgGRMm1o+GYVD3BTq fjk5py/kLEYXYYnhRRlgnkvrRpUZ/j6E3xaFMQ/7qgk2tMtJp0JUO/mYPhmvnHDxrBmM W/KUR7OcYkjXLiqo09ct1gKf3EwKiKgxV3ZLqjcYiD9XSMWXY6oeOAkaM6QhU1FgXsJN 4Fmw== X-Gm-Message-State: APzg51BoobCRwZCib6DjuLdwX07Z7HsvgoVIoTQyyovOTCRtXmFg1pbH y6EtKiMohneDYGG9Ihrng54rXgjOkQzvV4SQNg2POkjxkQRZofgUsS8tw/HkzjHZCD/GRXalpcZ 14JPB6X/ka/nvZLJrKF76p7gO48URVqV01xNifva9gE4Y45m98vro8XZIo/2OYDQm1MwXHZEZTn oiQpgmGQqnxkPcGIiSoa8BLJP5tWXEDLHXLxR85b4KorKgbHpWfJOPPnFWyA6Wu0e6WniKmKe5X tPhWdVycL5mvnGnkMK0pj5XuyO/zlsbDpxMs9XUYbnsC4Q4Ugv22MO8SiXP5mDl1l4yEfz1pB0v MDdekCFfd3Vql7DYwUrkHWPNnd7+P5jSgkFLA6E7UcOD+Gyuxntxs4nsBh7RBGZtNum8r7h6EPq S X-Received: by 2002:a19:cd8c:: with SMTP id d134-v6mr11135388lfg.41.1535744674301; Fri, 31 Aug 2018 12:44:34 -0700 (PDT) X-Received: by 2002:a19:cd8c:: with SMTP id d134-v6mr11135365lfg.41.1535744673486; Fri, 31 Aug 2018 12:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535744673; cv=none; d=google.com; s=arc-20160816; b=zCCMdA92TP4MPTgZfe4YFy4Nk5fdSUErWC4WD5ktpmmSLvkCbD8wCy3ndJ+tNRlLDc tRYXqpro09lrVZzriFI1Ov4+RMUvnX7Ads3gTWatMB6oTuIFFp6OX4pHDWFRzZKoWUaW Nz8xJGzb1FF34THpKZj3T2pFAwzx82EXoZdU1G/hfila/Syb24HoMvLOk90jK3kdfKmG 3y1cVosqtd7vIZwedqp2knvLpU/GhovMsNDAN9Ul/xis24bBrkS2PmRviEfkCorfgOGv Az4EU2Bjxym73B2TLnWLrVEIXvGsI67UUSPU4of1KkrklWI7hmspdZ6MtoP5456hs1jp ia2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=F9DaonvEapl6YnvqzHacv5ImpGQxDeye4uIerD81AMI=; b=rswcPhgPUeoo1BfLSn1N9IRrD4A66ddjsAIDIcP9pzvx9gnGi9jwtVGRLX7XXJ/1Wd y8DAjVuTRLoXKsKJ++bqLd39pNpAdG0C6qhLtlze2CU0RZ00LuKoQbdIpgqdvYypjCGK nLEQt47EP/y0YJwyn4r3HYT4ktl90iKRP4NgRlVYzoY+6T/t7GEyLGE4G8WuKSN6bTYS cntGfy4dZic7kgLAZyboIa74xfxoTQ/+fdxS8hmUS6sUSGjh2uZLLO/yIG37uGtaxaPM UrmwYlqS9fAXoqbsSgINS6J7yAzzMdgAnAwSPdTWhHHAyaKSDNfDUjZUUXqonoC1/gU2 IxSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O8QKNv6g; spf=pass (google.com: domain of igor.stoppa@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=igor.stoppa@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i11-v6sor3502055lfb.56.2018.08.31.12.44.33 for (Google Transport Security); Fri, 31 Aug 2018 12:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of igor.stoppa@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O8QKNv6g; spf=pass (google.com: domain of igor.stoppa@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=igor.stoppa@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=F9DaonvEapl6YnvqzHacv5ImpGQxDeye4uIerD81AMI=; b=O8QKNv6gtif/f8leEzF/Ix20gGFZfauHfN1PnrqDZGF/5CmhaQ9ZwAOAZxqSpifsGB 2ImpsOiN13AmVJMiJLJfMv5wmVcNF2mIEieHbp+q4kdz5gPhzQu4F1yUyvC6kJ/MmkeA hFBD1SdCVID70FUP5Z9LdEW2rEq5K1DiQVtFZfKrE/8596YpgCaKapTOiEU2eIiSW+S6 K9YO4C3t7jjTR7TLoaLzAioy1+d4XgmOgs5xUWyol+yM9MuO8cuwUE+kiMPVwr6xVayE EY8+GdoFwJiHKUtwFWwaoMxZIYrEyV9C1biWnltzpfYnlWte0yuZE6b1IH2HorVvVwr+ Iwug== X-Google-Smtp-Source: ANB0VdZOstdlD9LmkCLlD3qB7hQy2Q5Hrf6pfFndIUBXwwamAhc8+qx5YnoubdyW4mJX64+Ko0QhkA== X-Received: by 2002:a19:ce50:: with SMTP id e77-v6mr9337261lfg.81.1535744673069; Fri, 31 Aug 2018 12:44:33 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id v18-v6sm1774960ljv.49.2018.08.31.12.44.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 12:44:32 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: Dennis Zhou Cc: igor.stoppa@gmail.com, Igor Stoppa , Tejun Heo , zijun_hu , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: percpu: remove unnecessary unlikely() Date: Fri, 31 Aug 2018 22:44:22 +0300 Message-Id: <20180831194422.13730-1-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa Acked-by: Dennis Zhou Cc: Tejun Heo Cc: zijun_hu Cc: Christoph Lameter Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index a749d4d96e3e..f5c2796fe63e 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, BUG_ON(ai->nr_groups != 1); upa = ai->alloc_size/ai->unit_size; nr_g0_units = roundup(num_possible_cpus(), upa); - if (unlikely(WARN_ON(ai->groups[0].nr_units != nr_g0_units))) { + if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) { pcpu_free_alloc_info(ai); return -EINVAL; }