From patchwork Wed Mar 11 12:43:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 45647 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3362E214C6 for ; Wed, 11 Mar 2015 12:43:44 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf6516290lbv.0 for ; Wed, 11 Mar 2015 05:43:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=EBO0yRTb+N4RSl4WUS9fWVRuODM+gBIknalmUA2dGi4=; b=lwKY6BL7EQBVQ+0zKIAaLXesP+i7Qu880aE0T7jhOwUWdm+htZbb5CV9QMqdVpPrhF 2yxRlcZHdOPEbR1vpB0a6w5nGfp1HfsvInNn/JXZhwTrqD9kgAQYyJJXQNUjHYqJjEhU mz4r7l1sIw5+AjFa3cQ3hEkVhx0fL2uFnPp5J3sw+S1M5UNn2l5lDblpm/ycAEsRv/vF KtCxNJYTcH9V9MkUp/4SToiB+HhL7c2yzK6vM7nlsx0ib7lOK5trJcaPqoETo9SVm8kH LQdOy3fp3uUtcAuh7Pn50VNYKh41yGyQ29ankbiKKFMf4v+PjcSakNGgwgFyA0P3bgRf P6fQ== X-Gm-Message-State: ALoCoQlMUJDAKLhpe+GGt653sW3K9Q12h9dfF7qExcgyBkTYv6oQDHRpbsdonbnjCY+a3ILjqmpl X-Received: by 10.112.148.10 with SMTP id to10mr345002lbb.18.1426077823116; Wed, 11 Mar 2015 05:43:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.68 with SMTP id y4ls158431lay.12.gmail; Wed, 11 Mar 2015 05:43:42 -0700 (PDT) X-Received: by 10.152.8.15 with SMTP id n15mr7756728laa.41.1426077822829; Wed, 11 Mar 2015 05:43:42 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id ax6si2301654lbc.65.2015.03.11.05.43.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:43:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lamq1 with SMTP id q1so8410768lam.12 for ; Wed, 11 Mar 2015 05:43:42 -0700 (PDT) X-Received: by 10.112.64.193 with SMTP id q1mr34661927lbs.88.1426077822422; Wed, 11 Mar 2015 05:43:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2752870lbj; Wed, 11 Mar 2015 05:43:41 -0700 (PDT) X-Received: by 10.70.88.172 with SMTP id bh12mr59812033pdb.52.1426077817407; Wed, 11 Mar 2015 05:43:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ws11si6771485pac.186.2015.03.11.05.43.36; Wed, 11 Mar 2015 05:43:37 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753472AbbCKMn3 (ORCPT + 1 other); Wed, 11 Mar 2015 08:43:29 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:38445 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbbCKMn1 (ORCPT ); Wed, 11 Mar 2015 08:43:27 -0400 Received: by labhs14 with SMTP id hs14so7971488lab.5 for ; Wed, 11 Mar 2015 05:43:26 -0700 (PDT) X-Received: by 10.112.131.66 with SMTP id ok2mr31545961lbb.51.1426077805917; Wed, 11 Mar 2015 05:43:25 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w9sm702084laj.24.2015.03.11.05.43.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:43:24 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Olliver Schinagl , Rojhalat Ibrahim Subject: [PATCH v2] gpio: fix constconst in devres Date: Wed, 11 Mar 2015 13:43:19 +0100 Message-Id: <1426077799-26852-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 1feb57a245a4910b03202a814ffc51a900bd4aca "gpio: add parameter to allow the use named gpios" includes a double-consted array. What we want is not const const * but const * const (const pointer to const data). Fix this. Reported-by: Dan Carpenter Cc: Olliver Schinagl Cc: Rojhalat Ibrahim Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Const pointer to const data is what we want. --- drivers/gpio/devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c index ec24da2418b3..07ba82317ece 100644 --- a/drivers/gpio/devres.c +++ b/drivers/gpio/devres.c @@ -135,7 +135,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, const char *con_id, struct fwnode_handle *child) { - static const char const *suffixes[] = { "gpios", "gpio" }; + static const char * const suffixes[] = { "gpios", "gpio" }; char prop_name[32]; /* 32 is max size of property name */ struct gpio_desc **dr; struct gpio_desc *desc;