Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1035279imc; Mon, 11 Mar 2019 05:10:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV4803ClV/EDiDc3Jj5QA1FRI9mqpmO3pDdsaqd+JjqKXO3NbbOpsX53lOm+0fS/b38Y4T X-Received: by 2002:aa7:8497:: with SMTP id u23mr33154826pfn.253.1552306243383; Mon, 11 Mar 2019 05:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552306243; cv=none; d=google.com; s=arc-20160816; b=hGwOgYGxbwIm5vpfSZbqjubEE2qnDuure67NWDh6qP5R2G1nraI+1MUAyXenpTGRh5 HX5Doy5r+4aS3rOe4w1SSRE/zEI53TEU2Fka2qhWdPX5pMsdeFO77hE301jeoVuqwoMK UPZTyfdqlYz/41cxvXG6Rvx7ZkxAfuBxoNaYDvPu2YTqOXAnodYVSzfuVMlPHHyF7gqG /JsKO3A6UG68Exf25lNfqjFwQ1K3inirrsVtBq31K6v062mel/UON0BKiPmfPDQYRBIa T67Eb2z4uZWYa0RYWvyBnAzGpPj4B1po4sRqOxoym/Dpd6gUXsqrUeaHYXsgh+aVZoJX yJJg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=ksJAVEyYy6j1aUAP1NhqnNc5Xp3lwJHIrPrNsa2lLnQ=; b=fuGLmlJAOelcNjYRDLmzXCOa2pGXWDAeejUqIrXFrE7fIwvZFqZ+LY70TcpvyIlk6E M9iSUn37m0kg7rluQ1OPKkYyhTQkuN4GJiU5ysv2DkaLebXOhfqAsC1Ft2XWzJB61rEx xLjETPats77uiaoBMoHBSuN3bnve14ckqzvhrORlxilzr8gTrJBAT1s5obDMMyaNLj4f 7iNDPbpe44+vN71PdyEZMp5+3eHBBQ4+SjoqiJNShLMjV2WS9CKReOAxW6kKXkR5/7h6 /FeDCBCRf7EXPOfviBTsMiZjgHmxBrndsTHpKQcfJaRb0Ayo4KhYXsoWwMQJsS/tB2Ov PpkA== 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 17si4897749pgu.262.2019.03.11.05.10.10; Mon, 11 Mar 2019 05:10:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbfCKMJj convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Mar 2019 08:09:39 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:41876 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfCKMJi (ORCPT ); Mon, 11 Mar 2019 08:09:38 -0400 Received: by mail-qt1-f196.google.com with SMTP id v10so4651408qtp.8; Mon, 11 Mar 2019 05:09:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=F9xZ7hfJToXhyAYcSKA/tTjG0XHQ0y7p6x3W7IWJTDg=; b=NMh+gmt8QdFTuXDyMlRTCdrqn9zZ2pa2cCejboir/a76+bNM+rGxLSMDqos7EmTMMK qrPGtMGyPh8kyq7JsnG150Rw1sfRllp5pUO7Zee/f5iZzxHl1UkDtUq4Hi13MTGS+iv9 lD7Zy0pb2wOKXpEhsTQs8FWmKMz6m5MfqcvySTdifHN0D0juJYBqNvsk8VSEAIRLvePL uRXHma51GqT+x7no98xGACkbYCq+g9L+Ac9b7LeiVn8PKY6KlfyMHuxzN5T4Kgx/QQ/I vI2YZM61g/o6xCCV1FWm+wRl1DbZJkqahvBTXzW7YYyp0K+qTQZdMCc8l/9+tW0tnveP uGBQ== X-Gm-Message-State: APjAAAVuSDt0oOSdAtBki6J4NEGcvOG/c/M3fDzHhBSQosiZ4TxNoHRR amX4y5RUCoDmjrFKWzhCbyIHf7Pwo56CXXfOSSrOFw== X-Received: by 2002:a0c:98c8:: with SMTP id g8mr25981737qvd.161.1552306177664; Mon, 11 Mar 2019 05:09:37 -0700 (PDT) MIME-Version: 1.0 References: <20190307103348.1591457-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Mon, 11 Mar 2019 13:09:21 +0100 Message-ID: Subject: Re: [PATCH] gpio: omap: avoid clang warning To: Bartosz Golaszewski Cc: Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Linus Walleij , Nick Desaulniers , Tony Lindgren , Janusz Krzysztofik , Wolfram Sang , Linux-OMAP , linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 10:40 AM Bartosz Golaszewski wrote: > czw., 7 mar 2019 o 11:39 Arnd Bergmann napisaƂ(a): > > clang warns about a tentative array definition in the gpio-omap driver: > > > > drivers/gpio/gpio-omap.c:1282:34: error: tentative array definition assumed to have one element [-Werror] > > static const struct of_device_id omap_gpio_match[]; > > > > It's best to just reorder the entire file to avoid forward declarations, > > which lets us use the regular declaration. To do this, the unnecessary > > CONFIG_OF check must also be removed. > > > > +static const struct dev_pm_ops gpio_pm_ops = { > > + SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume, > > + NULL) > > +}; > > + > > static struct platform_driver omap_gpio_driver = { > > .probe = omap_gpio_probe, > > .remove = omap_gpio_remove, > > .driver = { > > .name = "omap_gpio", > > .pm = &gpio_pm_ops, > > - .of_match_table = of_match_ptr(omap_gpio_match), > > + .of_match_table = omap_gpio_match, > > This doesn't seem like a logical part of this commit. Can you send a > separate patch? > > Other than that, looks good to me. This change has to be kept together the with removal of the #ifdef, otherwise I'd introduce a new warning about an unused variable. I could try to split out the reordering of the file though. Arnd