Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp325100pxb; Mon, 16 Aug 2021 06:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF/gHa6e8wgBybVrOi4hN4bZZ9xmNtie2DrtVfogmRje/T6h2Nk4mV+NwBYhqe9k7BIZML X-Received: by 2002:aa7:dc56:: with SMTP id g22mr20570759edu.129.1629120095689; Mon, 16 Aug 2021 06:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629120095; cv=none; d=google.com; s=arc-20160816; b=0bb5tPSrZuhUXr8Ns3Li7nJWeeNxXxwzGhLpnBvLMYGGiwSHA5m6SVBFq5Td/00kRr 3q4oN77r/8idG0gqnbdcEwN09D6d+Z6R6atPe1nVdRsrzZ3dB+JoXZkVu7RlzvBjJZyT K4kd5rAeb42a75f0x3ZqBQFKJoESY+l29w8YQiazTOSvX2OOwXJoteNG2jIs8FtSVm6p l2SUKJ4P5VgjiUTAG1CNMMqJqy6qByWvLtlUnBN/zAKUzOf/9oc9dgKXWb4JrrNhplBD CdU1DhATZJEbJNA9FTBAB/lPAYgIxnHTsfwRGcuEK65Y7VAMfJZx4GX95a8uBGOZYCi6 7YYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:from:subject:cc:to :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=xfxVTufOpmHkg6GHY87ySGvsV3ZLRddJrxsikZzhp6g=; b=zVb8g4DI+KVQNcKfdS+ySRAzaouXS3RRMmzzkNdKYchlbWoyum3vcZl0iOklIXJxbA pKYyPB036b2ID4ILx2D4m3MY+YFUAkEEh5D/UqGrxN4hvr8cwo9u/RzLCMBlhknn4Vt+ Zld85NFKn/5dba5TlGTw8ggXWGAc6ZXYL4PmJqXfbx7prVUeYFa/44Sr7puo8t5Gb3kd m/i5FDcfpB0x0Hy2g8YtF0nIEuKYIHWfYeMKsies/adp78OmNMvpBSYbuvp8eZdwlS5q jUlCC6FrnH8VarEBnW52BH0PXCW0hM6CH0XEgtd7yf1neqENswxpiiF0N8zw8P8El9Xw whAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gasm5GEl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id e19si10298099eds.335.2021.08.16.06.21.12; Mon, 16 Aug 2021 06:21:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gasm5GEl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240860AbhHPNUV (ORCPT + 99 others); Mon, 16 Aug 2021 09:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239269AbhHPNLu (ORCPT ); Mon, 16 Aug 2021 09:11:50 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64E99C035436; Mon, 16 Aug 2021 06:07:54 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id d9so14097558qty.12; Mon, 16 Aug 2021 06:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:content-transfer-encoding:date:message-id:to:cc :subject:from:references:in-reply-to; bh=xfxVTufOpmHkg6GHY87ySGvsV3ZLRddJrxsikZzhp6g=; b=gasm5GElvgx3RRzmWXq52VybAz4g5Vnh3CxewUsprhDCHopi7Zdpq3HtKXOGhfm53Z 39GL7URg+UP78AiVfyJRseh4Xp9OLOCs/fjmyGyCPYWpiSLbuvHfBxICjBc+1RoxmeYP 6v+4SEtpCP3czylhQt1O2J3B9BxYILD1klMRYjiI1d6FEorvaDhglAW9W0QoiCjbu0TG 66woKs62QnSuoK0TkgjXHb483+R3M2itoia4zHkP2XjWQlbmqHam/ZlrcOJXHbH0GksX vm7onNcxeM6usPSHPClBRmcp1foJF87cpQx11Jyc8BWGYdZ1hldIGct7EauECGdWotq4 Aduw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:date :message-id:to:cc:subject:from:references:in-reply-to; bh=xfxVTufOpmHkg6GHY87ySGvsV3ZLRddJrxsikZzhp6g=; b=j02SpZFgdx5i5qyCRr4HlinrTT0hDGuajIOo1bOeaFbH71Wkd37fyMoqlTieV+7NVO 6pqmvMrb1WHTaJ8xntk9VF1rUG44B8CbcPnKWiak1J5506mHyecHJv9EnW2B7jKQ5xsR W/N1smfj4ami/00MJUrvE6JYGr1/aIbLq2A+hWaptkyydZqaqT/W3JLmA7zGRaSbTpQi 5yuZwqP5KZUXjrKJiTgMecqXwzbkqjuMQYtYzz0I1+D9lAxXyUvQQN//3HtWdBcp2k/L EsJImpJad821JQd+EIOJ6zSwBxL95PMv2EGEbA2/LpUz+GGjz0DGyHrKwhPmXyL8x+ts vbYQ== X-Gm-Message-State: AOAM530XTUlbGlqlfIYrbQIzH7JCSIeGxlxG8GIxHvYSUS+mpZTSLb4i zvoCkWXiwepXoNYx2RQqJU0= X-Received: by 2002:ac8:5202:: with SMTP id r2mr5465739qtn.106.1629119273650; Mon, 16 Aug 2021 06:07:53 -0700 (PDT) Received: from localhost (198-48-202-89.cpe.pppoe.ca. [198.48.202.89]) by smtp.gmail.com with ESMTPSA id bi3sm6027372qkb.133.2021.08.16.06.07.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Aug 2021 06:07:53 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 16 Aug 2021 09:07:52 -0400 Message-Id: To: "Andy Shevchenko" Cc: "Lars-Peter Clausen" , "Michael Hennerich" , "Jonathan Cameron" , "Charles-Antoine Couret" , =?utf-8?q?Nuno_S=C3=A1?= , "Linux Kernel Mailing List" , "linux-iio" , "devicetree" , "Rob Herring" Subject: Re: [PATCH v6 3/5] iio: adc: ad7949: add vref selection support From: "Liam Beguin" References: <20210815213309.2847711-1-liambeguin@gmail.com> <20210815213309.2847711-4-liambeguin@gmail.com> In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon Aug 16, 2021 at 8:48 AM EDT, Andy Shevchenko wrote: > On Mon, Aug 16, 2021 at 3:39 PM Liam Beguin > wrote: > > On Mon Aug 16, 2021 at 4:04 AM EDT, Andy Shevchenko wrote: > > > On Mon, Aug 16, 2021 at 12:35 AM Liam Beguin > > > wrote: > > ... > > > > > + tmp =3D 4096000; > > > > + ret =3D device_property_read_u32(dev, "adi,internal-ref-mic= rovolt", &tmp); > > > > > > > + if (ret < 0 && ret !=3D -EINVAL) { > > > > Hi Andy, > > > > > > > > What does this check (second part) is supposed to mean? > > > The first part will make it mandatory, is it the goal? > > > > > > > device_property_read_u32() will return -EINVAL if the property isn't > > found in the devicetree. > > > > This checks for errors when the property is defined while keeping it > > optional. > > Don't assign and don't check the error code of the API. As simply as > that. I'm not against getting rid of it, but I was asked to check for these errors in earlier revisions of the patch. Liam > > > > > + dev_err(dev, "invalid value for adi,internal-ref-mi= crovolt\n"); > > > > + return ret; > > > > + } > > > -- > With Best Regards, > Andy Shevchenko