Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp437675imd; Wed, 31 Oct 2018 22:59:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5epuuyhqEnVWgxGlwwUec0TrSZuRHlkb0bMAOhAU0QvpDx7IQvZo1ymb4rJttTrMJd9n2O2 X-Received: by 2002:a17:902:4503:: with SMTP id m3-v6mr6380069pld.217.1541051986569; Wed, 31 Oct 2018 22:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541051986; cv=none; d=google.com; s=arc-20160816; b=ZQF9VpQnviaCgPKKUiAMO7gZv9pxFdnsIao4blbKxjEGl/9CzlzXZZEdTREW4OC5oE 6WQYCHoTtPOG/w529Zz5uovkd1+Kl79AYeY7KNHr1Qavbu36m2bTw5JBxbe1+MTdto1A PabIM804zxlKUIoXxIa2zXH09EFYCayTcgiTShGmbYuOc5wxqwTcAdwGu6thmRvFDE4M rBMBSKyO5MNLQsdkHjXI5MXZpcPoyzPKw8FvcuuJlGL/Da/Bgx+M3UpUVQkpUHe7Ykq/ ko0N8AZbdOuiPHF4XD5gPAzXgD74YOtu2mGIfmum9rZ7ziMkh6B7RnZUZQ5nTyfBTH+n IIAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=Wka7EPdZE1wJMFXxDmlVYyo07ONt9qlzyw91Su37joo=; b=XpFbXRT4DuLWXZIzEQDMPDsvygjxO/n9BIva941CmDN5keJ67985jiRFgeiwcAwAsN xG5gY9hU6TQ06kgTKp+iDpPygiWMa42XC/NJZSebdOskRUswgKccmoSHYkVZTJOx6fJY FCfskpET7+6CRQRmv4VEp2g+CZwBdwCLkH007XEGjGZzmODlan20uQAir9knOZd5phHl m33LVTyrfe7HfGztqLq9b4RZOIZBcufUY/c7HKif0imxKsQikR1z8dv7J1M9W7PpgjOn 1Xrp9hkXEdI7/LPctChyPfjEbDFSqH6HlBtIukCH6m8onyROWv529AqL2ltCFrRcCbBx I1Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YnYFX/Ml"; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4-v6si28844077pgg.527.2018.10.31.22.59.31; Wed, 31 Oct 2018 22:59:46 -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=@linaro.org header.s=google header.b="YnYFX/Ml"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727704AbeKAO7P (ORCPT + 99 others); Thu, 1 Nov 2018 10:59:15 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42656 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727355AbeKAO7P (ORCPT ); Thu, 1 Nov 2018 10:59:15 -0400 Received: by mail-lj1-f194.google.com with SMTP id f3-v6so17012733ljk.9 for ; Wed, 31 Oct 2018 22:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Wka7EPdZE1wJMFXxDmlVYyo07ONt9qlzyw91Su37joo=; b=YnYFX/Mltu6Yp9Ng1mq/3bf2bIdQpmCFYJDhCbULgzvVofTRRFQ4oasykoTU1oeBKh wpCMjxcwehN2ktCT1IR6LDjgeoVq5np7a3hZ7hKVvv88TzmNAfWEQ00j74RFDVsXA6bN 7+wb8/JFYS2EDi65weSuZcxYDQcalOuOFn+fk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Wka7EPdZE1wJMFXxDmlVYyo07ONt9qlzyw91Su37joo=; b=cLJj/o7654uiwgjtCZa29lsLRyDQR3JnTBeiRR5AgrUZEsWVhsiL4tATjXUog3aNZl W831rtBNrXZjLMCgYgy2RB1Jh9/ey/7Fyj7Z1boBpCHfzqesWxqS3NtmmTlg9tWFij6L X+GQ6+kPhBKIPGg5PbODxvy+72yVd4UxMSSeawzAlzSzAR8vmHGxXjWDgM/kdbscP7aW AuP3jIIHG7d+XVl2iDqrVsUmB/AfrbUz6iEIwXdxUL7EoeSs99SqYnP/X+CU0q/x9XrH PozWpy5x+UNe92UyHblgXHMjZD98rmdZg7Qo6f2HEFwrRt5wlbrSjizW6pGCgetbj1OL fXDQ== X-Gm-Message-State: AGRZ1gLC7pjbDb68GEPpeNbnf5Gltv2zKFlhEV1KbRs52qMHl7Zq59dd gpL7D0RH/gRsFj5q0bZVOpGCPtorNFeB2ntlzEO2NA== X-Received: by 2002:a2e:2f1b:: with SMTP id v27-v6mr3806496ljv.31.1541051862459; Wed, 31 Oct 2018 22:57:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:95d7:0:0:0:0:0 with HTTP; Wed, 31 Oct 2018 22:57:42 -0700 (PDT) In-Reply-To: <20181101004410.6893-1-natechancellor@gmail.com> References: <20181101004410.6893-1-natechancellor@gmail.com> From: Baolin Wang Date: Thu, 1 Nov 2018 13:57:42 +0800 Message-ID: Subject: Re: [PATCH] pinctrl: sprd: Use define directive for sprd_pinconf_params values To: Nathan Chancellor Cc: Linus Walleij , Orson Zhai , Chunyan Zhang , "open list:GPIO SUBSYSTEM" , LKML , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1 November 2018 at 08:44, Nathan Chancellor wrote: > Clang warns when one enumerated type is implicitly converted to another: > > drivers/pinctrl/sprd/pinctrl-sprd.c:845:19: warning: implicit conversion > from enumeration type 'enum sprd_pinconf_params' to different > enumeration type 'enum pin_config_param' [-Wenum-conversion] > {"sprd,control", SPRD_PIN_CONFIG_CONTROL, 0}, > ~ ^~~~~~~~~~~~~~~~~~~~~~~ > drivers/pinctrl/sprd/pinctrl-sprd.c:846:22: warning: implicit conversion > from enumeration type 'enum sprd_pinconf_params' to different > enumeration type 'enum pin_config_param' [-Wenum-conversion] > {"sprd,sleep-mode", SPRD_PIN_CONFIG_SLEEP_MODE, 0}, > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > 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/138 > Signed-off-by: Nathan Chancellor > --- Looks reasonable to me. Thanks. Reviewed-by: Baolin Wang -- Baolin Wang Best Regards