Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5576783ybc; Wed, 27 Nov 2019 06:17:04 -0800 (PST) X-Google-Smtp-Source: APXvYqySHWFSWEtuac9CBscYJXdV1F0pZAVoGIL23Pgv+W+/w+YGuMW0g1M+6ocKe5x5oyUjFXU9 X-Received: by 2002:a05:6402:2299:: with SMTP id cw25mr26324304edb.36.1574864224112; Wed, 27 Nov 2019 06:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574864224; cv=none; d=google.com; s=arc-20160816; b=KEZ7sTqvLKUPOFJB4P4ymXfxjbqwUMPo+BzHNFJugCfbTRrmv/rvtoDrE0a9j8k24J 6RoD8mw2SbIafyPyBly/jZNcbtkBl7jULzmAexj6L938aI8hn9lPpFbosE63zkl2OTgr 4ETmPxNTCgqIV7FXouFocibouCnu+daGmAQnFjxIlqlnbw3vfVBY3R10jWlBgoNa6a8M BuS5aDk8mlY89JnjYTkRDQBncABPSAuaKT48sVPqHjpiTlGY5Sw5UqWYIYa/pZbOztpt 4AO3sCAxURdf95k+qLVGdEhAY7wwYNLhsydG1MvRZYIPaRwMambvXA0VJu7V8mfTkKi7 +d/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lgEavlNAgIM937fkPmZM9fMs87PuEAdBjmiUlxGtsXM=; b=eBiOE8SZ+u5DlM68KWx+4kS9NSHeKIGk37pZtipm/b/BwPNL9CohgMO0EMWhaNvFgF i+PruSNyBU1+27R3QQfngCX0PFeRvuiMHjsQoUmkINm529CU4nOgpknx98gucAA/tHjW YQz9vqpancIB5xr71zG50xF1LASuhBzKRYLlam/IaEKwu/e2gefPX5qq6MG0CrEhMG9C YKY+XB5X12pKLTOTkywp7Mc4h29ppUYWi4xoHVj9zDww3JrqGSnc07hQgACBQug5KTll EyXXoaHGVsSqDYbk0H/5YInGXRv+A1C9BqLa2UKz3iEB/C1f/hAQ/BY8Jm3nv1R5FnpB pkuw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si10676574edv.245.2019.11.27.06.16.39; Wed, 27 Nov 2019 06:17:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfK0OPl (ORCPT + 99 others); Wed, 27 Nov 2019 09:15:41 -0500 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:43267 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbfK0OPl (ORCPT ); Wed, 27 Nov 2019 09:15:41 -0500 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id E725A3C057C; Wed, 27 Nov 2019 15:15:37 +0100 (CET) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bipKjdt3AzRZ; Wed, 27 Nov 2019 15:15:32 +0100 (CET) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id D79383C00BE; Wed, 27 Nov 2019 15:15:32 +0100 (CET) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Wed, 27 Nov 2019 15:15:32 +0100 Date: Wed, 27 Nov 2019 15:15:29 +0100 From: Eugeniu Rosca To: Geert Uytterhoeven CC: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Rob Herring , Mark Rutland , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , , , , , , , Eugeniu Rosca Subject: Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver Message-ID: <20191127141529.GA18189@vmlxhi-102.adit-jv.com> References: <20191127084253.16356-1-geert+renesas@glider.be> <20191127084253.16356-6-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191127084253.16356-6-geert+renesas@glider.be> User-Agent: Mutt/1.12.1+40 (7f8642d4ee82) (2019-06-28) X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, Many thanks for the series upgrade. A few static-analysis findings below (could be false positives). On Wed, Nov 27, 2019 at 09:42:51AM +0100, Geert Uytterhoeven wrote: [..] > +static bool isrange(const char *s) > +{ > + size_t n = strlen(s); Cppcheck 1.40-18521-ge6d692d96058: drivers/gpio/gpio-aggregator.c:69:11: style: Variable 'n' is assigned a value that is never used. [unreadVariable] Smatch v0.5.0-6150-gc1ed13e4ee7b: drivers/gpio/gpio-aggregator.c:69 isrange() warn: unused return: n = strlen() [..] > + aggr->lookups->dev_id = kasprintf(GFP_KERNEL, "%s.%d", DRV_NAME, id); > + if (!aggr->lookups) { > + res = -ENOMEM; > + goto remove_idr; > + } s/aggr->lookups/aggr->lookups->dev_id/ ? [..] > +static int gpio_fwd_get_multiple(struct gpio_chip *chip, unsigned long *mask, > + unsigned long *bits) > +{ > + struct gpiochip_fwd *fwd = gpiochip_get_data(chip); > + unsigned long *values, flags; gcc 9.2.1: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] [..] > +static void gpio_fwd_set_multiple(struct gpio_chip *chip, unsigned long *mask, > + unsigned long *bits) > +{ > + struct gpiochip_fwd *fwd = gpiochip_get_data(chip); > + unsigned long *values, flags; gcc 9.2.1, same as above: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] Should these be silenced like in 2bf593f101f3ca ("xilinx_uartps.c: suppress "may be used uninitialised" warning") ? I plan to do some runtime testing soon. -- Best Regards, Eugeniu