From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4A07606A327 for ; Tue, 27 Oct 2026 12:50:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TiDaHAdp; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=P3wmuS3q DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=vLrpFFdk7As3uo5f+zqt+WxJmxjzYYueUQcB/bkjg8I=; b=TiDaHAdpziRl8ZV53w7q5Iedzp 8qS7MzrqEMZSo4hzQhdv7VUw9/1Zi2BD7dOEjb87UlcNzBvvNF+CKMyD8ZV8sNL5Tn4X+JKjOkGio YJThQKhQJ52rKMLrwTCng/5FWFIsZQkzFDRTqYRDpMkINRBIeZQA+8ffFiA6WylCCDz8DXUWxNtWT IcZSmuGL4nJ7zXtDhKEmz1bVTO6eqJUOYRmeQBpvzZr4STXfHLwaU2WQ0hhbNuVOrcABYa0VqZgDx iEUE4g3dfTevEAzwBkOBARC58nR3s6b/NllJudbJQ7/h+a9Z81qCumtCuI8h5U/EUVYvA8foedr2a UJ3jmYVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLgd0-00000004hMQ-1N6w; Tue, 27 Oct 2026 12:50:10 +0000 Received: from mail-lf1-f46.google.com ([209.85.167.46]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLgcw-00000004hJ0-44zJ for linux-amlogic@lists.infradead.org; Tue, 27 Oct 2026 12:50:08 +0000 Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5bcdae234ecso3426115e87.3 for ; Tue, 27 Oct 2026 05:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793105404; x=1793710204; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pkcAkMdCRwIuT9szM2gCVVjCSXFflqIHrQQCvrEeeZg=; b=P3wmuS3qvbYP5ziSmCq3iNgsnyD3gkdsfqLrNi/DnCffBq4lYIvA+p8WyX1F5X+sVb 9CBnxet6o1LYYCOwvW6+6C4rmgFvPwqNslAaRr45XYRwkRAr9AojGNnbgFzwIOpDLX+n gG3UN+vmdrPUFpDxWD4StxcSSwqgVvYhD+IL+vVYT9Qn0SZBVoZIiDSokU2xB3Cn3C2f XZyrbhdTzRIdL3WmhK997pouZ7j/0zWYittaFx2/qyA0rfxXGEvyriR6vTDW3lc29ifW cM+EEvTZWXyu11VOYyWYTQG7gVsbbRstVGIZ4qZD7EoI57qk5Jos7JFmnd4PFULS8r2h eUqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793105404; x=1793710204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=pkcAkMdCRwIuT9szM2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0M3 I30bsaO2uj1Bg4fBOUYJVZQI8y3nbV893WQ+ayIwjEikyWvRVyxQ3DQsjMNxDY2UnxyCfMKx0jt a1GXXEfNjAoFrPd2z4jJNmkNkFvY+6RWdkS7ozxzDyruVpX15WeBkpgpq1bLIu4YLTgLfuZYdna LlMAMJk/v4ELaldZputcQlA7b8NfMnnZhNm7mBZXBHkfxMVhPv2Rpp4lRZyS0lT5hQZcGod08Ji psZUtEDUSlg== X-Received: by 2002:a05:6512:1047:b0:5bc:d9de:d75c with SMTP id 2adb3069b0e04-5bfb71e3343mr3417911e87.47.1793105403789; Tue, 27 Oct 2026 05:50:03 -0700 (PDT) Received: from yantra.. (nekmmqtcmoboczbkdcs-1.v6.elisa-laajakaista.fi. [2001:99a:d7d:c300:55c8:a52b:6ba2:979c]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5bfb7e7cb24sm2052803e87.25.2026.10.27.05.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2026 05:50:03 -0700 (PDT) From: Rupesh Majhi To: Alex Lanzano , Andy Shevchenko , Benson Leung , David Lechner , Guenter Roeck , Jagath Jog J , Javier Carrasco , Jean-Baptiste Maneyrol , Jerome Brunet , Jinseob Kim , Jonathan Cameron , Kevin Hilman , Lorenzo Bianconi , Martin Blumenstingl , Matti Vaittinen , Neil Armstrong , =?UTF-8?q?Nuno=20S=C3=A1?= , Remi Buisson Cc: chrome-platform@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Rupesh Majhi , Bart Van Assche , Marco Elver , Jishnu Prakash Subject: [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Date: Tue, 27 Oct 2026 14:49:46 +0200 Message-ID: <20261027124954.110697-2-zoone.rupert@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261027124954.110697-1-zoone.rupert@gmail.com> References: <20261027124954.110697-1-zoone.rupert@gmail.com> X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261027_055007_065809_3769063C X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Since commit 5b63d0ae94cc ("compiler-context-analysis: Remove Sparse support"), __acquires() and __releases() only feed context analysis. Their argument is parsed before the function body, where only dev is in scope, so with analysis enabled for this file the build fails: error: use of undeclared identifier 'adc' Name the lock through dev, the same way the bodies find it. The analysis then also checks that the helpers really take and drop it. Suggested-by: Bart Van Assche Signed-off-by: Rupesh Majhi --- Cc: Marco Elver Cc: Bart Van Assche Cc: Jishnu Prakash v4: name the lock through dev instead of __context_unsafe() (Bart), now the first patch of the series that enables the analysis (Jonathan) v3: drop Fixes tag (Jonathan), trailer cleanup (Andy) https://lore.kernel.org/linux-iio/20261025191510.22261-1-zoone.rupert@gmail.com/ v2: __context_unsafe() explained in commit message (Andy) https://lore.kernel.org/linux-iio/20261021052435.112686-1-zoone.rupert@gmail.com/ v1: https://lore.kernel.org/linux-iio/20261003214516.128573-1-zoone.rupert@gmail.com/ drivers/iio/adc/qcom-spmi-adc5-gen3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5-gen3.c b/drivers/iio/adc/qcom-spmi-adc5-gen3.c index c68c6c5f6aca..09013c6e44a0 100644 --- a/drivers/iio/adc/qcom-spmi-adc5-gen3.c +++ b/drivers/iio/adc/qcom-spmi-adc5-gen3.c @@ -663,7 +663,7 @@ static int adc5_gen3_add_aux_tm_device(struct adc5_chip *adc) } void adc5_gen3_mutex_lock(struct device *dev) - __acquires(&adc->lock) + __acquires(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock) { struct iio_dev *indio_dev = dev_get_drvdata(dev->parent); struct adc5_chip *adc = iio_priv(indio_dev); @@ -673,7 +673,7 @@ void adc5_gen3_mutex_lock(struct device *dev) EXPORT_SYMBOL_NS_GPL(adc5_gen3_mutex_lock, "QCOM_SPMI_ADC5_GEN3"); void adc5_gen3_mutex_unlock(struct device *dev) - __releases(&adc->lock) + __releases(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock) { struct iio_dev *indio_dev = dev_get_drvdata(dev->parent); struct adc5_chip *adc = iio_priv(indio_dev); -- 2.43.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793105406; b=WkIS1n6p0htnH/hf5pMdG2aMHODl2bw1lcPFWfsWFDhclDOQE7OskAhHlCUnirFq0Jtv UbiZwE17gd03pa/F/LNlmoFjmiMlHrjyUN/tAYPLoUVVxbFKKXPY+MBifEn/s/qNwOu17 x2jguRult1z3IJ4tKXQe0mfigt5dW44URB1Y8NIr46F8QmvOZClZuCqPb3TwKuOmzNBiT /Gn8O/EREuA3dtBPyC80pIxk2f85YNox9aEtpJrtzcIS3AhKwRFBgbYGo3bnojhCDlemy 48MdztePwg1kQ9MZFNYcyTmwpR3Arq6WZXD8n+2ZVxLaMPcn85ALk1mgsHGLAgsaxWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793105406; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=pkcAkMdCRwIuT9szM2gCVVjCSXFflqIHrQQCvrEeeZg=; b=U6eulDQaDJIlRlbj7nLnOSM5YecMuY6PP3Htfks44bMupGA4h/IrOyaGMcjW6NLuvLol zBlvWO/LxPCwzjqYRrk7Bksau/FpAK0nOZeRQzOjASmpUTTklLPk+E0wafthdKPLHeWDf tDzwEXAK0syJT5aDzxc1GxL5OcGis13/EaDqkl5+DYkuSk7bd5U7C4T/Eghuvp9MNM7eD pexTKl+hlj0AHWQukmAW6v0pKV4I0y83wP0qsUV9Jy6Z3tbOqszPpVju66f1CeBxY46o9 b0ZgMJDv/ZPBG2o1uNEKE9AXOebuyGB+kBc2+REW9h88x1goHxN+kb3lsVBskV/uTMg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dayZoHYo; arc=none smtp.remote-ip=209.85.167.54 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C32CA606A322 for ; Tue, 27 Oct 2026 12:50:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C32CA606A322 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, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dayZoHYo Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5be416e603cso2452893e87.2 for ; Tue, 27 Oct 2026 05:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793105404; x=1793710204; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pkcAkMdCRwIuT9szM2gCVVjCSXFflqIHrQQCvrEeeZg=; b=dayZoHYoR3jMasJfz1Xv3yx21cp2Zox/aMH7AAonsoHy7w2gAbD70dIszmXrwWfHSe 5ziVRNs6GvDibpED29IKBBspomDB9pcBekIMf441ai+c3ctEqMPrNaSSAIQ512Vp3K+S qt+tlqy6khFKGXkVqk4KL0II26wkc12xHkOp8vGP3jlQVWa6/v5i3Du6Gq6lNbn5magj XnF1XNsce9TGx8QLocHkdQADeJG7Z4NnbcFhKlikDn3y9BAk7RTg7XkTA7tLB+4QHphe MxAZdUfOTjBjXgnhCrX+FFET7wiiYQaLfPHAbUY8ujLQen93vw5D2yhJ2I84mfw3rwt8 LvAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793105404; x=1793710204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=pkcAkMdCRwIuT9sz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kLqXHcvWsbWE0NTJQAdd2EPTFIx8Hxhl9f 3ywWxbuIASqQ744sQq5A+ENsCvyiz+dEhYJ0w1ZNyQkYy8mKb++Q5Wrp24JBe0Ix//koYte/SbO XblbB+fZHZA== X-Received: by 2002:a05:6512:1047:b0:5bc:d9de:d75c with SMTP id 2adb3069b0e04-5bfb71e3343mr3417911e87.47.1793105403789; Tue, 27 Oct 2026 05:50:03 -0700 (PDT) Received: from yantra.. (nekmmqtcmoboczbkdcs-1.v6.elisa-laajakaista.fi. [2001:99a:d7d:c300:55c8:a52b:6ba2:979c]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5bfb7e7cb24sm2052803e87.25.2026.10.27.05.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2026 05:50:03 -0700 (PDT) From: Rupesh Majhi To: Alex Lanzano , Andy Shevchenko , Benson Leung , David Lechner , Guenter Roeck , Jagath Jog J , Javier Carrasco , Jean-Baptiste Maneyrol , Jerome Brunet , Jinseob Kim , Jonathan Cameron , Kevin Hilman , Lorenzo Bianconi , Martin Blumenstingl , Matti Vaittinen , Neil Armstrong , =?UTF-8?q?Nuno=20S=C3=A1?= , Remi Buisson Cc: chrome-platform@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Rupesh Majhi , Bart Van Assche , Marco Elver , Jishnu Prakash Subject: [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Date: Tue, 27 Oct 2026 14:49:46 +0200 Message-ID: <20261027124954.110697-2-zoone.rupert@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261027124954.110697-1-zoone.rupert@gmail.com> References: <20261027124954.110697-1-zoone.rupert@gmail.com> X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since commit 5b63d0ae94cc ("compiler-context-analysis: Remove Sparse support"), __acquires() and __releases() only feed context analysis. Their argument is parsed before the function body, where only dev is in scope, so with analysis enabled for this file the build fails: error: use of undeclared identifier 'adc' Name the lock through dev, the same way the bodies find it. The analysis then also checks that the helpers really take and drop it. Suggested-by: Bart Van Assche Signed-off-by: Rupesh Majhi --- Cc: Marco Elver Cc: Bart Van Assche Cc: Jishnu Prakash v4: name the lock through dev instead of __context_unsafe() (Bart), now the first patch of the series that enables the analysis (Jonathan) v3: drop Fixes tag (Jonathan), trailer cleanup (Andy) https://lore.kernel.org/linux-iio/20261025191510.22261-1-zoone.rupert@gmail.com/ v2: __context_unsafe() explained in commit message (Andy) https://lore.kernel.org/linux-iio/20261021052435.112686-1-zoone.rupert@gmail.com/ v1: https://lore.kernel.org/linux-iio/20261003214516.128573-1-zoone.rupert@gmail.com/ drivers/iio/adc/qcom-spmi-adc5-gen3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5-gen3.c b/drivers/iio/adc/qcom-spmi-adc5-gen3.c index c68c6c5f6aca..09013c6e44a0 100644 --- a/drivers/iio/adc/qcom-spmi-adc5-gen3.c +++ b/drivers/iio/adc/qcom-spmi-adc5-gen3.c @@ -663,7 +663,7 @@ static int adc5_gen3_add_aux_tm_device(struct adc5_chip *adc) } void adc5_gen3_mutex_lock(struct device *dev) - __acquires(&adc->lock) + __acquires(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock) { struct iio_dev *indio_dev = dev_get_drvdata(dev->parent); struct adc5_chip *adc = iio_priv(indio_dev); @@ -673,7 +673,7 @@ void adc5_gen3_mutex_lock(struct device *dev) EXPORT_SYMBOL_NS_GPL(adc5_gen3_mutex_lock, "QCOM_SPMI_ADC5_GEN3"); void adc5_gen3_mutex_unlock(struct device *dev) - __releases(&adc->lock) + __releases(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock) { struct iio_dev *indio_dev = dev_get_drvdata(dev->parent); struct adc5_chip *adc = iio_priv(indio_dev); -- 2.43.0