From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B7BB3E9C32 for ; Mon, 6 Jul 2026 06:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783320949; cv=none; b=BUIX9BzHUvEgFfGzqNvx9KmwoqmtVU+osr8K26fGVLFZo16FA2D7SlDnxW0R/vxRE7FysjrjZbZfDx6uxwM2/ndvpu/915WbYvdj1Zzgs8+xjMI69YSBsxFXLO7ortjEhUqDU6Nf9Qu2hQww85vBReYGSCZaYh5oSXKd2m0wOkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783320949; c=relaxed/simple; bh=ZWUN//6kt1UVkygdM6j9pSLImi5gdV2ZEjwwpjgezYk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=P35eMPfJYAVlLNv9+9gESdrchx7FDQhh/EtVMHA4+IvP81shB8TZuxqmKo5VuYF6fi4O/+iNTs4uezE9jvR3D9zAJMRypjcInzIK7r6RMiy8bt0ZNnUQpDQM+tyYvQ5+wbq4EGXkN7ys5LNkcjhyxHyWxSqHKV1OxpThNLW8SA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=E0PWeSF5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=DZv2KNrb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="E0PWeSF5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="DZv2KNrb" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66641YNa3594592 for ; Mon, 6 Jul 2026 06:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= h2J3KqWL7UWHIKxrcfay0863UvnN2o7JsrX7op3ymd0=; b=E0PWeSF5Qw1O78LP rnC31TbsG0O+g66MJ1mLH5asHD5NY6Sp6JaT+Azo5DbXt4x8C/xapE4184wT7LIp YYiuZdNybIKJwCWCFi+e6X/965lWXZB/TuQ2qpurZRhwH7OVZkM9dUqJbFaawPOo kIjIefOuGLZZYoXYjvrW+yRrSPzW9GgLgeEqdugny+ePP5M3OkdRFYu/JgxAnEw/ Fr/1qvPso3kn5E4207WTFbFtO4ZrA4aLBiYjd+Upx2/CYx7MO1vQjV7CYqzxk3fU Gym+7ONZTdei5lBxHrYxpnegqT3OhXPRXgblMQpAvYYJL4okELvddlTUOg/W21sQ MaEWbw== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f6qvgw83d-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Jul 2026 06:55:41 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-92e56b2b350so560593285a.3 for ; Sun, 05 Jul 2026 23:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783320940; x=1783925740; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=h2J3KqWL7UWHIKxrcfay0863UvnN2o7JsrX7op3ymd0=; b=DZv2KNrb20NhoOHw1foqY7Um82yPDLq1NOtLe9qq8O4gcXbTA5tCyBMbDzU8gw/ZFL vW0Fd6k2TV9iExNtgHJAMhwug6BVGiy58w2MdBKdYdgmka+RYgjEX4un5tazlZED0N8z Vd7yngTdvi1oq+HLvA8ugGJwEE5nMZ18x0OffHR4ar5vM6r82XJtNxMbcVgncRvPsQtq qxdXJMZRKiWhFLLadgnr+rQMtkS1aU0R9uC4bUVfppqMQCjxjv5cu7gCchuqJlSwtGdr +7QZzOvDwHnXq26NjqJUDwiHx/vz3GxlCbhU9ZBQqtNwHW9tvyltVnSG5ESUDUuHIkD6 cuvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783320940; x=1783925740; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=h2J3KqWL7UWHIKxrcfay0863UvnN2o7JsrX7op3ymd0=; b=c67ISFPpLhppJDk4kcHnECDBffKMc0mLz8nrbvrxTnyMvzhYcAmqRrN2c4d0L1OK45 FhKEtJEfMIdhXZ25r+kS8VEJzbr78jDwai3KqURks6eoXlYLf4hN0PzeM8+41/hRNdHR z4VfDcwgUJinzFqFPvGcAAsamwTYJlwiwy082idFP6JrEdIWSSbnVbZn2XtD7I2RYOU/ kLTIEhgi3asrBN1bScvMKfCIQ8Zzp5WaoV9PzsjsjuC9k7eThimVU7lKwh0hvYmkGkwy vUj/P7lz9xNkpVtuW7SRujhamYYR50gX/MEJbuhlRd5bs5qRDxV1CX8XCzVtVweuYmaI 8fZw== X-Forwarded-Encrypted: i=1; AHgh+Rr/OfdP3zJdwi6/gnqyH7lPprXqGqKvL/PQgx2fKab/04+fVCV5IvEJ/tvHlSE4ttB9DtlwCIEIGS7PlPM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx/VI/odiy4YCmnNv8SvJ1osSJNKAnTRyPPE81N9hDVAQKPnKgz 72cUpYZuL7EWBHOORHHa1OQwhdL1pNkMUEyU3a789UhIAblWkCFQcreLyVcFrbqueZEkmFATAVz FiJviXCMxqR835e1HFiz0QLKlDgXhIPJ3UtVhadTsAopGK9gt9pLLtFXPLK+fDuDT4wk= X-Gm-Gg: AfdE7cliND5G+jNvU+98uyp4kHHR/oyjcuROPBOYXWrHFOH5ugWz2rQUKGBDJyaMwWK NSaqenMzqCxQfn3u8u/mmZcQ8Tg0NIH7g/0HPeOj9ODWDR+9NWFCgPZT00TXR6cqdZvRl+ysl/y 1XmZ3zN+CAXYWvZm1ekwt+CnRrjgQMeWnjzhhzTURXHjVBL29jMhPaLX3woFzDttUEqzpIg6wte X5+SkBCtNepVgPIpL03EO3j5YcezO/wvIUEUodU7k0doj/zrgH7xh0l+Gp2+StsvpV1CnseGps4 UjIIfKsP6z1fHREwyXWTCQgzAE890/tQEXpomAh57AeC6fXTNBEa6Fq4P41qGSBf/Es5kdukNMf dzupNpOVtf3p2H0cscaBgRN5uZKCzvX3mgIoueYWU X-Received: by 2002:a05:620a:63c9:b0:920:6061:816e with SMTP id af79cd13be357-92e9a2f73ccmr1247014585a.7.1783320940258; Sun, 05 Jul 2026 23:55:40 -0700 (PDT) X-Received: by 2002:a05:620a:63c9:b0:920:6061:816e with SMTP id af79cd13be357-92e9a2f73ccmr1247012685a.7.1783320939874; Sun, 05 Jul 2026 23:55:39 -0700 (PDT) Received: from [192.168.1.110] ([178.197.223.174]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47a9e4d6da9sm21693759f8f.12.2026.07.05.23.55.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2026 23:55:38 -0700 (PDT) Message-ID: <11ddf106-9b69-4872-8635-aa934e4dc20a@oss.qualcomm.com> Date: Mon, 6 Jul 2026 08:55:37 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] iio: adc: ti-ads131m02: Drop redundant NULL check on devm_clk_get_enabled() To: Andy Shevchenko , Jonathan Cameron Cc: =?UTF-8?Q?Nuno_S=C3=A1?= , Michael Hennerich , Antoniu Miclaus , David Lechner , Andy Shevchenko , linux@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260705172438.119204-3-krzysztof.kozlowski@oss.qualcomm.com> <20260706003712.753a5870@jic23-huawei> From: Krzysztof Kozlowski Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=VvoTxe2n c=1 sm=1 tr=0 ts=6a4b516d cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=N6niishs+lR9UBL1FN3Qrw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=RKvKgnVovDhdWHIY5mQA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: FYzxWlXz4MFnCuV0315NVu9suKEqpqBW X-Proofpoint-GUID: FYzxWlXz4MFnCuV0315NVu9suKEqpqBW X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA2MDA2NyBTYWx0ZWRfXxFt1qP+GaFOA J5qFqOm7bVBjVm+m6tVPUyMSjX6TpKVfIVhD0DkOubR+msp260DG3bnmDN7gKmJSwDRipyooOAC 90erveUv5/FVy5cY40kLnCV+kTc66ws= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA2MDA2NyBTYWx0ZWRfX9Oe9sJo4hCML lX+6jBKarqjJSRMQorxDeRDOjz9Y189qPHwn1JUnrLTq+1ylU2pegZQKa19/8a9JWDLgvTGaghb UQizvF9lLy/EFQUEXB6mkEoR6c7TVwr/4zc7YgkK+6iNhLdOymo+G8gIbCgIB8Y6lsaLfcfNPBN dPQbOuad3fTiYf0+dCxh81hjFsZyYzThnIgPAT5PtfDae6UxyfPQRLMeFEdziQzb+gAFuw4g4Q+ fJTllRXHjrHzwaYEa5LVeMSln/3PQda3AFIOLeHdPOHchKtUzmTXQlyvqFm2z0EGhL4sPVGP0B7 c0hXKlqYa1YIyuELxAPcde5sD6ohB9b5DwRiLTO2TNcgDmI8glZsaTyiu4xhsrHRPL7vKXl4U+C NmFH1gfza8BFkogvUoUyxJvf0HvcpaDqQAwBHxH6WYVUViPyC/axN1BkYWOxtQwnDsQtrX0zUl4 /QinUmVPsfAGikdLmUw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-05_02,2026-07-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 suspectscore=0 impostorscore=0 clxscore=1015 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607060067 On 06/07/2026 08:04, Andy Shevchenko wrote: > On Mon, Jul 06, 2026 at 12:37:12AM +0100, Jonathan Cameron wrote: >> On Sun, 5 Jul 2026 19:24:39 +0200 >> Krzysztof Kozlowski wrote: >> >>> devm_clk_get_enabled() does not return NULL (only valid clock or ERR >>> pointer), so simplify the code to drop redundant IS_ERR_OR_NULL(). >>> >>> Signed-off-by: Krzysztof Kozlowski >> See the stub. >> >> static inline struct clk *devm_clk_get_enabled(struct device *dev, >> const char *id) >> { >> return NULL; >> } >> Not sure what the reasoning behind that is. Maybe that >> clock could be already on? >> >> We could I guess make this driver depend on one of the clk >> related configs, but today it doesn't. So to me this NULL check smells >> of protection we don't need so I think the change is fine, but the >> patch description should reflect that stub and it being considered >> reasonable to plough on regardless. > > Ah, good catch! I have thought for a moment about this possibility, but I gave > tag anyway as the stub thingy should be addressed separately anyway as there > are many drivers (I think) that do not check for NULL. Except these ~8 cases I found (I sent a bunch of patches), no one checks for NULL... Best regards, Krzysztof