Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1089263lqo; Sat, 11 May 2024 07:03:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKcT6/Ofl1oo1qLm33Rqq2enQezZ3Ch5IxWQAfKO9QtHPVdh9rH1oUq4l0wnaHQfBed/y+bulEDdf3h6OoqAvH6pu94/zF/pSa7hFkiA== X-Google-Smtp-Source: AGHT+IFkeDbHVZWC5PQEmEPD49apimzO/0J9wLP2A9GQ+PfQQx2sJcsjYVBcawb5WwMCbPTYIe+L X-Received: by 2002:ac8:5a49:0:b0:43a:d5b4:e169 with SMTP id d75a77b69052e-43dfdd0dc46mr60523911cf.61.1715436187945; Sat, 11 May 2024 07:03:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715436187; cv=pass; d=google.com; s=arc-20160816; b=nGAwe51EhTews6fRhy4p/Phy442X4S/3NBNsYHA8c3y3nHj6on73je7ZQLF0yBQHVq Oy72C9CR0sGRKHa0kngCLJkUolyaTlEbf9wHP0sOO47GNYnjaH7lH/2GZ58olIbA8Upt JOIecGyfpurDuPe2ixSaFvO+q8wUa6AUcsApAKhv0k9dYy42jcLjT4rnfONQmLiehhR1 SgYAzmVjjrDWg7NgBgLsBi3dT5WQZClEYYpgPM5S7tGe6FDWTGs+m8Dj2V7XrY/g7aOL bEN9kocktUUqwpOKbCAvgawFvxYuy63gzmYnKfixWSvI1AdzEpGQ9COp/VFhoILnKgM9 fU5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=IOYIMZjB4y6hn/rwh1fkzrLQ1oKn7FEC4pDGJ4LItwM=; fh=cy8SfwZ0c+Zs+tKvBVanwiPYbH8Faap+o4n8tLnma0M=; b=nR8Dc3nEMUzznN4c1JYn3FOz/Nep4DnSoP9fs7LxYVmFERodtdAmzJ2mVcvCV04k30 xhtcr1mvEE6R7/RgnRzbwHrGBiw5oV1UZImEGHb5YAbmI4DIb4fT5+hPs4hWq2nD/cNK iZydKNXyBvAWvnUXAal6xSxtr8JyohOROUc/3dIDXLL3kI9oLXlnmwOw8oTYKgJiScsi Xk+P4B/gY7RbMWJCMlU2AZuGt36QP4UVEAlvkQL1yqV/y0P9FHb8Y+mN5Spc5+1+r+cP QZa/w3mCuY3yibjLiMdwm0naDKpDteub6omc+66mvNHvB+k5hYQ5GIXffuGs0+fPnhI1 lbfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ERnPAO4K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df54a2085si60387281cf.151.2024.05.11.07.03.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 07:03:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ERnPAO4K; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A35121C20BF7 for ; Sat, 11 May 2024 14:03:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 137E253804; Sat, 11 May 2024 14:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ERnPAO4K" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 33E3C53373; Sat, 11 May 2024 14:02:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715436179; cv=none; b=nfeF/Pj6zXaLwz+9lGjMVjeUsbQ4CTWKRDT5m+0ecTrdOeIIedz49pdeRj4kakMnp4A3Y5/l1nlAUpEeXPEeMxOMnFmEqgpjk59ezNWybtcWyRBzwUNdPzcacZmgREsy52FTKsIke+aoRlIQTBfHm9tSf1RYVNoT4AeS1iDUW+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715436179; c=relaxed/simple; bh=KfW1rOY3mEYWH/WH5+wtO4RDSJth0BxELiZwxso/nB8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VMa/dITLIzjJQwe/Y1qWTK4jl3d0Q4rYdAxV5FlNkGJnaiX6egpVUZ7Bc2d7LuFgUzpW1T8FzZ0NrRGf3eowCD9Tz+9nxjUazyzUZ+qlc4LHUmGK/4gohjMBaL3VVxmdwOMUWbXcY1KdaR5np5Lue9UJXKj/uKGTXTRQ2Cb/8cY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ERnPAO4K; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11DDFC2BBFC; Sat, 11 May 2024 14:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715436178; bh=KfW1rOY3mEYWH/WH5+wtO4RDSJth0BxELiZwxso/nB8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ERnPAO4K4JiZyUiLCyZt/YJIP/0RMtB7Yqhi/gig6TfMXqws/MYjAcxCLKwAHuMrg CL1q4+5yCviRhTy5KUDmo2BjSR3et8V2mK+dz2tbDQSJgNrC2j1tvJv7re5Y8uHxxR CMuPE8Sbz8EoXjCWQNOhBFdWxPBcF2AuEcf54OAZVM6xJq4NmqEwotoHZzhY5c649A 8CgVmmcoxbgftxkOYJO+u5S7Pn/E2P3w1yINu7ZO4v/YPY9yXjPXRwTBCtLzSalyWS +EPzEgCt1VlXxxKVv7RmtHaEVgg/VCxNnYsk5QIVFSzedg3mK75KaoyhmTv/qoKd6V Svp9LZmh75wsw== Date: Sat, 11 May 2024 15:02:47 +0100 From: Jonathan Cameron To: Vasileios Amoiridis Cc: lars@metafoo.de, jagathjog1996@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: imu: bmi323: Fix trigger notification in case of error Message-ID: <20240511150247.07a06f6a@jic23-huawei> In-Reply-To: <20240508155407.139805-1-vassilisamir@gmail.com> References: <20240508155407.139805-1-vassilisamir@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 8 May 2024 17:54:07 +0200 Vasileios Amoiridis wrote: > In case of error in the bmi323_trigger_handler() function, the > function exits without calling the iio_trigger_notify_done() > which is responsible for informing the attached trigger that > the process is done and in case there is a .reenable(), to > call it. > > Fixes: 8a636db3aa57 ("iio: imu: Add driver for BMI323 IMU") > Signed-off-by: Vasileios Amoiridis I've applied this to a temporary fixes-for-6.10-rc1 that will get rebased on top of an update char-misc-linus once the Linus picks up a pull request from Greg during the coming merge window. I've done this for other patches that may be dependent on stuff that is only in char-misc-next. Jonathan > --- > drivers/iio/imu/bmi323/bmi323_core.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c > index 5d42ab9b176a..67d74a1a1b26 100644 > --- a/drivers/iio/imu/bmi323/bmi323_core.c > +++ b/drivers/iio/imu/bmi323/bmi323_core.c > @@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) > &data->buffer.channels, > ARRAY_SIZE(data->buffer.channels)); > if (ret) > - return IRQ_NONE; > + goto out; > } else { > for_each_set_bit(bit, indio_dev->active_scan_mask, > BMI323_CHAN_MAX) { > @@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) > &data->buffer.channels[index++], > BMI323_BYTES_PER_SAMPLE); > if (ret) > - return IRQ_NONE; > + goto out; > } > } > > iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer, > iio_get_time_ns(indio_dev)); > > +out: > iio_trigger_notify_done(indio_dev->trig); > > return IRQ_HANDLED; > > base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803