Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1578357imm; Fri, 14 Sep 2018 22:27:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6UMKIRtx/qsRME4lWopjLQSfuCFVebUMMkPQGkeqScDMIEHV+rIDE/krL0aO0NI9ekMkS X-Received: by 2002:a63:ac11:: with SMTP id v17-v6mr14488935pge.196.1536989259384; Fri, 14 Sep 2018 22:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536989259; cv=none; d=google.com; s=arc-20160816; b=RR2VHdRJmBhNzoBIcIqqYB1lPUGek/o5E6zMitrDKlPvFTsGVbisLTKtRe1OVoNuiF pbj0jtJqxhm6IoUUahDcVcl1WmJS6d6gUpKkOb9ANS0rrNhu6bpiwK0pdVNZfq2baZJ2 91jT/eKuhf+OPNBVnthSZTE2KcmMKNImZNRe/ATvAkEUmAK2I579v7reDPuSgdBPp/mY TJh5EQORRG4tEFLNBFxjhEdJdyovQYP7uyBJBpRmrXl9NigZdwDSc7D6yMB1aGeYHADF YpcstzHr2Fa9o6RHCnqwVyMbLc58vyS7QTgjQHEjzNDwZYHvoZGW5wojkPseZ0vFbhsS YEYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=O7jOysXB3AWG7qkSJvbO/cQomiQ0kilMR9/2eTU9sw0=; b=YBPdF9uAAJQlvmoFREqzfayUGJOXTzCSl4V59REEOwSf5b9aglrCZFFbQqV6Yap7JN VjlgpryATEk4iy3j237xmX3Zyg4neLKkUEvbBpANWxsdKMhTIy0+nvP7FxW4o2QbhG+h CIW7aNVuLFgvvzjEJo4Bp4jPygAKAh3VVymWKSaZSjclZ5cREHxu2jOy1DZrkYHbY+/Z kl0dMakQqD+sshj316jSEPteHlXSuPr8JniVmH4x0qwvJYstfoDxfDr9n0OJw5qiwtyi pFHdsO8MnlIhtyjkLF31J6vHyFT2SfYxTafLJ2Es9iDDjODw21cOubE6X+gMkPj9LEU6 9ELg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JU2UTybV; 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 m1-v6si8723459pgq.584.2018.09.14.22.27.23; Fri, 14 Sep 2018 22:27:39 -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=JU2UTybV; 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 S1727058AbeIOKnN (ORCPT + 99 others); Sat, 15 Sep 2018 06:43:13 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51257 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbeIOKnM (ORCPT ); Sat, 15 Sep 2018 06:43:12 -0400 Received: by mail-wm1-f65.google.com with SMTP id y2-v6so3978022wma.1; Fri, 14 Sep 2018 22:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=O7jOysXB3AWG7qkSJvbO/cQomiQ0kilMR9/2eTU9sw0=; b=JU2UTybVUIdjgCxtnkFiGT2T8AnvEgu3ghtxgmxbsSz9Tph1BcR1lb7n+9Z2wZPq7I Uu86IkUN/8p9vi1XtYjlLbFqtkqh571AAWGaYUphFLRTAvOziU1oZw8Vdg2HMIocc+BN RmdyujqzSI+awj9uS5Tkay368WkQxvc3y7IVbDoT1t1nFbEnywchwpTxxve5yGhxkY4d CDQW7edLKGI1eHLGgXSGjf7aUyzUgUG3DKbuv+gKlUvM9IUHsg8rQAeae7a2+Be/BX1D BkyYQj+tQ/itavO0yFfm8CnmsVDQsfjqVJFpQKBfonw89trNs4RxsEYRlRmpVWWsGrGm 1w8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O7jOysXB3AWG7qkSJvbO/cQomiQ0kilMR9/2eTU9sw0=; b=gYairWI+GjFmRYkrs7CvGgZ6hT1pjgeDVODz1DJK/aJ2Il42HoR0VlIxlHSSrOU3wd mn0nTUakKN64aff9WVrIc5b4ITX1w3h8ipD+6iRMYFZPAIlttjTIiKwhJSDN09QoZRBX a/RIlGLuAOWHqBOmD7hZHYp7wd8jzVaheyhlLSgFvhADQAqP3IGaOUDmKGFKWlNbFCGJ IRVV+06oPbLzCdsV5i6ciEC+WtYSD5gTCL90qagz2CgNJ9CTAnlMhZB8qQ3syCEmBiJy A6RvJsLDlSXwYUiKmpxkBVugMgTCMkiEY0p9d19lCRNeiuPpLQE9/Th9ebWLgTAPv8XS mXlw== X-Gm-Message-State: APzg51D9EHxzQq9yQyGQx+rmvIXeZTYwBUWbWSNirh0o+0JAk7eGXE6j i2jG9mt5QeH/sZ183dKcPM0= X-Received: by 2002:a1c:d785:: with SMTP id o127-v6mr4323783wmg.67.1536989130016; Fri, 14 Sep 2018 22:25:30 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id 142-v6sm804829wme.35.2018.09.14.22.25.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 22:25:29 -0700 (PDT) From: Nathan Chancellor To: Jonathan Cameron Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor Subject: [PATCH] iio: adc: max9611: Avoid implicit enum conversion warning Date: Fri, 14 Sep 2018 22:25:11 -0700 Message-Id: <20180915052511.2243-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns when an enumerated type is implicitly converted to another. drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain = gain_selectors[i]; ~ ^~~~~~~~~~~~~~~~~ 1 warning generated. Change the type of the variable 'gain_selectors' to int so that Clang understands this is expected behavior. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/iio/adc/max9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c index 0538ff8c4ac1..3c358b16a8fa 100644 --- a/drivers/iio/adc/max9611.c +++ b/drivers/iio/adc/max9611.c @@ -275,7 +275,7 @@ static int max9611_read_csa_voltage(struct max9611_dev *max9611, u16 *adc_raw, enum max9611_csa_gain *csa_gain) { - enum max9611_conf_ids gain_selectors[] = { + int gain_selectors[] = { CONF_SENSE_1x, CONF_SENSE_4x, CONF_SENSE_8x -- 2.18.0