Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5429894ybg; Tue, 22 Oct 2019 03:10:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqypI6fQ5TD0LZXtGDn2Fn1QjqAHzFEaCMhIudiABwldujAF6Mbdbb1/sOKPP5sFjUdZl6D0 X-Received: by 2002:a05:6402:13c5:: with SMTP id a5mr11393112edx.106.1571739032145; Tue, 22 Oct 2019 03:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571739032; cv=none; d=google.com; s=arc-20160816; b=uF9i2B07JHLk/KxPkRi/5/d6wC/9x3yyNMDqHb3C1/dlqx26B4IFRieuZyDgOAAtYH GQIOI6yQoAJgOnNI6A8NlnBt7h5EaWkW6scUyPovSBUtSwOxwvYFusstLTRqM7Ci5I5t zA/gLiuBqCZvlzPpIaLyJ9HlqPifvC0cegCsmYKrEfHtT7vsuEUz15F6Mr6g7p/2lJVc d1p8riLKj81p2ZxsT6TnXHggWRQCbpijFhoWPc9HoJeBpwy6MxPMhROH7jSXYibj52s9 xt+4bkrjMmPYkmBHM5iDwQSuiVaMgQD+Vv+RIAwbETOQyCSWFwqDwLjfW9MNR2XnZ+xY AQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=N4Lf/vXurb2FMKHirACMiuicrnKp9JtXq+34BD0JpSM=; b=zFgmNdVJry/bdrfDp7ClrQCIdFUiX1CHMlTmR//RU3jjYIad9M2PeSTHCzSUUL1Md7 prGMiRCO4MAE/sWbRZMOhVu56D6zv2C8jpVDQza4Su+KDMU/vMULR+tXBLnY/747dElG JaI7IlPnaTY8fmzByC40q5Rj6yGV4N+fgSS/XxnvPfMY86DSuBZIQBV+KMxVOCg4r9BA vIWMGHrID3fUsplCqxMl/8Wk1dQSyk/VbutyUSr5tSVbDl1vhytZZ5wpEK+a+zGB6vtF e8ZgnPgCyagchf1vMIM9IZM9yxiEfxEzTgWE9W4gWajjlEdcQuDGLM2TL+YdeFvxfx2K IcHw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l45si12560590edc.185.2019.10.22.03.10.07; Tue, 22 Oct 2019 03:10:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731683AbfJVKFm (ORCPT + 99 others); Tue, 22 Oct 2019 06:05:42 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:46928 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbfJVKFm (ORCPT ); Tue, 22 Oct 2019 06:05:42 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id A4C7B28D5A5 Subject: Re: [PATCH v2 06/18] platform: chrome: cros_ec: Do not attempt to register a non-positive IRQ number To: Gwendal Grignou , briannorris@chromium.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, lee.jones@linaro.org, bleung@chromium.org, dianders@chromium.org, groeck@chromium.org, fabien.lahoudere@collabora.com Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Enrico Granata References: <20191021055403.67849-1-gwendal@chromium.org> <20191021055403.67849-7-gwendal@chromium.org> From: Enric Balletbo i Serra Message-ID: <83d75a50-71a0-9dd9-e56b-5e7ec3ec5d96@collabora.com> Date: Tue, 22 Oct 2019 12:05:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191021055403.67849-7-gwendal@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/19 7:53, Gwendal Grignou wrote: > From: Enrico Granata > > Add a layer of sanity checking to cros_ec_register against attempting to > register IRQ values that are not strictly greater than 0. > > Signed-off-by: Enrico Granata > Signed-off-by: Gwendal Grignou Enrico, Gwendal, this can be applied alone without waiting for the others, right? For my own reference: Acked-for-chrome-by: Enric Balletbo i Serra > --- > Changes in v2: > Remove dual Enrico's signature. > > drivers/platform/chrome/cros_ec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c > index 739f3cffe26e3..9b19f50572313 100644 > --- a/drivers/platform/chrome/cros_ec.c > +++ b/drivers/platform/chrome/cros_ec.c > @@ -149,7 +149,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) > return err; > } > > - if (ec_dev->irq) { > + if (ec_dev->irq > 0) { > err = devm_request_threaded_irq( > dev, ec_dev->irq, ec_irq_handler, > ec_irq_thread, IRQF_TRIGGER_LOW | IRQF_ONESHOT, >