Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5061265imm; Tue, 12 Jun 2018 01:42:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI71bj9T8K1DTvbpoViZSaDxtjDle3CtIxwKW6B0skLv+2Fa5OAI4bTaE3ISJYktnHSE6gQ X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr3034015pld.280.1528792978420; Tue, 12 Jun 2018 01:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528792978; cv=none; d=google.com; s=arc-20160816; b=iIuYGyZ9aiGJ6YP7DlqDQIlG/8XQDuPFQjYTSlwRySbqAUseR3cZBMTtM6/VWdkB60 JM4fPtwCY/4unJSBNIv2k5stxGCD6fuJ3V8nDU1F1avmAJHGi7ScDkSXIwITHKO7KaQP pIpYGYWUHbH0TQCEYyFZHTHdKkPq73rhf49X+DwnePn6y/MqVkcs1fNwtPqNvstgvcOE 0ll1Wso46JLoU+uXzyExmcBwsTvv/irxYRoj+fNSCcZHPOq3HgflYyM+JirbWOgg7V0N 6O7wGPf67XrEJyvMkyjYbEj7krjEzEpruHvSOE/0NrlbKmFpNRjPtbJbusdcIo7rL8EB zekQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=7Qk6eG9NSA+esUpuqsnwNoC8/IZiapYuZOkg1RG2Jk8=; b=UpyEVkfku+uXSFcDfONfs+BhXsPR4bd0X7bW6mjDomgS9KlXwzDiydTEPAVELWKhca Bk7F+U0BpV6lx1OtHkFcDyJy/mUHLB5Nkz+F6AZFspdseGp/ecVVCoWurQvOh82wVoCj hgkEekz72e7TSeIQD5g83BKYx1wq20ncMSet82HIVT0KHEz27KcUHi5xJiw+1ox5VEPR AlcmWrpDyiPDMGP63TSHFNQq8sCS5NlZI+l8gmB2T5Il88pPpJ11bG7uB1otcVn0KHIS deA9onWD8Gt/veHJAnAeUbUTruv5rVhgyQWXSb72ETEygmLWEm4Y1QPNZBoyB+E7TtZ6 TIfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iXt62x9c; 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 z3-v6si397830plb.246.2018.06.12.01.42.44; Tue, 12 Jun 2018 01:42:58 -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=iXt62x9c; 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 S934009AbeFLIkd (ORCPT + 99 others); Tue, 12 Jun 2018 04:40:33 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:40977 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933363AbeFLIkX (ORCPT ); Tue, 12 Jun 2018 04:40:23 -0400 Received: by mail-io0-f193.google.com with SMTP id t5-v6so27093366ioa.8 for ; Tue, 12 Jun 2018 01:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7Qk6eG9NSA+esUpuqsnwNoC8/IZiapYuZOkg1RG2Jk8=; b=iXt62x9cToEJQFKWNGPuMCKyZKpbap1OcCI2FElC245QpOWDvt7A9FTZRvIm8kho2f Lz7XqH8d6zfJLjp9taDOGZ8PJHVV5L0wHiC2mO1NmT6mRbUWdGlsuztIvudJELOSVYoT xrwk6vt0vEh8gTumTmRuExBWYtesj5Fp/9Rg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7Qk6eG9NSA+esUpuqsnwNoC8/IZiapYuZOkg1RG2Jk8=; b=Lf/D0ySwgCgCSCRv8qGAQott9oSULsBJ0gEdGB7BZ2NqPlpRyE8R52gmI91xTBb5iI Gt2LQdEIPpK2PTbEmgJ5O90ozmzfXTNQJv/rQAeyOA31VwczHekLLzVRy6xmeU5ByqbO 7RQg3ldMXrjXqmjWhq8/v25b8Cjn9+faBxdPtETtcMaJg5mrC2vszEwX+g16v0F8C1iB FqbzwW6oEkAiP1Y0hA8MK5xjbddCG7a5rS4gzszB7S3NIzT4wrhvJ3g0sdlKP0r6LWfQ DaPM8LIDMOLR5L+5KkTq2MKk2S7T9f3FtZb3jcE8rTHV3VCiKMcAgNL1Rr3jMu7nd7po TB5Q== X-Gm-Message-State: APt69E2dU5vd3LUI7qCmR3dgm7JYA+B4PUIIcn7jh/zPpIoPXAGNkuSX 7xPAMXTWMmp9Th4ODyiSircjj3JSd4ia1eYTxUXZIg== X-Received: by 2002:a6b:4a15:: with SMTP id w21-v6mr940805iob.277.1528792823245; Tue, 12 Jun 2018 01:40:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:78c9:0:0:0:0:0 with HTTP; Tue, 12 Jun 2018 01:40:22 -0700 (PDT) In-Reply-To: <20180604135814.101343-1-namit@vmware.com> References: <20180604135814.101343-1-namit@vmware.com> From: Linus Walleij Date: Tue, 12 Jun 2018 10:40:22 +0200 Message-ID: Subject: Re: [PATCH] gpio: Fix wrong rounding in gpio-menz127 To: Nadav Amit Cc: "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 4, 2018 at 3:58 PM, Nadav Amit wrote: > men_z127_debounce() tries to round up and down, but uses functions which > are only suitable when the divider is a power of two, which is not the > case. Use the appropriate ones. > > Found by static check. Compile tested. > > Fixes: f436bc2726c64 ("gpio: add driver for MEN 16Z127 GPIO controller") > > Signed-off-by: Nadav Amit Applied as a non-critical fix as I have not error reports. Yours, Linus Walleij