From patchwork Fri May 24 11:16:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 165112 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3437901ili; Fri, 24 May 2019 04:17:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRek8XYlwawNRBDQSPLvJyUoIn9/c4g2gnDGZA2lhpYN6dGJD1+fi38SWRWuKJiZyWQ+hJ X-Received: by 2002:a65:5244:: with SMTP id q4mr23703792pgp.79.1558696636668; Fri, 24 May 2019 04:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558696636; cv=none; d=google.com; s=arc-20160816; b=wSYACvZOGUIaWuJ9T4zvDMYnNQBx0/EGl8SJh+RAiMGAs4BNFNlYOYoCLcE9sbYZnl 6yjb7pdC0mauwnOFBsGq7p5DD279ZpE6M76YMV1J2Ri6awkVfM9eLUuuc3X8MtswxL7R o9/Mhab+QrWhQGQ3DRQ8kDqzoKJh+L9bGNWHtdPvyvC6TvFUYf4mnI3LfhMn95OIiwG2 gVOpzyl3yHYls93m26fzw5CsuwrIHq56tK2frr8P5odYyn2iQF/RGvJdukZxnAzu8s/P SaejiQ0QNBQwGh3NzEbvEQuSjTYLNrB/jgfnS3oeYfUk+oWrrVK8GVAOrjSEB0AcWwRa qkAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=wJ/OTTzXkpFYyCPQfFmBGF9g9r7JKprAJcxNABvYugk=; b=nxcDpgSlDYAvxOYhHMdOQaQEb9vUvOdvkQHM0OBpaBL6RHObyvVVF4gsbKBkI+3TzB 4DFQGaOS/Iv7Jba/YZ8ani+BBVjsdWHpHbX+C0tMqlpP2PurkuQ+7wSlLskoVeO9iyjx PLFj2P8E9PINTWAxZKdTnR/ySLAcTRfNfTl7HxgtFC0vb99VdrQNrD+N2QtmB2j3H0Ej I6lA8jocWLUfUbx5Y/4DMPVc+oyXWrhuzTXChMiKFsvvvVGGLN0Cv59ARP7A5qCES7WA rr0w4m4+Y7ft89odt25/xNszTjIWA4oFMbwU8jHGG9fgSjHSi0TTdJtpwh7O9BLWmU7e 8OHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gJ1stP/+"; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si3674055pgh.143.2019.05.24.04.17.16; Fri, 24 May 2019 04:17:16 -0700 (PDT) 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 header.s=google header.b="gJ1stP/+"; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391121AbfEXLRP (ORCPT + 30 others); Fri, 24 May 2019 07:17:15 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40053 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390906AbfEXLQn (ORCPT ); Fri, 24 May 2019 07:16:43 -0400 Received: by mail-wr1-f65.google.com with SMTP id t4so1326474wrx.7 for ; Fri, 24 May 2019 04:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wJ/OTTzXkpFYyCPQfFmBGF9g9r7JKprAJcxNABvYugk=; b=gJ1stP/+skWInP/MCWzv188wslOchZmZz7clJcjMeGjOAKJVQ8ZUw6DC3QDutVoMw0 P9CD1wa68T48LNgzOL7NlendOV281v85ONTsvsKVKy7YZIlATB8R96UEy2fslY9V+hNP +AD88uTiybNf3E+9E77v6ACNBfmmGwR8DBJ4X0lOPm0ygG1/ayhIkfa66R06mrzcqHqz Bwge7jwBG8R++lmUEjjQwHdjlVQVZG28lqF4cR+8pO2kDAoNE7liSM+Qtt86AhCrDxw8 WyjbpoBwIOpNWeny42n9gNyVfmFWBgVcxTsD9vz4BKVE6P/Xyxvpx4mnB6NAQORjH68h RzTw== 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:in-reply-to :references; bh=wJ/OTTzXkpFYyCPQfFmBGF9g9r7JKprAJcxNABvYugk=; b=Vj+wcGup37+AcHBAjvkdaemg7BTh+xo0scB2v2SIAJStmD9VZMu43MhxNJjBIkMUpT JWp1i7G2U/Fqva8vNubkM+sk6stjGIqR0vveDSCyOBCoWdWJoZTNIUVpj2NycKmYwQ72 1giiEZ/gIZRJUQeY/bYobYMlQ37boxakP+390IlT8BTaBf1OF8oe3p0CAeUQvYDx9h10 LhfrNRZsbxe4bGgVoRkm6b8XYMiON4tg9HqgKa6jorM9UZjqE1su8zFlT+3cT0wwdlP7 CXgSuiv6iJNAgbqrryfTnXMM2M5+k4YJM7/Bfkpf8ZhoIBIuQeY0OmMljxxORxt5n5xe RBtg== X-Gm-Message-State: APjAAAW8WrC42vqAF/vP0Ap5rKCoexyxGMpaGR9CJugRtUGZ4FmYyPSp bRgczp0cysjn/NaSHHjOHWAh2lleLes= X-Received: by 2002:adf:e9ca:: with SMTP id l10mr4153207wrn.47.1558696601880; Fri, 24 May 2019 04:16:41 -0700 (PDT) Received: from clegane.local (73.82.95.92.rev.sfr.net. [92.95.82.73]) by smtp.gmail.com with ESMTPSA id h12sm2575392wre.14.2019.05.24.04.16.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 04:16:41 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com Subject: [PATCH V2 4/9] genirq/timings: Use the min kernel macro Date: Fri, 24 May 2019 13:16:10 +0200 Message-Id: <20190524111615.4891-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190524111615.4891-1-daniel.lezcano@linaro.org> References: <20190524111615.4891-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The' min' is available as a kernel macro. Use it instead of writing the same code. Signed-off-by: Daniel Lezcano --- kernel/irq/timings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c index 06bde5253a7d..8928601b4b42 100644 --- a/kernel/irq/timings.c +++ b/kernel/irq/timings.c @@ -406,8 +406,7 @@ static u64 __irq_timings_next_event(struct irqt_stat *irqs, int irq, u64 now) /* * 'count' will depends if the circular buffer wrapped or not */ - count = irqs->count < IRQ_TIMINGS_SIZE ? - irqs->count : IRQ_TIMINGS_SIZE; + count = min_t(int, irqs->count, IRQ_TIMINGS_SIZE); start = irqs->count < IRQ_TIMINGS_SIZE ? 0 : (irqs->count & IRQ_TIMINGS_MASK);