From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF061C433DB for ; Mon, 28 Dec 2020 11:59:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74D6A207D0 for ; Mon, 28 Dec 2020 11:59:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74D6A207D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DJm97cen7MI56iYR6UbOa4/QJlXjd8Xu+7mE6gwHo2o=; b=ngChYNWY6UOguKIWYzVJwlaNh Of81Hijqu84G+3sJZTIa0o/JqLe7HL6K+iszXkdg8FMMqeYIlHLAExBbSc/TneSxrFPR0zimB0+KY ssfS5Mi2XTbFLd8GMCBxzg/5uTUhni9fePFf21SZHS+WDrzIUo9TK8g6G5/P63RIrTGyGX59eBPnb +JAB8Fmdm355LL5c3jDHphkZlmZfJeWiKErH9RCEOyGVTRby9Nnzd3+hjZfCT+tTBFoIoZVlksvbu FBiSQemLrZMUE5d1h2kP0yeNGx+QVRqXXe4nHee4HYIukUftWSlkgelNnVetw91HTb4NxLMgGTB2r hFkHz5/XQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktrAG-0006Px-KO; Mon, 28 Dec 2020 11:58:16 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ktrAE-0006PD-5b for linux-arm-kernel@lists.infradead.org; Mon, 28 Dec 2020 11:58:15 +0000 Received: by mail-qt1-x82f.google.com with SMTP id a6so6708802qtw.6 for ; Mon, 28 Dec 2020 03:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=U8Y4zcff79mAAXHxbU1KUQj6tU5Sz/KA9ZIKQ+FBrS0=; b=R80QhhwAtEWUlOyeF1If1yXZDKXFaGqMPnmNpny40ZnjbrG3DwetkpnrbDBh6kRKqy YYFKfrdl+NpNYQOhxhS8Vjccmt8MMpSSBDxFSpctTglMi6fI+rrpQa8K8sR9EVTqRUC5 VaRgB60sQg1ZCp2OkLz9ro0mH/1GTY17dIG4N91dxb5iB8JDwN1/vV38c87pIna5hGex x3cjauJwSipdXQRC2+5VBfMPplkZS/hVur0cpNYtHzVmxT0pJ6h4hhoKg3V6fzfNa1cd EcgC+d2aLQW788RIoKFF6UfSCnKcvqcaWAiJ+YXFkFN5fBlJyGIKgWqvzqWQ/SC88nNh UcrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=U8Y4zcff79mAAXHxbU1KUQj6tU5Sz/KA9ZIKQ+FBrS0=; b=e0f3DF5Ei/6iSS+ZZV4shwq+XR7kAv2yf4RRNowZNom3MHUb1+Y4ftMl5KIOE8CYOd k39IiL+fKAAFry9S1fb4D9ZonI65OcXKU4YLjRKfEmNtMMJsw4Pt90hb4WcTMhqBy/uz 4Qz9RReA+S48fc7wothIhjOxRCMnqmFTpPpsdKeP1IAnnVv979s3HCH22A0Jfomh6PA3 0RI8sJxOtyE7r7oJhg1UfDWmBfRg/vOTGRvTQeNrj3nBw6lpPGdHvxTNquTRDqeJMOXZ w9OhujQIo2JKMD1B+ItAp8AJaZjyQ5RuLlbDFJwZgwRxCUDF5HsqoNBJXSBz1K/f/uwg X0Zg== X-Gm-Message-State: AOAM532Y3rDtTZXtBXFYT+gNc2o6hYNzHMBY5ZKTdzOjrBp7EOCcRhBC 0eM8mn2W9ecuaij6+KxB/P8= X-Google-Smtp-Source: ABdhPJw8iEqOCUKzf/9ZHD87vCS6FtjwSGDcYNSThtu35ycaTW2YZotStOfFgcVAt4u/iaw9q1oVSA== X-Received: by 2002:ac8:6b59:: with SMTP id x25mr43733692qts.301.1609156690714; Mon, 28 Dec 2020 03:58:10 -0800 (PST) Received: from shinobu (072-189-064-225.res.spectrum.com. [72.189.64.225]) by smtp.gmail.com with ESMTPSA id a3sm22982781qtp.63.2020.12.28.03.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 03:58:09 -0800 (PST) Date: Mon, 28 Dec 2020 06:58:02 -0500 From: William Breathitt Gray To: Syed Nayyar Waris Subject: Re: [PATCH 5/5] gpio: xilinx: Add extra check if sum of widths exceed 64 Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201228_065814_252394_40BEF898 X-CRM114-Status: GOOD ( 17.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, amit.kucheria@verdurent.com, arnd@arndb.de, yamada.masahiro@socionext.com, linus.walleij@linaro.org, daniel.lezcano@linaro.org, michal.simek@xilinx.com, linux-kernel@vger.kernel.org, bgolaszewski@baylibre.com, rrichter@marvell.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, rui.zhang@intel.com, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============5129056554401742571==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5129056554401742571== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="z/sB3ZR0Cgnq1Jxg" Content-Disposition: inline --z/sB3ZR0Cgnq1Jxg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 26, 2020 at 12:15:20PM +0530, Syed Nayyar Waris wrote: > Add extra check to see if sum of widths does not exceed 64. If it > exceeds then return -EINVAL alongwith appropriate error message. >=20 > Cc: Michal Simek > Signed-off-by: Syed Nayyar Waris Hello Syed, This change is independent from the rest of this patchset so I recommend dropping this patch and instead resubmitting it separately as an independent patch submission. William Breathitt Gray > --- > drivers/gpio/gpio-xilinx.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c > index d565fbf128b7..c9d740ac711b 100644 > --- a/drivers/gpio/gpio-xilinx.c > +++ b/drivers/gpio/gpio-xilinx.c > @@ -319,6 +319,12 @@ static int xgpio_probe(struct platform_device *pdev) > =20 > chip->gc.base =3D -1; > chip->gc.ngpio =3D chip->gpio_width[0] + chip->gpio_width[1]; > + > + if (chip->gc.ngpio > 64) { > + dev_err(&pdev->dev, "invalid configuration: number of GPIO is greater = than 64"); > + return -EINVAL; > + } > + > chip->gc.parent =3D &pdev->dev; > chip->gc.direction_input =3D xgpio_dir_in; > chip->gc.direction_output =3D xgpio_dir_out; > --=20 > 2.29.0 >=20 --z/sB3ZR0Cgnq1Jxg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAl/pyEAACgkQhvpINdm7 VJLsGw/8Cv3JQXOVSwstx+cGE1n13j0ohOymx/WpFxbkcaN/HaqAcR3gV2DD56YG 7UPGf1n5YSUr4JTgfBWq0J475/dk6Q+sPZeOdIcm9sRBHPEdR6ag2C0BqIWSIL+x bs9k7R2Ar+ctEWyegUD35gTYFbsay3Xapoa+4TLv136Q0WS6+ryyTmokZuqThvxz qp3gzBWDctL+8TUKnglpVg3Vj2JWn3/11Jo7/cR1QohDMIVH3VB2FRCwJ5kcS/9+ i2lCrziMRzFy6317zHwG5ezb6+BgFy5wiRUtfv1WSC9cV+bLhrclX/Ym1VAO+DBF ucIv5pLzRkQPd9GwHpQTzrU3OV5dr709TAvByotoyfUKjCEByPM1n4mwuO/7wC4L DjbBr6nYGY56ZucJkg2dumemG79QFlYbYLLL9bquYCHnyJ1uKFt96cqcMsogA2n0 Jpnla4Ve7JblToYf+FTiPvx0oObTZwL0pjs7sVniWxfSDqRcaIS+adMOrHRoWJD+ mPQ1M1k9e5COTw354uALzkmoWD5sz2VZid2BxBtGxu/fuZE9KvdspvdoXXKFSfWB VvUaolYVp6PQDQgJdJd7JOLxOuOsZMAF0j00iFH8UfymKNUb50THcCc7RlwJCRyr Z19eyPdogHQ3ugmC24PddWmzz+RuXQJ/SrMTzNI6JUeodiuHZVA= =WBuc -----END PGP SIGNATURE----- --z/sB3ZR0Cgnq1Jxg-- --===============5129056554401742571== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5129056554401742571==--