Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp518277imu; Fri, 9 Nov 2018 01:22:50 -0800 (PST) X-Google-Smtp-Source: AJdET5fWFSqU6HOmMpk6qbvwECQ49X0XuNfSnWnTP2EBVOOu6ATWyEaoVjir6jaJgpKyZ1EKsBud X-Received: by 2002:a63:88c7:: with SMTP id l190mr6661575pgd.110.1541755370313; Fri, 09 Nov 2018 01:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541755370; cv=none; d=google.com; s=arc-20160816; b=qrPGxlzS1hbDsLy8Bl4ayvPaEbMvCqiYMX12CZKJ4eiQ09jZf3TXclQOJ2h77AmEOs K4HMLW3ijwe8v+BebGqga++0fWod7+CUAoh7lKI0zizTfpt/uitV/UWMTCRVYm1eegUW loAVv/qRUBdG+IC6aW+9CSAnaRsZEIHBhVwq3Qukp76jSdO5P22gXCVi9J+AtxKrDAFL SmVQRz+onlFVCIIQp+mm5y6Zx8uQ3xC/Jora5g+RMEExMRlIqyhKrI35sU2lz5Xx1/mm 3zlguzoWmIazFlKTFPSRsnBuYzmGC5D1hdD6rurQMQtg2MJWYlombqMpM1pjrIP1u/kJ trOQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=NmPN+Owu6GiPAiCLF13e0L5saaFnuoWUktMMf+tJwsQ=; b=YYO2y1qFKrgWP9dGMBE49Q3p/vn06N36i0qNPEu+tMu6QCHsSnjTB+wDS9djDEY3D/ sET77TJMoEWjCj95tDy7zfph3oEwNCB5z+OyzAgb3R8CFKmTpAnVVL3I/+E1K57UoW3e Y6pDxqsjUgBEzDHf5C77DXv02xZlYwjMmsWR0/63HohsFgoeESBEZ4sgnfUq/x4xlWEA yKK4Go7Ldwtmp0Of61bKt1OxSU8mCkA2wHcrYwPh9Y3VgL4HmfW5WDuF+5Pvvo2S7Blf DeF06PHoRMK1ZPC0x0mNUVR6YysixwPb+HkJ4bT7scmvtZACX9MYuTtYsBMXt+evK5V/ iOLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jBrYoCR9; 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 o22-v6si6887766pll.345.2018.11.09.01.22.34; Fri, 09 Nov 2018 01:22:50 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jBrYoCR9; 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 S1728095AbeKITBm (ORCPT + 99 others); Fri, 9 Nov 2018 14:01:42 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45714 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727827AbeKITBm (ORCPT ); Fri, 9 Nov 2018 14:01:42 -0500 Received: by mail-lf1-f67.google.com with SMTP id b20so795576lfa.12 for ; Fri, 09 Nov 2018 01:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NmPN+Owu6GiPAiCLF13e0L5saaFnuoWUktMMf+tJwsQ=; b=jBrYoCR9Ut9yKMYUSJBx/MGK1qVtU3ETkar3uG9jKsffkcNDlzEQUf699GBJi1Gf0x 4MCsv/OyeWzPuB0DUrPdqvj8UKIKC9NuNhS5K1mLpzRYQZ51UL1/299LvjFlxGMmMFbT cL4NxekgAA4oF3maV9qYfMhmZWyqLifi/EDdU= 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; bh=NmPN+Owu6GiPAiCLF13e0L5saaFnuoWUktMMf+tJwsQ=; b=WwQiKc5IWUBlS0ePWx+9O57mXKapidcib8NVgu5abry3+w8jhV3V3FO/DGwHIAvEpY Qifj3Kq01qSqQ+5aqZpF6bLV6n4quGOPicMU2ofKkMKchI5tjXrAK3jXCe5pklG47AKN 0quc9czEIh73GSkwubsr5eGw7kZRg2R3IYY4648imFf83p/3LMYAOoaJlXoETH7qGVJ3 /ppCId+4qRDNGmGt3sHpBOaMKtz34dvm/31NosxR9rMa/BJ7Rrl6iBd+l8YpuChbzXES hLry6NpQ3j9OJGNYV6Id9BUzCAjwu4vpX29WZbIs+HZH8UUUIH8Q+2AjyA/vR+mEy3Vr bbQA== X-Gm-Message-State: AGRZ1gJbgpUn7nwKVYL10RB/Nn3czSr+MxWIlAV5CQ7mWOvGgq1lIpdH RGErvD8pfcTXhJeUCCSOk9Lcxd4RAX0OwH3abkYLNw== X-Received: by 2002:a19:8d01:: with SMTP id p1mr4498871lfd.149.1541755319158; Fri, 09 Nov 2018 01:21:59 -0800 (PST) MIME-Version: 1.0 References: <20181101004410.6893-1-natechancellor@gmail.com> In-Reply-To: <20181101004410.6893-1-natechancellor@gmail.com> From: Linus Walleij Date: Fri, 9 Nov 2018 10:21:47 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: sprd: Use define directive for sprd_pinconf_params values To: Nathan Chancellor Cc: Orson Zhai , Baolin Wang , Lyra Zhang , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , 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 Thu, Nov 1, 2018 at 1:44 AM 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. Patch applied with Baolin's review tag. Yours, Linus Walleij