From patchwork Thu Jan 5 05:12:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 89942 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp8809629qgi; Wed, 4 Jan 2017 21:13:18 -0800 (PST) X-Received: by 10.84.178.195 with SMTP id z61mr154986339plb.176.1483593198712; Wed, 04 Jan 2017 21:13:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q197si74724490pfq.263.2017.01.04.21.13.18; Wed, 04 Jan 2017 21:13:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937835AbdAEFNP (ORCPT + 25 others); Thu, 5 Jan 2017 00:13:15 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35794 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935219AbdAEFNO (ORCPT ); Thu, 5 Jan 2017 00:13:14 -0500 Received: by mail-pf0-f170.google.com with SMTP id i88so85512752pfk.2 for ; Wed, 04 Jan 2017 21:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=eLVuvsk2KbkAy6eWa2X9MrA9zTGU+Fdt+ySrGJnGToY=; b=JLfTRDCQz79MmT1v5nhZoBStj9zAlBZSLodonmDbjf8lPd3xzih5KJeLo3PKln/z4L X/avZ3zw9LSVNyId2WLQDa5MvGfyjWF05DGa0DAh7OLYP9VcSZP4jR9uq+wMyJ9uYLzg sZjqQUxv95+jzI9fKfvRuspzUIOueeDN9Wvls= 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; bh=eLVuvsk2KbkAy6eWa2X9MrA9zTGU+Fdt+ySrGJnGToY=; b=i9ECJUGC35eoLmm/aOubhEg5czemVuuUdLm7ToMFryf6Or5J0SR5tEgID/tOsOYweE K7qp/ppgqw9TPEWs23om2M0VKafMMznga3psq6zloZd2DfXi+Xw9VK2dFPVLlGY4IVlp OzhQCuG3idG9AVifLVlh41D0AtHKkT76n/NClqpV3OZfIyC/f2l6BZ29Sj3wfHWVr02b 0WQDlvZEoELspmdM6fAt8qaRyHcdKf2fLboKK7iKdxhkFO6LwAebuk6zHSlBd85cuXb3 QUTvKEf+4vOxDcCiIXgxslyfnV0XK3mFTJwUwEbTm3Dk49hkCf/LNXjVffkashLIagUO jkFQ== X-Gm-Message-State: AIkVDXKZB+N2+TZBk9vfFh2fPclC14lPFGeLfaAYnyLkElEr3vybfw27OXXgTAzV6Q1cgB8M X-Received: by 10.99.125.65 with SMTP id m1mr131473366pgn.159.1483593165667; Wed, 04 Jan 2017 21:12:45 -0800 (PST) Received: from localhost ([122.171.77.55]) by smtp.gmail.com with ESMTPSA id t15sm107344094pgn.18.2017.01.04.21.12.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 21:12:45 -0800 (PST) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, Viresh Kumar , linux-kernel@vger.kernel.org Subject: [PATCH] notifier: Simplify expression Date: Thu, 5 Jan 2017 10:42:32 +0530 Message-Id: <88ee58264a2bfab1c97ffc8ac753e25f55f57c10.1483593065.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NOTIFY_STOP_MASK (0x8000) has only one bit set and there is no need to compare output of "ret & NOTIFY_STOP_MASK" to NOTIFY_STOP_MASK. We just need to make sure the output is non-zero, that's it. Signed-off-by: Viresh Kumar --- kernel/notifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.1.410.g6faf27b diff --git a/kernel/notifier.c b/kernel/notifier.c index fd2c9acbcc19..6196af8a8223 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -95,7 +95,7 @@ static int notifier_call_chain(struct notifier_block **nl, if (nr_calls) (*nr_calls)++; - if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK) + if (ret & NOTIFY_STOP_MASK) break; nb = next_nb; nr_to_call--;