From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 A3277377577 for ; Tue, 19 May 2026 06:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779171600; cv=none; b=sWQ2IOBXjLF9NnQy0EGd83ClYMb7tLtyM1HY7aw3At46DHBDl1jjrM0/MpiEJr+cblp2H653P2iWSz8sDPAgR0x/lk7c+MOH4CsUkCAjQ5XLLAFraZC0JFVW057itvO13CNJhvwmvFZx+kW8XJxxUQWmYWm1m1IDwSAiL8QhVgI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779171600; c=relaxed/simple; bh=+aofVVRqP5Rpe1qFn+k98ADHJAI9Bk1ziYslSUHAcxo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PbloQOGkjYIwbFpX7EPxhPmZKsnYTs1mFGVlGvCdZf9f4NPTqv/d/7M1U150pt2/8F23yRYpsHRg89nb1or2TTuX/X1/YbCpJi9nsZsHDZSEhGFJl5NJb83anSlG7EVoMmwHgjyI/SL9hJAXEg0ry0mYENJIQUre5LOIc79Yx0s= 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=P8+q3Tj5; arc=none smtp.client-ip=209.85.208.181 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="P8+q3Tj5" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-38eab6cf7d8so25306261fa.1 for ; Mon, 18 May 2026 23:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779171597; x=1779776397; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vvw/ZXy41jHIKAGbo0sC2whoO0qxxqIRkdRfPrw1odg=; b=P8+q3Tj50Li7F+3YgCP/Ohktha5QXc1iOAzLiJkl47OOIDCZEi2o83d0PEBblbklPe l0ik0f+cgjRdu3TfruA3qSXfs1gUcF8+ZgepBaJSeNTMGdqTlDj9JtInUsfwST6psQ8W +BkJNIoidy/GcNbZDsuETOQMS+seuiB8eWiPy7evqTbUO8H830qd3ac7ph4d6WfMJBI0 dwn4t53579vvkKZ8GuOADlx/E3dRwLSu6/98uLf50ZS2IvVFY3xHzt7HMFt8KJUwVjIu 0ho7tqnbh6cXsr9j3b57awPsLsptfwg40lYyd6v8n7oIGWvbRD7f8+OXsLjZqdM4H+lu ovJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779171597; x=1779776397; h=content-transfer-encoding:in-reply-to:from:content-language :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; bh=vvw/ZXy41jHIKAGbo0sC2whoO0qxxqIRkdRfPrw1odg=; b=DAykV78Q2BHpoPEDfpBOnuOkwV2N8rbpcScKGRsD8Iphf/oUl0UNcJIr0YrFtNdJXB 8Fz58wYZHjsHkL1B+l7otDyfsHQqnTxJ6Kd5SbhhSTCzQuw7j1EHiTYaKqG1yw7Af6Df sAqtAMaFWGcwMJlSXyausV0QYLafjj/1MXRVPr61vYqWiS3tKoTqix3l1d05/OLc++Xs Z/EB+gngObtU7wTHKiJg1v5m29jFjLl3isnGxy5EmifnBFb0u4KA2aCDOI2YLIvgzDC4 Uc7iUvf75DnbEuUJlZcozozZ9TyAGKWGpT3BDJADB4a4fXCdPbFokQMLjVBVZ82sIj2a Lhqg== X-Forwarded-Encrypted: i=1; AFNElJ/8Vte4RKdo8NBTMx6tdkq5YoOIQ/BfSfZCkYQVL0qBwpvTVdsW+atabOVvH0MjaSPE5RU+rSo2S7zY3j4=@vger.kernel.org X-Gm-Message-State: AOJu0YzRqCD80jus0AoiLz3y3wKStDyISRdF1MzYhvirwnnFX/Bhb803 jicwceTDW4FDmkYUHaFquGR59HRcaxmgEVLYw84/O9p3iwF/1OoUsfQYDE3F6NdiL/k= X-Gm-Gg: Acq92OHIkJPMnwOD/lZx1DrlKbVfVhjOhEradC5USStmRS1xrsHmviciLj0OffL/1Jz ogrHPRTdCMmXnDi/wcjADdu5lAhgqEiOhYfDkMnTlNbRGk3bmFuJp7M4tFLkcPeBVQoVxEa/IZH JlTfPuyMmIYPBU105CQimNymx9qRwyCpz0HFx6aM/7cOnJALuzLTBqUYr5tv4CNVpwW1+OopVsl qh6l6q6ca0c94XiCgS9k+zvtWKWgen2Uo5lZkHXYEPQqa+TFgkUmxsvYRQqaHwreA7ENgwQpiMi Dk2e7LaUPT8VznSE31upo23cXS4vbpXtcVNddxCae3PwT5raGc4ETBEipU1QQ+Uyv/Iy8LVwECP WpqYYrBPovjK98cBKNWme6ZnpdX7C3jyjA1EGUvkVSiPFuqtYuBFpUsSCOlxcr4Ds8mvZ3qItkX OxwIpj9EpU1jXB4jtb9tbbDzXZcwH+bb9hJZSpSIgvs56Iv9hR36xTQaaXPKC5AFibz3v6KdHDN 2P78bw8 X-Received: by 2002:a05:6512:2248:b0:5a8:7f30:609f with SMTP id 2adb3069b0e04-5aa0e73d4afmr5833121e87.10.1779171596672; Mon, 18 May 2026 23:19:56 -0700 (PDT) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a90f11a5d5sm3835660e87.28.2026.05.18.23.19.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2026 23:19:56 -0700 (PDT) Message-ID: <01292abd-0f16-4ec4-9f48-36267973eb7a@gmail.com> Date: Tue, 19 May 2026 09:19:55 +0300 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 v3] iio: pressure: rohm-bm1390: harden trigger handler against transient errors To: Stepan Ionichev , jic23@kernel.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260518181110.1467-1-sozdayvek@gmail.com> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: <20260518181110.1467-1-sozdayvek@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 18/05/2026 21:11, Stepan Ionichev wrote: > bm1390_trigger_handler() returns from three error paths without calling > iio_trigger_notify_done(). The success path at the end does, so on a > transient regmap or read failure the trigger's use_count is never > decremented and iio_trigger_poll_chained() drops subsequent dispatches > until the trigger is reattached. > > This is not a fix for a reported bug, only hardening against hardware > or bus glitches; if a glitch is persistent the device is wedged and > needs an unbind anyway, which is left to the user. > > Split the function so the inner helper returns bool with the data-read > outcome, and the outer IRQ handler calls iio_trigger_notify_done() > once and reports the result via IRQ_RETVAL(). > > Signed-off-by: Stepan Ionichev Reviewed-by: Matti Vaittinen -- --- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~