Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp944052imd; Thu, 1 Nov 2018 07:59:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5fXle6wqcKMJaSJCFwihP6tRHJr4Cgoat3w75kYtMRhSrwLJlWgx6neGzgwYFFXROKf4Qs5 X-Received: by 2002:a17:902:4624:: with SMTP id o33-v6mr8033925pld.285.1541084381564; Thu, 01 Nov 2018 07:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541084381; cv=none; d=google.com; s=arc-20160816; b=SWgEK4NQuz0NeyRkibYDlcUMfVS2Wt6CEmwp0TGJYGZ12nyfymL7csLvaEd74qYdnN 6qRMgc0Nq3f0YZg/GchDhV6dAAqJb3NMRd8S9KtVlcY5chQ8H129seKEp9mtm/97QSK/ kzXrfaKisFomBQtMbvMmE8XngtX815TJQyDPB5LDClDbFNGY7roDkfIlXNpvAsC4+iMq KJbcRot3HDBx3LPvYRSHSFIOloEN9Ep3ot31TGJLzVEnHYvodqXiVYTfYG3lNrqA4N+Y xAnl+nZQL09XKuL2pDKgWTPvkFxRm1lWdIBfqrbpk6YsyPMbRTRpEFNNBFkjXsrQQt2S FktA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1yYQgweBmd+LLPRmIKCZ/aDnJBAyOlWQmxelwoswz7A=; b=UnfKxDXuZwVCLL5DQdgZBNWqOdLN0knTRlQXoG6ukOue8PkrvtqK/KknMX3R6atPId 8o3uixKfTMqCPjz/se+4TjE0fID7sQ2pryDhW9GFDUn/4zzX8/x0jj9j2YvhB25sETn0 +DnLTTaOWj+YfsJOUDOLtGVjykYqes3iOh7kO/4hCxajx7icPane3b7UmaPT/Rou0Hbh IMv/haOrVIdzklL12HYJo09dvvvMstEYOvydgJDprrHFztSO52fgi6jx7pE0093QaCOL DDp8DDP6fhgJVb+aT+ARZAimjULVjm+jkQzk41F6uL2GboFjJWMgcKt9AaviZhRVZzkp bFQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LYo54SDu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28-v6si24931596pgm.300.2018.11.01.07.59.25; Thu, 01 Nov 2018 07:59:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LYo54SDu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728763AbeKBACO (ORCPT + 99 others); Thu, 1 Nov 2018 20:02:14 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45737 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728440AbeKBACO (ORCPT ); Thu, 1 Nov 2018 20:02:14 -0400 Received: by mail-wr1-f65.google.com with SMTP id n5-v6so20341439wrw.12; Thu, 01 Nov 2018 07:58:54 -0700 (PDT) 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:user-agent; bh=1yYQgweBmd+LLPRmIKCZ/aDnJBAyOlWQmxelwoswz7A=; b=LYo54SDujVHmrcxTQ6HJvmbfHmIHxfMYaJtqVzOWbpV3o55IjFUKY3gg3hQFpe5Zz4 joGTM0kp9pmjIu6MoA5emHCSwyZbR0SXowwxVFlX7HQABpfxX8GN063x727+KQAw6BW9 UFuj6JsmTOR/d+6PoEkFN3ATcST4tWhDDhGuhcyheT3PAx6qvo9dXoTibjQ9TTeEL5nL TCCM7msbO2nC5ZNX2v8qZXwPrR2m525D/Ho1hORD3iLlQxO7D11prPoESipmENNUovFg 1/BoRHyDAyXelUIrNGPHflq/v/npEYCxIacLW+UP/4NwPTQTwUzlppASDOxQlpEIWhGW yh7w== 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:user-agent; bh=1yYQgweBmd+LLPRmIKCZ/aDnJBAyOlWQmxelwoswz7A=; b=NgX7scbyB4lZUT8luCAFqFKhfXn9csK4KXsQzb+eBPA4GbtXPY9tj8smJEpV38P5e3 PaJLUfPwlq8wXVWkJ1wh0yaXLpt26OkmmQxjBs1enyPRVj5dku5UpOg9q2FtU11EBVDw hv/pROxYT97/XQjeJ/sZzZvVY2DJYmrlZZDv6107EUSik0SdqloJy6fri1mLoGifSv2s /Dls5AE3bqEPsr1w1wkJ8S+c+JgCV5T0ZhJwL5m5foyLRlp25NazME6SyjqHroPkjkjl 8rcl/S98L9p50PqfOjC8AhyYxejNSJOR/TA15PXM2At6XTfFj0eVtkUA4pR1v/p8XxK2 L+bQ== X-Gm-Message-State: AGRZ1gKqxUnQiCNDzbjj9cN6lpqVuPeyby18et5WIoP8Pc1wnvVnP+B+ p5gpul/KB8QPG6brXc/U0pjqNxvIi2PTAg== X-Received: by 2002:adf:83a4:: with SMTP id 33-v6mr6712666wre.13.1541084333425; Thu, 01 Nov 2018 07:58:53 -0700 (PDT) Received: from flashbox ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id 134-v6sm23006407wmp.6.2018.11.01.07.58.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 07:58:52 -0700 (PDT) Date: Thu, 1 Nov 2018 07:58:50 -0700 From: Nathan Chancellor To: Vladimir Zapolskiy Cc: Linus Walleij , Vladimir Zapolskiy , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [PATCH] pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT Message-ID: <20181101145850.GA13794@flashbox> References: <20181101005257.8778-1-natechancellor@gmail.com> <0af2686f-3d9a-3ca6-e5c2-2955ffbd8bd5@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0af2686f-3d9a-3ca6-e5c2-2955ffbd8bd5@mentor.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 01, 2018 at 10:52:14AM +0200, Vladimir Zapolskiy wrote: > Hi Nathan, > > thank you for your patch. > > On 11/01/2018 02:52 AM, Nathan Chancellor wrote: > > Clang warns when one enumerated type is implicitly converted to another: > > > > drivers/pinctrl/pinctrl-lpc18xx.c:643:29: warning: implicit conversion > > from enumeration type 'enum lpc18xx_pin_config_param' to different > > enumeration type 'enum pin_config_param' [-Wenum-conversion] > > {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, > > ~ ^~~~~~~~~~~~~~~~~~~~~~~ > > drivers/pinctrl/pinctrl-lpc18xx.c:648:12: warning: implicit conversion > > from enumeration type 'enum lpc18xx_pin_config_param' to different > > enumeration type 'enum pin_config_param' [-Wenum-conversion] > > PCONFDUMP(PIN_CONFIG_GPIO_PIN_INT, "gpio pin int", NULL, true), > > ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from > > macro 'PCONFDUMP' > > .param = a, .display = b, .format = c, .has_arg = d \ > > ^ > > 2 warnings generated. > > > > It is expected that pinctrl drivers can extend pin_config_param because > > of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion > > isn't an issue. Most drivers that take advantage of this define the > > PIN_CONFIG variables as constants, rather than enumerated values. Do the > > same thing here so that Clang no longer warns. > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/140 > > Signed-off-by: Nathan Chancellor > > --- > > drivers/pinctrl/pinctrl-lpc18xx.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/drivers/pinctrl/pinctrl-lpc18xx.c b/drivers/pinctrl/pinctrl-lpc18xx.c > > index a14bc5e5fc24..4bee606088e1 100644 > > --- a/drivers/pinctrl/pinctrl-lpc18xx.c > > +++ b/drivers/pinctrl/pinctrl-lpc18xx.c > > @@ -631,13 +631,10 @@ static const struct pinctrl_pin_desc lpc18xx_pins[] = { > > }; > > > > /** > > - * enum lpc18xx_pin_config_param - possible pin configuration parameters > > * @PIN_CONFIG_GPIO_PIN_INT: route gpio to the gpio pin interrupt > > * controller. > > */ > > -enum lpc18xx_pin_config_param { > > - PIN_CONFIG_GPIO_PIN_INT = PIN_CONFIG_END + 1, > > -}; > > +#define PIN_CONFIG_GPIO_PIN_INT (PIN_CONFIG_END + 1) > > > > static const struct pinconf_generic_params lpc18xx_params[] = { > > {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, > > > > The change, if it is applied, starts to produce a W=1 warning: > > drivers/pinctrl/pinctrl-lpc18xx.c:634: warning: Cannot understand * @PIN_CONFIG_GPIO_PIN_INT: route gpio to the gpio pin interrupt on line 634 - I thought it was a doc line > > Could you please take a look how to satisfy process_name() check from scripts/kernel-doc? > > My proposals are: > 1) change the first line of the comment block from '/**' to '/*', > 2) remove '@' prefix symbol and place pinconf description on one line. > > -- > Best wishes, > Vladimir Hi Vladimir, Thank you for the review! I will go ahead and send a v2 with that fixed. Nathan