From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C6573A0E80 for ; Tue, 14 Apr 2026 10:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776160877; cv=none; b=vCPcMkPhU2OMmLND1Xjv9w/IJEZ8+mvAZjeGncSV30ZRJZ/5/SdbdZMQQZ7AylV4wE8pj8RY6rSH+/Py9XsrHv+Udg1CP3uGlHaXHAXm8xnofMFvIJZ5AEWJpoiXmGHsDOnM0LUNwcsSqK5I0tfR0sOlJMtghKT8TRMurKBUc/w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776160877; c=relaxed/simple; bh=TWATlZzi4X3A/WHpzDDEDpfZXW5I0qaXm1jnhT2bBQ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AU0B96nAb5Wppztd6BptKqEbgkMPwPkidKGRcGw/gHotDTTIF7HvvGIwZKM8IdF5CW1WInI2LzT/4ErlynlukW8KhR+OoAVraYG+d+N3DTdO4yvNQNvWGnyijDWkn2gdSG6TknDQofoOJmFRsBf/WO33XrsqQYk9RqD5cAGev3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EhO4uBYu; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EhO4uBYu" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4887f49ec5aso65903445e9.1 for ; Tue, 14 Apr 2026 03:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776160875; x=1776765675; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=vod8BXIWHFvHjyIgPVqzoMi7Ge1BDJsuhw5OvwgKjQg=; b=EhO4uBYu+sWRH/xBkWXX/XsfNnslnF1rhdVuIElmAKeKsHDrjqY0jVfcJW9YeWDIga PbVvd4lY9lnKuHKbCwAnbl04JseOCIwlByJUGLu32IbiNrk9n47mpbA08MC1+nCKbIgx IxqCBYfLypNtzfshT7eYxMtyrRUwjgPU6NwoCgjjik2Rm+JvXPzHHdpJMHX1jkYwnXuq VuUbSL7c3NBeNuwhd+fBolCvYQOyd3NgZcyQCqmKWEMwTCxw4h8rBD1ju+LxetC64Rqd h/wIdAqRC3v0QvR+QNt7NEzX/99JMUaEHQMEgYUAhfqAtTAaa2r2GJ1phpIEjgwU5C2J NSsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776160875; x=1776765675; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vod8BXIWHFvHjyIgPVqzoMi7Ge1BDJsuhw5OvwgKjQg=; b=i1tA6KQv6X4WhxZbYefTlaT6ickYZhg1vdj8VMwZeqQtz4AcOLOlTf5m/m767cfbhz 0/QWlKgXqAiNhaWllseLE2/B9m7T3zbEqk+j+R1yMOH2YcJ+q9z27xSJCLpvZ/JEDJJG 7YPmT4Rs7bDAL5i88tkA0KvtvwtJvFZqrJxbhxPdqeH0zF2+AUJcRroWBNLDBQl/6m1P Icnh9QP0BkY0z0oKAJr863PU7J7r9Sw/TH9Pj9SCkJ1/ct/2GRd+kjZUYy2jEQN4sZNu fwwqV6wsc2ziTeWrJxNmXRTKWS7ocfij287SKWwAiwKMMP+cYZ1X4Y7qVD1R4G7VscHa kncw== X-Forwarded-Encrypted: i=1; AFNElJ9GLNKgX2Z+c1wtuKzFseQDmgoeRzgJywfMZ7AbqPvozsr6U5kYFaW1gEVSTk8K3IerCGtkNWo1fZt2p98=@vger.kernel.org X-Gm-Message-State: AOJu0Yx57SYnDY5iJ/MbZpWfzwp3PwKnA03IAT32JhftRC3oWQfCVTfJ 7SFHcOssmFhjwT1qXFfyaIdJ4fVrF9rJugE+qW1khgcRhQBvCInljVOPjefJO+YD X-Gm-Gg: AeBDieu4Lqz3mV7a3wfj+cWD9b2gZuJSBvk62AH+PE982BeG7kmbm0eZkyhjko6eAfS ze5/YJT3Fxv74oeQ/wZ8JuZZhFgRHGHMQf20mld7ChBBUbNyiVuondQ3D1xFd7AKHja/PV/3P2u YzB0cqiWujGl8IFNGQeZNZ5TdZJzUX9QGSH0P/BfRDuIf8KqvN4/M+0VqpuswShEkv3dWy79lQC r+HGRzH/9Xg9K+ZrMMIKLr02zjm/WbbvemllmsR3H7zz00FpZLYpk5V0WpGjl+mSP0XEC+nLPNU ZXFgk2VH28JLrwf1bijL1fJGWM8xjtZN4Td4QIrl5M7AAABc5hUTdhyFL2yFVi6hWJxdN2538WI FT64/AhptQw2+e2Ely9ER2ENNQNBCBLxSwKdEq7WRfR/crzslHTIwXN2Yttfv5OA86oR1GtxgUW pi4dygSDSpMsKrQA== X-Received: by 2002:a05:600c:6990:b0:488:a2ac:a34c with SMTP id 5b1f17b1804b1-488d67f5bf5mr239725405e9.12.1776160874458; Tue, 14 Apr 2026 03:01:14 -0700 (PDT) Received: from nsa ([45.94.208.102]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488ee019d9bsm38436665e9.14.2026.04.14.03.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2026 03:01:13 -0700 (PDT) Date: Tue, 14 Apr 2026 11:02:02 +0100 From: Nuno =?utf-8?B?U8Oh?= To: Andy Shevchenko Cc: Jonathan Cameron , Andy Shevchenko , Alisa-Dariana Roman , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Alisa-Dariana Roman , David Lechner , Nuno =?utf-8?B?U8Oh?= , Andy Shevchenko Subject: Re: [PATCH v1 1/1] iio: adc: ad7191: Don't check for specific errors when parsing properties Message-ID: References: <20260219143936.2276366-1-andriy.shevchenko@linux.intel.com> <20260412153040.0e6f2d7f@jic23-huawei> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Apr 14, 2026 at 12:33:50PM +0300, Andy Shevchenko wrote: > On Tue, Apr 14, 2026 at 12:31:14PM +0300, Andy Shevchenko wrote: > > On Tue, Apr 14, 2026 at 10:10:38AM +0100, Nuno Sá wrote: > > > On Sun, Apr 12, 2026 at 03:30:40PM +0100, Jonathan Cameron wrote: > > > > On Tue, 17 Mar 2026 12:42:07 +0200 > > > > Andy Shevchenko wrote: > > ... > > > > > I left this one for a while to see if the discussion would continue but seems not. > > > > I'm not sure it is always the case, but in this particular example I think the > > > > resulting code is a little nicer to read so applied. > > > > > > > > So for me, case by case basis for this sort of change. > > > > > > Yeah, I missed this one! Anyways seems the way will be to explicitly > > > use device_property_present() to check property presence. Still don't > > > love the dual call thing so I might just stop checking for -EINVAL (was > > > not doing it religiously anyways). > > > > > > Maybe we could have a set of optional variants of the API like > > > device_property_read_*_optional() kind of thing where we just return 0 > > > if the property is not present. But might also be too noisy... > > > > I think that's what usually Sakari likes (tons of wrappers for each case :-). > > I prefer be on the compromise side. > > Ah, and note, now we have kernel-doc updated to point out that _present is > recommended way of unambiguously checking for the property presence. > > 70fa0c308aa2 ("device property: Document how to check for the property presence") Yes, I did looked at it! That's why I said "Anyways seems the way will be to explicitly use device_property_present()..." - Nuno Sá > > > -- > With Best Regards, > Andy Shevchenko > >